⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 callcentercall.java

📁 Java Telephony API .java程序
💻 JAVA
字号:
/*#pragma ident "@(#)CallCenterCall.java	1.7      97/01/30     SMI" * Copyright (c) 1996 Sun Microsystems, Inc. All Rights Reserved. * * Permission to use, copy, modify, and distribute this software * and its documentation for NON-COMMERCIAL purposes and without * fee is hereby granted provided that this copyright notice * appears in all copies. Please refer to the file "copyright.html" * for further important copyright and licensing information. * * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. */package java.telephony.callcenter;import  java.telephony.*;import  java.telephony.callcontrol.CallControlCall;public interface CallCenterCall extends CallControlCall{  /**   * Minimum number of rings allowed before classifying the call as no   * answer.   */  public static final int MIN_RINGS = 2;  /**   * Maximum number of rings allowed before classifying the call as no   * answer.   */  public static final int MAX_RINGS = 15;  /**   * This answering endpoint treatment indicates that treatment should   * follow the provider's default treatment administration.   */  public static final int ANSWERING_TREATMENT_PROVIDER_DEFAULT = 1;  /**   * This answering endpoint treatment indicates that call should be   * dropped if answering endpoint is detected.   */  public static final int ANSWERING_TREATMENT_DROP = 2;  /**   * This answering endpoint treatment indicates that call should be   * connected if answering endpoint is detected.   */  public static final int ANSWERING_TREATMENT_CONNECT = 3;  /**   * This answering endpoint treatment indicates that no treatment is   * specified.   */  public static final int ANSWERING_TREATMENT_NONE = 4;  /**   * This indicates that the endpoint answering the call may be an   * answering machine.   */  public static final int ENDPOINT_ANSWERING_MACHINE = 1;  /**   * This indicates that the endpoint answering the call may be a   * fax machine.   */  public static final int ENDPOINT_FAX_MACHINE = 2;  /**   * This indicates that the endpoint answering the call may be a   * human.   */  public static final int ENDPOINT_HUMAN_INTERVENTION = 3;  /**   * This indicates that the endpoint answering the call may be   * any thing.   */  public static final int ENDPOINT_ANY = 4;  /**   * This method connects a pair of connections to a call, attempting   * to connect the destination first. After the destination connection   * is CONNECTED, ALERTING, NETWORK_REACHED or NETWORK_ALERTING as   * specified by the connectionState, an attempt is made to connect the   * originator.   * <p>   * The method returns when the Connection objects are created.   * <p>   * The connection objects go through one or more state transitions to   * go from an intial IDLE state to a final CONNECTED state.   * <p>   * The pre-condition predicates for the CallCenterCall.connectPredictive()   * method indicate the statements that must be true in order for the method   * to succeed. However, these predicates do not guarantee success.   * The variable "call" represents the instance of the CallCenterCall object.   * <br>   * 1. (call.getProvider()).getState() == IN_SERVICE   * <br>   * 2. call.getState() == IDLE   * <p>   * The post-condition predicates for the CallCenterCall.connectPredictive()   * method are as follows. connectionState is provided by the application.   * <br>   * 1. (call.getProvider()).getState() == IN_SERVCE   * <br>   * 2. call.getState() == ACTIVE   * <br>   * 3. c = call.getConnections() && sizeof(c) == 2   * <br>   * 4. c = call.getConnections() && c[0].getState() == connectionState   * <br>   * 5. c = call.getConnections() && c[1].getState() == IDLE   * <p>   * @return A pair of Connections.   * @param originatorTerminal The originating Terminal of the telephone call.   * This is optional when the originator is for example an ACDAddress.   * @param originatorAddress The originating Address of the telephone call.   * @param destination This must be a complete and valid telephone number.   * @param connectionState The application may set this to CONNECTED   * ALERTING, NETWORK_REACHED or NETWORK_ALERTING.   * @param maxRings This specifies the the number of rings that are allowed   * before classifying the call as no answer. The allowed range is from   * MIN_RINGS of 2 to MAX_RINGS of 15.   * @param answeringTreatment This specifies the call treatment when an   * answering endpoint is detected. The set includes   * ANSWERING_TREATMENT_PROVIDER_DEFAULT, ANSWERING_TREATMENT_DROP,   * ANSWERING_TREATMENT_CONNECT and ANSWERING_TREATMENT_NONE.   * @param answeringEndPointType This specifies the type of answering   * endpoint. The set includes ENDPOINT_ANSWERING_MACHINE,   * ENDPOINT_FAX_MACHINE, ENDPOINT_HUMAN_INTERVENTION, ENDPOINT_ANY.   * @exception PlatformException A platform-specific exception occurred.   */  public Connection[] connectPredictive(Terminal originatorTerminal,                                Address originatorAddress,                                String destination,                                int connectionState,                                int maxRings,                                int answeringTreatment,                                int answeringEndpointType)    throws PlatformException;  /**   * This method associates application specific data with a call. The   * format of the data is application specific. If application specific   * data exists for the call an application can clear it from the call   * by passing a NULL object.   * <p>   * The Call must be either IDLE or ACTIVE before this method is valid.   * The Provider must also be IN_SERVICE.   * The pre-conditions for this method are given by the following:   * <br>   * 1. (call.getProvider()).getState() == IN_SERVICE   * <br>   * 2. call.getState() == ACTIVE or IDLE   * <p>   * Notes: The application specific data associated with the Call object   * from which the conference or transfer method is invoked will be   * retained with the call.   * <p>   * An ApplicationDataEvent will be sent when this method is   * used or the provider associates data with the call from another   * source.   * <p>   * @param data The data to be associated with the call.   * @exception PlatformException A platform-specific exception occurred.   */  public void setApplicationData(Object data)    throws PlatformException;  /**   * Returns the application specific data associated with the call.   * <p>   * The Call must be either IDLE or ACTIVE before this method is valid.   * The Provider must also be IN_SERVICE.   * The pre-conditions for this method are given by the following:   * <br>   * 1. (call.getProvider()).getState() == IN_SERVICE   * <br>   * 2. call.getState() == ACTIVE or IDLE   * <p>   * @returns String The data to be associated with the call.   * @exception PlatformException A platform-specific exception occurred.   */  public Object getApplicationData()    throws PlatformException;  /**   * Returns an array of all Trunks currently being used for this Call.   * If there are no Trunks being used, this method returns null.   * <p>   * @return An array of Trunks, null if there are   * none.   * @exception PlatformException A platform-specific exception occurred.   */  public CallCenterTrunk[] getTrunks()    throws PlatformException;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -