JSR-043: JTAPI-1.4

javax.telephony.callcenter
Interface AgentTerminal

All Superinterfaces:
Terminal

public interface AgentTerminal
extends Terminal

The AgentTerminal interface extends the core Terminal interface. This interface add methods to support ACD and Agent features.

Adding and Removing Agents

Applications may create and add new Agents associated with this AgentTerminal via the AgentTerminal.addAgent() method. This method creates and returns a new Agent which is associated with this AgentTerminal and an ACDAddress given as an argument. Agents model human individuals who are able to service telephone calls coming into an Address.

Agents may be removed from this AgentTerminal via the AgentTerminal.removeAgent() method.

See Also:
Terminal, Agent, ACDAddress, AgentTerminalObserver

Method Summary
 Agent addAgent(Address agentAddress, ACDAddress acdAddress, int initialState, java.lang.String agentID, java.lang.String password)
          Creates a new Agent associated with this Terminal and is logged into the ACDAddress given as an argument.
 Agent[] getAgents()
          Returns an array of Agents current associated with this Terminal.
 void removeAgent(Agent agent)
          Removes a previously added Agent from this AgentTerminal.
 void setAgents(Agent[] agents)
          Deprecated. Since JTAPI v1.2. Has been replaced with addAgent() and removeAgent()
 
Methods inherited from interface javax.telephony.Terminal
addCallListener, addCallObserver, addObserver, addTerminalListener, getAddresses, getCallListeners, getCallObservers, getCapabilities, getName, getObservers, getProvider, getTerminalCapabilities, getTerminalConnections, getTerminalListeners, removeCallListener, removeCallObserver, removeObserver, removeTerminalListener
 

Method Detail

addAgent

public Agent addAgent(Address agentAddress,
                      ACDAddress acdAddress,
                      int initialState,
                      java.lang.String agentID,
                      java.lang.String password)
               throws InvalidArgumentException,
                      InvalidStateException,
                      ResourceUnavailableException
Creates a new Agent associated with this Terminal and is logged into the ACDAddress given as an argument. This method returns the new Agent when it has been successfully created and logged into the ACDAddress.

Applications remove the new Agent via the removeAgent() method defined by this interface. Applications obtain all Agents associated with this Terminal via the getAgents() method defined on this interface.

Subsequent invocations of this methods with the same agentAddress and acdAddress parameters will simply return the Agent originally created.

Pre-Conditions

  1. this.getProvider().getState() == Provider.IN_SERVICE
  2. initialState == Agent.LOGIN, Agent.READY, or Agent.NOT_READY
Post-Conditions
  1. Let agent be the Agent created an returned
  2. this.getProvider().getState() == Provider.IN_SERVICE
  3. agent is an element of this.getAgents()
  4. agent.getState() == initialState
  5. Either an AgentTermLoggedOnEv, AgentTermReadyEv, or AgentTermNotReadyEv is delivered for this Agent
  6. Either an ACDAddrLoggedOnEv, ACDAddrReadyEv, or ACDAddrNotReadyEv is delivered for this Agent
Parameters:
agentAddress - The Address associated with this Terminal. Terminals may support more than one Address on which an Agent may be associated.
acdAddress - The Address which the Agent logs into.
initialState - The initial state of the Agent.
agentID - The Agent's string identification.
password - The string password which authorizes the application to log in as an Agent.
Returns:
An Agent representing the association between this AgentTerminal and the ACDAddress.
Throws:
ResourceUnavailableException - An internal resource necessary for adding the Agent to this Terminal and ACDAddress is unavailable.
InvalidArgumentException - An argument provided is not valid either by not providing enough information for addAgent() or is inconsistent with another argument.
InvalidStateException - Either the provider is not in service or the AgentTerminal is not in a state in which it can be logged into the ACDAddress.
Since:
JTAPI v1.2

removeAgent

public void removeAgent(Agent agent)
                 throws InvalidArgumentException,
                        InvalidStateException
Removes a previously added Agent from this AgentTerminal. This method returns when the Agent is logged out of the ACDAddress and the state of the Agent moves to Agent.LOG_OUT.

Pre-Conditions

  1. this.getProvider().getState() == Provider.IN_SERVICE
  2. agent is an element of this.getAgents()
Post-Conditions
  1. this.getProvider().getState() == Provider.IN_SERVICE
  2. agent is not an element of this.getAgents()
  3. agent.getState() == Agent.LOG_OUT
  4. AgentTermLoggedOffEv and ACDAddrLoggedOffEv is delivered for the Agent.
Parameters:
agent - The Agent to be removed and logged out.
Throws:
InvalidArgumentException - The Agent given is not valid.
InvalidStateException - Either the provider is not in service or the AgentTerminal is not in a state in which it can be logged out of the ACDAddress.
Since:
JTAPI v1.2
See Also:
AgentTermLoggedOffEv, AgentTermLoggedOnEv

getAgents

public Agent[] getAgents()
Returns an array of Agents current associated with this Terminal. This method returns null is no Agents exist. Agents are reported via this method once they are added via the addAgent() method until they are removed via the removeAgent() method defined on this interface.

Returns:
A list of Agents associated with this Terminal.

setAgents

public void setAgents(Agent[] agents)
               throws MethodNotSupportedException
Deprecated. Since JTAPI v1.2. Has been replaced with addAgent() and removeAgent()

Sets the current list of Agents on this Terminal. This method may remove Agents previously on this Terminal. When this method is finished, the set of Agents on this Terminal will be the given array.

Note: This method has been removed for JTAPI v1.2 and later. It has been replaced with the AgentTerminal.addAgent() and AgentTerminal.removeAgent() methods. This method should now always throw MethodNotSupportedException.

Parameters:
agents - The array of Agents to be either added, removed, or changed.
Throws:
MethodNotSupportedException - This exception should always be thrown for JTAPI v1.2 and later.

JSR-043: JTAPI-1.4

Send comments to: JSR-43@ectf.org