Asterisk-Java

org.asteriskjava.manager.event
Class AgentsEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.asteriskjava.manager.event.ManagerEvent
          extended by org.asteriskjava.manager.event.ResponseEvent
              extended by org.asteriskjava.manager.event.AgentsEvent
All Implemented Interfaces:
java.io.Serializable

public class AgentsEvent
extends ResponseEvent

An AgentsEvent is triggered for each agent in response to an AgentsAction.

Available since Asterisk 1.2

Since:
0.2
Version:
$Id: AgentsEvent.java 1076 2008-06-23 03:25:29Z srt $
Author:
srt
See Also:
AgentsAction, Serialized Form

Field Summary
static java.lang.String AGENT_STATUS_IDLE
          Agent is logged in and waiting for call.
static java.lang.String AGENT_STATUS_LOGGEDOFF
          Agent isn't logged in.
static java.lang.String AGENT_STATUS_ONCALL
          Agent is logged in and on a call.
static java.lang.String AGENT_STATUS_UNKNOWN
          Don't know anything about agent.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
AgentsEvent(java.lang.Object source)
           
 
Method Summary
 java.lang.String getAgent()
          Returns the agentid.
 java.lang.String getLoggedInChan()
          Returns the name of channel this agent logged in from.
 java.lang.Long getLoggedInTime()
          Returns the time (in seconds since 01/01/1970) when the agent logged in.
 java.lang.String getName()
          Returns the name of this agent.
 java.lang.String getStatus()
          Returns the status of this agent.
 java.lang.String getTalkingTo()
          Returns the numerical Caller*ID of the channel this agent is talking to.
 java.lang.String getTalkingToChan()
          Returns the name of the channel this agent is talking to.
 void setAgent(java.lang.String agent)
          Sets the agentid.
 void setLoggedInChan(java.lang.String loggedInChan)
          Sets the name of channel this agent logged in from.
 void setLoggedInTime(java.lang.Long loggedInTime)
          Sets the time when the agent logged in.
 void setName(java.lang.String name)
          Sets the name of this agent.
 void setStatus(java.lang.String status)
          Sets the status of this agent.
 void setTalkingTo(java.lang.String talkingTo)
          Sets the numerical Caller*ID of the channel this agent is talking to.
 void setTalkingToChan(java.lang.String talkingToChan)
           
 
Methods inherited from class org.asteriskjava.manager.event.ResponseEvent
getActionId, getInternalActionId, setActionId, setInternalActionId
 
Methods inherited from class org.asteriskjava.manager.event.ManagerEvent
appendPropertyIfNotNull, getDateReceived, getFile, getFunc, getLine, getPrivilege, getSequenceNumber, getServer, getTimestamp, setDateReceived, setFile, setFunc, setLine, setPrivilege, setSequenceNumber, setServer, setTimestamp, toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AGENT_STATUS_LOGGEDOFF

public static final java.lang.String AGENT_STATUS_LOGGEDOFF
Agent isn't logged in.

See Also:
Constant Field Values

AGENT_STATUS_IDLE

public static final java.lang.String AGENT_STATUS_IDLE
Agent is logged in and waiting for call.

See Also:
Constant Field Values

AGENT_STATUS_ONCALL

public static final java.lang.String AGENT_STATUS_ONCALL
Agent is logged in and on a call.

See Also:
Constant Field Values

AGENT_STATUS_UNKNOWN

public static final java.lang.String AGENT_STATUS_UNKNOWN
Don't know anything about agent. Shouldn't ever get this.

See Also:
Constant Field Values
Constructor Detail

AgentsEvent

public AgentsEvent(java.lang.Object source)
Parameters:
source -
Method Detail

getAgent

public java.lang.String getAgent()
Returns the agentid.


setAgent

public void setAgent(java.lang.String agent)
Sets the agentid.


getName

public java.lang.String getName()
Returns the name of this agent.

Returns:
the name of this agent

setName

public void setName(java.lang.String name)
Sets the name of this agent.

Parameters:
name - the name of this agent

getStatus

public java.lang.String getStatus()
Returns the status of this agent.

This is one of

"AGENT_LOGGEDOFF"
Agent isn't logged in
"AGENT_IDLE"
Agent is logged in and waiting for call
"AGENT_ONCALL"
Agent is logged in and on a call
"AGENT_UNKNOWN"
Don't know anything about agent. Shouldn't ever get this.

Returns:
the status of this agent
See Also:
AGENT_STATUS_LOGGEDOFF, AGENT_STATUS_IDLE, AGENT_STATUS_ONCALL, AGENT_STATUS_UNKNOWN

setStatus

public void setStatus(java.lang.String status)
Sets the status of this agent.

Parameters:
status - the status of this agent

getLoggedInChan

public java.lang.String getLoggedInChan()
Returns the name of channel this agent logged in from.

Returns:
the name of the channel this agent logged in from or "n/a" if the agent is not logged in.

setLoggedInChan

public void setLoggedInChan(java.lang.String loggedInChan)
Sets the name of channel this agent logged in from.

Parameters:
loggedInChan - the name of channel this agent logged in from

getLoggedInTime

public java.lang.Long getLoggedInTime()
Returns the time (in seconds since 01/01/1970) when the agent logged in.

Returns:
the time when the agent logged in or 0 if the user is not logged in.

setLoggedInTime

public void setLoggedInTime(java.lang.Long loggedInTime)
Sets the time when the agent logged in.

Parameters:
loggedInTime - the time when the agent logged in

getTalkingTo

public java.lang.String getTalkingTo()
Returns the numerical Caller*ID of the channel this agent is talking to.

Returns:
the numerical Caller*ID of the channel this agent is talking to or "n/a" if this agent is talking to nobody.

setTalkingTo

public void setTalkingTo(java.lang.String talkingTo)
Sets the numerical Caller*ID of the channel this agent is talking to.

Parameters:
talkingTo - the numerical Caller*ID of the channel this agent is talking to

getTalkingToChan

public java.lang.String getTalkingToChan()
Returns the name of the channel this agent is talking to.

Available since Asterisk 1.6.

Returns:
the name of the channel this agent is talking to.
Since:
1.0.0

setTalkingToChan

public void setTalkingToChan(java.lang.String talkingToChan)

Asterisk-Java

Copyright © 2004-2009 Stefan Reuter. All Rights Reserved.