Asterisk-Java

org.asteriskjava.manager.action
Class StatusAction

java.lang.Object
  extended by org.asteriskjava.manager.action.AbstractManagerAction
      extended by org.asteriskjava.manager.action.StatusAction
All Implemented Interfaces:
java.io.Serializable, EventGeneratingAction, ManagerAction

public class StatusAction
extends AbstractManagerAction
implements EventGeneratingAction

The StatusAction requests the state of all active channels. Alternativly (as of Asterisk 1.6) you can also pass a channel name to only retrive the status of one specific channel.

For each active channel a StatusEvent is generated. After the state of all channels has been reported a StatusCompleteEvent is generated.

Version:
$Id: StatusAction.java 1173 2008-09-22 23:39:41Z srt $
Author:
srt
See Also:
StatusEvent, StatusCompleteEvent, Serialized Form

Constructor Summary
StatusAction()
          Creates a new StatusAction that retrieves the status of all channels.
StatusAction(java.lang.String channel)
          Creates a new StatusAction that retrieves the status of the given channel.
 
Method Summary
 java.lang.String getAction()
          Returns the name of this action, i.e.
 java.lang.Class<? extends ResponseEvent> getActionCompleteEventClass()
          Returns the event type that indicates that Asterisk is finished sending response events for this action.
 java.lang.String getChannel()
          Returns the name of the channel.
 java.lang.String getVariables()
           
 void setChannel(java.lang.String channel)
          Sets the name of the channel.
 void setVariables(java.util.List<java.lang.String> variables)
          Sets the names of the channel variables to return for each reported channel.
 void setVariables(java.lang.String variables)
          Sets the names of the channel variables to return for each reported channel.
 
Methods inherited from class org.asteriskjava.manager.action.AbstractManagerAction
getActionId, setActionId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.asteriskjava.manager.action.ManagerAction
getActionId, setActionId
 

Constructor Detail

StatusAction

public StatusAction()
Creates a new StatusAction that retrieves the status of all channels.


StatusAction

public StatusAction(java.lang.String channel)
Creates a new StatusAction that retrieves the status of the given channel.

Available since Asterisk 1.6.

Parameters:
channel - name of the channel.
Since:
1.0.0
Method Detail

getAction

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

Specified by:
getAction in interface ManagerAction
Specified by:
getAction in class AbstractManagerAction

getActionCompleteEventClass

public java.lang.Class<? extends ResponseEvent> getActionCompleteEventClass()
Description copied from interface: EventGeneratingAction
Returns the event type that indicates that Asterisk is finished sending response events for this action.

Specified by:
getActionCompleteEventClass in interface EventGeneratingAction
Returns:
a Class that is an instance of ResponseEvent.
See Also:
ResponseEvent

getChannel

public java.lang.String getChannel()
Returns the name of the channel.

Available since Asterisk 1.6.

Returns:
the name of the channel or null for all channels.
Since:
1.0.0

setChannel

public void setChannel(java.lang.String channel)
Sets the name of the channel.

Available since Asterisk 1.6.

Parameters:
channel - the name of the channel or null for all channels.
Since:
1.0.0

getVariables

public java.lang.String getVariables()

setVariables

public void setVariables(java.lang.String variables)
Sets the names of the channel variables to return for each reported channel.

Available since Asterisk 1.6.

Parameters:
variables - comma separated list of variables to return for each reported channel.
Since:
1.0.0
See Also:
StatusEvent.getVariables()

setVariables

public void setVariables(java.util.List<java.lang.String> variables)
Sets the names of the channel variables to return for each reported channel.

Available since Asterisk 1.6.

Parameters:
variables - list of variables to return for each reported channel.
Since:
1.0.0
See Also:
StatusEvent.getVariables()

Asterisk-Java

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