net.sf.asterisk.manager.action
Class GetVarAction

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

public class GetVarAction
extends AbstractManagerAction

The GetVarAction queries for a global or local channel variable.
Reading global variables is supported since Asterisk 1.2.

Version:
$Id: GetVarAction.java,v 1.4 2005/11/02 20:02:37 srt Exp $
Author:
srt
See Also:
Serialized Form

Constructor Summary
GetVarAction()
          Creates a new empty GetVarAction.
GetVarAction(java.lang.String variable)
          Creates a new GetVarAction that queries for the given global variable.
GetVarAction(java.lang.String channel, java.lang.String variable)
          Creates a new GetVarAction that queries for the given local channel variable.
 
Method Summary
 java.lang.String getAction()
          Returns the name of this action, i.e.
 java.lang.String getChannel()
          Returns the name of the channel if you query for a local channel variable or null if it is a global variable.
 java.lang.String getVariable()
          Retruns the name of the variable to query.
 void setChannel(java.lang.String channel)
          Sets the name of the channel if you query for a local channel variable.
 void setVariable(java.lang.String variable)
          Sets the name of the variable to query.
 
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

GetVarAction

public GetVarAction()
Creates a new empty GetVarAction.


GetVarAction

public GetVarAction(java.lang.String variable)
Creates a new GetVarAction that queries for the given global variable.

Parameters:
variable - the name of the global variable to query.
Since:
0.2

GetVarAction

public GetVarAction(java.lang.String channel,
                    java.lang.String variable)
Creates a new GetVarAction that queries for the given local channel variable.

Parameters:
channel - the name of the channel, for example "SIP/1234-9cd".
variable - the name of the variable to query.
Since:
0.2
Method Detail

getAction

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

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

getChannel

public java.lang.String getChannel()
Returns the name of the channel if you query for a local channel variable or null if it is a global variable.


setChannel

public void setChannel(java.lang.String channel)
Sets the name of the channel if you query for a local channel variable. Leave empty to query for a global variable.

Parameters:
channel - the channel if you query for a local channel variable or null to query for a gloabl variable.

getVariable

public java.lang.String getVariable()
Retruns the name of the variable to query.


setVariable

public void setVariable(java.lang.String variable)
Sets the name of the variable to query.



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