JSR-043: JTAPI-1.4

javax.telephony.callcenter
Interface Agent


public interface Agent

Introduction

An Agent represents an individual capable of handling telephone calls for a particular Address. For example, an agent may be a customer service representative in a call center environment. An Agent is associated with a particular AgentTerminal, which represents the particular Terminal endpoint associated with the Agent. Each Agent is also logged into a particular ACDAddress. The act of logging into an address announces the availability of the Agent to handle Calls which come into that ACDAddress. Distinct Agents are used to represent the same individual who is logged into multiple ACDAddresses from the same AgentTerminal

Adding and Removing Agents

Agents are created and added to a particular ACDAddress via the AgentTerminal.addAgent() method. This method creates a new Agent associated with the AgentTerminal and the ACDAddress given as an argument.

Agents are removed from an AgentTerminal via the AgentTerminal.removeAgent() method. This method also removes the Agent from its ACDAddress. The Agent is no longer available to receive telephone calls coming into its ACDAddress.

The Agent's State

The state of the Agent describes whether it is currently logged into an ACDAddress or its current ability to handle telephone calls. Applications obtain the state of the Agent via the Agent.getState() method. Applications may also directly change the state of the Agent via the Agent.setState() method. Each state is an integer constant defined in this interface and summarized below.

Agent.LOG_IN This state indicates the Agent is logged into an ACDAddress.
Agent.LOG_OUT This state indicates the Agent has logged out of an ACDAddress.
Agent.NOT_READY This state indicates the Agent is not available to handle Calls because it is busy with other non-call servicing related tasks.
Agent.READY This state indicates the Agent is available to service Calls.
Agent.WORK_NOT_READY This state indicates the Agent is not available to service Calls because it is busy with other call-servicing related tasks.
Agent.WORK_READY This state indicates the Agent is available to service Calls and is also performing other call-servicing related tasks.
Agent.BUSY This state indicates the Agent is not available to service Calls because it is busy with another Call.
Agent.UNKNOWN This state indicates the state of the Agent is currently not known.

The following diagram illustrates the valid state transitions for the Agent. The implementation must guarantee the Agent state adheres to these state transitions. If an applications requests an Agent state change which violates the transitions, the setState() method on this interface will throw InvalidStateException. The state of this object can be altered by invoking the the setState method.

Observers and Events

Application are notified when an Agent changes state via an event. Each Agent state has a corresponding event. Agent state changes are reported via two interfaces: ACDAddressObserver for the ACDAddress associated with this Agent, and AgentTerminalObserver for the AgentTerminal associated with this Agent. Both of these interfaces receive Agent state events.

See Also:
AgentTerminal, ACDAddress, AgentTerminalObserver, ACDAddressObserver

Field Summary
static int BUSY
          The Agent.BUSY state indicates the Agent is not available to service Calls because it is busy with another Call.
static int LOG_IN
          The Agent.LOG_IN state indicates that an Agent, which is associated with an AgentTerminal is logged into an ACDAddress.
static int LOG_OUT
          The Agent.LOG_OUT state indicates the Agent has logged out of an ACDAddress.
static int NOT_READY
          The Agent.NOT_READY state indicates the Agent is not available to handle Calls because it is busy with other non-call servicing related tasks.
static int READY
          The Agent.READY state indicates the Agent is available to service Calls.
static int UNKNOWN
          The Agent.UNKNOWN state indicates the state of the Agent is currently not known.
static int WORK_NOT_READY
          The Agent.WORK_NOT_READY state indicates the Agent is not available to service Calls because it is busy with other call-servicing related tasks.
static int WORK_READY
          The Agent.WORK_READY state indicates the Agent is available to service Calls and is also performing other call-servicing related tasks.
 
Method Summary
 ACDAddress getACDAddress()
          Returns the ACDAddress which this Agent is logged into.
 Address getAgentAddress()
          Returns the Address associated with the AgentTerminal from which this Agent is logged in.
 java.lang.String getAgentID()
          Returns the Agent's string identification.
 AgentTerminal getAgentTerminal()
          Returns the AgentTerminal associated with this Agent and which this Agent is logged into.
 int getState()
          Returns the current Agent state.
 void setState(int state)
          Changes the state of the Agent.
 

Field Detail

UNKNOWN

public static final int UNKNOWN
The Agent.UNKNOWN state indicates the state of the Agent is currently not known.

LOG_IN

public static final int LOG_IN
The Agent.LOG_IN state indicates that an Agent, which is associated with an AgentTerminal is logged into an ACDAddress.

LOG_OUT

public static final int LOG_OUT
The Agent.LOG_OUT state indicates the Agent has logged out of an ACDAddress.

NOT_READY

public static final int NOT_READY
The Agent.NOT_READY state indicates the Agent is not available to handle Calls because it is busy with other non-call servicing related tasks.

READY

public static final int READY
The Agent.READY state indicates the Agent is available to service Calls.

WORK_NOT_READY

public static final int WORK_NOT_READY
The Agent.WORK_NOT_READY state indicates the Agent is not available to service Calls because it is busy with other call-servicing related tasks.

WORK_READY

public static final int WORK_READY
The Agent.WORK_READY state indicates the Agent is available to service Calls and is also performing other call-servicing related tasks.

BUSY

public static final int BUSY
The Agent.BUSY state indicates the Agent is not available to service Calls because it is busy with another Call.
Method Detail

setState

public void setState(int state)
              throws InvalidArgumentException,
                     InvalidStateException
Changes the state of the Agent. The new desired state is given as a parameter to this method. The Agent's state must adhere to the state transition diagram given in this interface definition. If the given, new Agent state violates the transition diagram, this method throws InvalidStateException.

Pre-Conditions

  1. this.getAgentTerminal().getProvider().getState()==Provider.IN_SERVICE
  2. this.getState() == Agent.READY, Agent.NOT_READ, Agent.WORK_READY, or Agent.WORK_NOT_READY.
Post-Conditions
  1. this.getAgentTerminal().getProvider().getState()==Provider.IN_SERVICE
  2. this.getState() == state
  3. The proper Agent state event is delivered to the application

Parameters:
state - The new, desired state of the Agent.
Throws:
InvalidArgumentException - The state given as the argument is not a valid Agent state.
InvalidStateException - Either the provider is not in service or the Agent is not in a state in which the requested state change can be honored.

getState

public int getState()
Returns the current Agent state. This method returns one of the integer constants defined by this interface.

Returns:
The current Agent state.

getAgentID

public java.lang.String getAgentID()
Returns the Agent's string identification. This identification is passed as an argument to the AgentTerminal.addAgent() method.

Returns:
the Agent's ID.

getACDAddress

public ACDAddress getACDAddress()
Returns the ACDAddress which this Agent is logged into.

Returns:
The ACDAddress this Agent is logged into.

getAgentAddress

public Address getAgentAddress()
Returns the Address associated with the AgentTerminal from which this Agent is logged in.

Returns:
The Agent's Address.

getAgentTerminal

public AgentTerminal getAgentTerminal()
Returns the AgentTerminal associated with this Agent and which this Agent is logged into. If the state of the Agent is Agent.LOG_OUT, this method returns null.

Returns:
The AgentTerminal associated with this Agent.

JSR-043: JTAPI-1.4

Send comments to: JSR-43@ectf.org