net.sf.asterisk.manager.action
Class AgentLogoffAction

java.lang.Object
  extended by net.sf.asterisk.manager.action.AbstractManagerAction
      extended by net.sf.asterisk.manager.action.AgentLogoffAction
All Implemented Interfaces:
java.io.Serializable, ManagerAction

public class AgentLogoffAction
extends AbstractManagerAction

The AgentLogoffAction sets an agent as no longer logged in.
Available since Asterisk 1.2

Since:
0.2
Version:
$Id: AgentLogoffAction.java,v 1.4 2005/08/26 21:58:48 srt Exp $
Author:
srt
See Also:
Serialized Form

Constructor Summary
AgentLogoffAction()
          Creates a new empty AgentLogoffAction.
AgentLogoffAction(java.lang.String agent)
          Creates a new AgentLogoffAction that logs off the given agent
AgentLogoffAction(java.lang.String agent, java.lang.Boolean soft)
          Creates a new AgentLogoffAction that logs off the given agent
 
Method Summary
 java.lang.String getAction()
          Returns the name of this action, i.e.
 java.lang.String getAgent()
          Returns the name of the agent to log off, for example "1002".
 java.lang.Boolean getSoft()
          Returns whether to hangup existing calls or not.
Default is to hangup existing calls on logoff.
 void setAgent(java.lang.String agent)
          Sets the name of the agent to log off, for example "1002".
This is property is mandatory.
 void setSoft(java.lang.Boolean soft)
          Sets whether existing calls should be hung up or not.
Default is to hangup existing calls on logoff.
 
Methods inherited from class net.sf.asterisk.manager.action.AbstractManagerAction
getActionId, setActionId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AgentLogoffAction

public AgentLogoffAction()
Creates a new empty AgentLogoffAction.


AgentLogoffAction

public AgentLogoffAction(java.lang.String agent)
Creates a new AgentLogoffAction that logs off the given agent

Parameters:
agent - the name of the agent to log off.

AgentLogoffAction

public AgentLogoffAction(java.lang.String agent,
                         java.lang.Boolean soft)
Creates a new AgentLogoffAction that logs off the given agent

Parameters:
agent - the name of the agent to log off.
soft - Boolean.TRUE if exisiting calls should not be hung up on logout.
Method Detail

getAction

public java.lang.String getAction()
Returns the name of this action, i.e. "AgentLogoff".

Specified by:
getAction in interface ManagerAction
Specified by:
getAction in class AbstractManagerAction
Returns:
the name of this action

getAgent

public java.lang.String getAgent()
Returns the name of the agent to log off, for example "1002".

Returns:
the name of the agent to log off

setAgent

public void setAgent(java.lang.String agent)
Sets the name of the agent to log off, for example "1002".
This is property is mandatory.

Parameters:
agent - the name of the agent to log off

getSoft

public java.lang.Boolean getSoft()
Returns whether to hangup existing calls or not.
Default is to hangup existing calls on logoff.

Returns:
Boolean.TRUE if existing calls should not be hung up, Boolean.FALSE otherwise. null if default should be used.

setSoft

public void setSoft(java.lang.Boolean soft)
Sets whether existing calls should be hung up or not.
Default is to hangup existing calls on logoff.

Parameters:
soft - Boolean.TRUE if existing calls should not be hung up, Boolean.FALSE otherwise. null if default should be used.


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