net.sf.asterisk.manager.event
Class AgentsEvent

java.lang.Object
  extended by java.util.EventObject
      extended by net.sf.asterisk.manager.event.ManagerEvent
          extended by net.sf.asterisk.manager.event.ResponseEvent
              extended by net.sf.asterisk.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,v 1.1 2005/07/15 19:01:33 srt Exp $
Author:
srt
See Also:
AgentsAction, Serialized Form

Field Summary
 
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.
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.
 java.lang.String getTalkingTo()
          Returns the numerical Caller*ID 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.
 
Methods inherited from class net.sf.asterisk.manager.event.ResponseEvent
getActionId, getInternalActionId, setActionId, setInternalActionId
 
Methods inherited from class net.sf.asterisk.manager.event.ManagerEvent
getDateReceived, getPrivilege, setDateReceived, setPrivilege, 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
 

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

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


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