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 981 2008-02-14 03:44:49Z 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 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.
 void setChannel(java.lang.String channel)
          Sets the name of the 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 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.

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

Asterisk-Java

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