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

📄 agent.java

📁 Java Telephony API .java程序
💻 JAVA
字号:
/*#pragma ident "@(#)Agent.java	1.6      97/02/05     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.Address;/** * The Agent object represents an AgentTerminals relationship to * an ACDAddress. The Agent object represents a person acting as an agent in * the simplest case where the person is logged into only one ACD Address. * If the person were logged into several ACD Addresses these scenarios * would be represented as several Agent objects. * This relationship is created by constructing an Agent object with the necessary * information (e.g. desired agent state, ACD Address that the Agent will * be associated with, Agent Address to be associated with this Agent at * the Terminal, etc.) and used it with the setAgent() method of the * AgentTerminal. * The relationship can be changed by updating the appropriate attributes * of the Agent object and using it with the setAgent() method again. */public class Agent{    /**     * When the provider is unable to determine the state of the     * AgentTerminal it reports is at UNKNOWN.     */    public static final int UNKNOWN = 0;    /**     * When the provider determines that the AgentTerminal has     * logged into an ACDAddress it reports the AgentTerminal's     * state as LOG_IN.     */    public static final int LOG_IN = 1;    /**     * When the provider determines that the AgentTerminal has     * logged out of an ACDAddress it reports the AgentTerminal's     * state as LOG_OUT.     */    public static final int LOG_OUT = 2;    /**     * When the provider determines that the AgentTerminal is     * busy with tasks other than servicing calls it reports the     * AgentTerminal's state as NOT_READY.     */    public static final int NOT_READY = 3;    /**     * When the provider determines that the AgentTerminal is     * ready to service calls it reports the     * AgentTerminal's state as READY.     */    public static final int READY = 4;    /**     * When the provider determines that the AgentTerminal has been     * disconnected from a call and is busy handling tasks associated     * with a call and is not available to service calls it reports     * the AgentTerminal's state as WORK_NOT_READY.     */    public static final int WORK_NOT_READY = 5;    /**     * When the provider determines that the AgentTerminal has been     * disconnected from a call and is busy handling tasks associated     * with a call and is available to service calls it reports     * the AgentTerminal's state as WORK_READY.     */    public static final int WORK_READY = 6;    /**     * When the provider determines that the AgentTerminal is busy with     * a call and is not available to handle other ACD calls, it reports     * the AgentTerminal's state as BUSY.     */    public static final int BUSY = 7;    /**     * The AgentTerminal's state in relationship to the ACDAddress     * specified. The states may be set manually, through setState()     * or by the provider.     */    int state;    /**     * ID used by the Agent     */    String agentID;    /**     * The ACDAddress that the AgentTerminal is logged into.     */    ACDAddress acdAddress;    /**     * The passwd needs to be set prior to invoking setAgent() on     * AgentTerminal.     */    String passwd;    /**     * The agentAddress at the AgentTerminal that is to be associated     * with the ACDAddress.     */    Address agentAddress;    /**     * The agentTerminal that is associated with the ACDAddress.     */    AgentTerminal agentTerminal;    /**     * The constructor is used to create an Agent object prior to     * invoking setAgent() on AgentTerminal.     */    public Agent (int _state, String _agentID,        ACDAddress _acdAddress,  Address _agentAddress,        String _passwd)    {        state = _state;        agentID = _agentID;        acdAddress = _acdAddress;        agentAddress = _agentAddress;        passwd = _passwd;    }    /**     * This sets this Agent's state.     * <p>     * Valid states are UNKNOWN, LOG_IN, LOG_OUT, NOT_READY, READY,     * WORK_NOT_READY, WORK_READY.     */    public void setState(int _state)    {        state = _state;    }    /**     * This sets this Agent's ID.     * <p>     * Agent IDs are administered on the switch.     */    public void setAgentID(String _agentID)    {        agentID = _agentID;    }    /**     * This sets the ACDAddress this Agent intends     * to log in to or is already logged into.     */    public void setACDAddress(ACDAddress _acdAddress)    {        acdAddress = _acdAddress;    }    /**     * This sets this Agent's password.     */     public void setPasswd(String _passwd)     {        passwd = passwd;     }    /**     * This sets the Agent's Address that is associated     * with the given AgentTerminal.     */     public void setAgentAddress(Address _agentAddress)     {        agentAddress = _agentAddress;     }    /**     * This returns this Agent's state in the     * ACDAddress specified in the object.     */    public int getState()    {        return(state);    }    /**     * This returns this Agent's ID.     */    public String getAgentID()    {        return(agentID);    }    /**     * This returns the ACDAddress this Agent is logged into.     */    public ACDAddress getACDAddress()    {        return(acdAddress);    }    /**     * This returns this Agent's password.     */     public String getPasswd()     {        return(passwd);     }    /**     * This returns the Agent's Address that is associated     * with the given AgentTerminal.     */     public Address getAgentAddress()     {        return(agentAddress);     }    /**     * This returns the Agent Terminal that is associated with     * this Agent object.     * If the agent state is LOG_OUT, this method will return a     * null for the AgentTerminal object.     */     public AgentTerminal getAgentTerminal()     {        return(agentTerminal);     }}

⌨️ 快捷键说明

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