Asterisk-Java

org.asteriskjava.manager.event
Class StatusEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.asteriskjava.manager.event.ManagerEvent
          extended by org.asteriskjava.manager.event.ResponseEvent
              extended by org.asteriskjava.manager.event.StatusEvent
All Implemented Interfaces:
java.io.Serializable

public class StatusEvent
extends ResponseEvent

A StatusEvent is triggered for each active channel in response to a StatusAction.

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

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
StatusEvent(java.lang.Object source)
           
 
Method Summary
 java.lang.String getAccount()
          Deprecated. since 1.0.0, use getAccountCode() instead.
 java.lang.String getAccountCode()
          Returns the account code of this channel.
 java.lang.String getBridgedChannel()
          Returns the name of the linked channel if this channel is bridged.
 java.lang.String getBridgedUniqueId()
          Returns the unique id of the linked channel if this channel is bridged.
 java.lang.String getCallerId()
          Deprecated.  
 java.lang.String getCallerIdName()
          Returns the Caller*ID Name of this channel.
 java.lang.String getCallerIdNum()
          Returns the Caller*ID Number of this channel.
 java.lang.String getChannel()
          Returns the name of this channel.
 java.lang.Integer getChannelState()
          Returns the state of the channel.
 java.lang.String getChannelStateDesc()
          Returns the state of the channel as a descriptive text.
 java.lang.String getContext()
           
 java.lang.String getExtension()
           
 java.lang.String getLink()
          Deprecated. as of 1.0.0, use getBridgedChannel() instead.
 java.lang.Integer getPriority()
           
 java.lang.Integer getSeconds()
          Returns the number of elapsed seconds.
 java.lang.String getState()
          Deprecated. use getChannelStateDesc() instead.
 java.lang.String getUniqueId()
          Returns the unique id of this channel.
 java.util.Map<java.lang.String,java.lang.String> getVariables()
          Returns the channel variables if the StatusAction.setVariables(String) property has been set.
 void setAccount(java.lang.String account)
          Sets the account code of this channel.
 void setAccountCode(java.lang.String accountCode)
          Sets the account code of this channel.
 void setBridgedChannel(java.lang.String bridgedChannel)
          Sets the name of the linked channel.
 void setBridgedUniqueId(java.lang.String bridgedUniqueId)
          Sets the unique id of the linked channel if this channel is bridged.
 void setCallerId(java.lang.String callerIdNum)
          Sets the Caller*ID Number of this channel.
 void setCallerIdName(java.lang.String callerIdName)
          Sets the Caller*ID Name of this channel.
 void setCallerIdNum(java.lang.String callerIdNum)
          Sets the Caller*ID Number of this channel.
 void setChannel(java.lang.String channel)
          Sets the name of this channel.
 void setChannelState(java.lang.Integer channelState)
          Sets the state of the channel.
 void setChannelStateDesc(java.lang.String channelStateDesc)
           
 void setContext(java.lang.String context)
           
 void setExtension(java.lang.String extension)
           
 void setLink(java.lang.String link)
          Sets the name of the linked channel.
 void setPriority(java.lang.Integer priority)
           
 void setSeconds(java.lang.Integer seconds)
          Sets the number of elapsed seconds.
 void setState(java.lang.String state)
           
 void setUniqueId(java.lang.String uniqueId)
          Sets the unique id of this channel.
 void setVariables(java.util.Map<java.lang.String,java.lang.String> variables)
          Sets the channel variables.
 
Methods inherited from class org.asteriskjava.manager.event.ResponseEvent
getActionId, getInternalActionId, setActionId, setInternalActionId
 
Methods inherited from class org.asteriskjava.manager.event.ManagerEvent
getDateReceived, getPrivilege, getServer, getTimestamp, setDateReceived, setPrivilege, setServer, setTimestamp, 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

StatusEvent

public StatusEvent(java.lang.Object source)
Method Detail

getChannel

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

Returns:
the name of this channel.

setChannel

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

Parameters:
channel - the name of this channel.

getCallerId

public java.lang.String getCallerId()
Deprecated. 

Returns the Caller*ID Number of this channel.

This property is deprecated as of Asterisk 1.4, use getCallerIdNum() instead.

Returns:
the Caller*ID Number of this channel or null if none is available.

setCallerId

public void setCallerId(java.lang.String callerIdNum)
Sets the Caller*ID Number of this channel.

This property is deprecated as of Asterisk 1.4.

Parameters:
callerIdNum - the Caller*ID Number to set.

getCallerIdNum

public java.lang.String getCallerIdNum()
Returns the Caller*ID Number of this channel.

Returns:
the Caller*ID Number of this channel or null if none is available.
Since:
0.3

setCallerIdNum

public void setCallerIdNum(java.lang.String callerIdNum)
Sets the Caller*ID Number of this channel.

Parameters:
callerIdNum - the Caller*ID Number to set.
Since:
0.3

getCallerIdName

public java.lang.String getCallerIdName()
Returns the Caller*ID Name of this channel.

Returns:
the Caller*ID Name of this channel or null if none is available.

setCallerIdName

public void setCallerIdName(java.lang.String callerIdName)
Sets the Caller*ID Name of this channel.

Parameters:
callerIdName - the Caller*ID Name of this channel.

getAccountCode

public java.lang.String getAccountCode()
Returns the account code of this channel.

Returns:
the account code of this channel.
Since:
1.0.0

setAccountCode

public void setAccountCode(java.lang.String accountCode)
Sets the account code of this channel.

Parameters:
accountCode - the account code of this channel.
Since:
1.0.0

getAccount

public java.lang.String getAccount()
Deprecated. since 1.0.0, use getAccountCode() instead.

Returns the account code of this channel.

Returns:
the account code of this channel.

setAccount

public void setAccount(java.lang.String account)
Sets the account code of this channel.

Asterisk versions up to 1.4 use the "Account" property instead of "AccountCode".

Parameters:
account - the account code of this channel.

getChannelState

public java.lang.Integer getChannelState()
Returns the state of the channel.

For Asterisk versions prior to 1.6 (that do not send the numeric value) it is derived from the descriptive text.

Returns:
the state of the channel.
Since:
1.0.0

setChannelState

public void setChannelState(java.lang.Integer channelState)
Sets the state of the channel.

Parameters:
channelState - the state of the channel.
Since:
1.0.0

getChannelStateDesc

public java.lang.String getChannelStateDesc()
Returns the state of the channel as a descriptive text.

Returns:
the state of the channel as a descriptive text.
Since:
1.0.0

setChannelStateDesc

public void setChannelStateDesc(java.lang.String channelStateDesc)

getState

public java.lang.String getState()
Deprecated. use getChannelStateDesc() instead.

Returns the state of the channel as a descriptive text.

Returns:
the state of the channel as a descriptive text.

setState

public void setState(java.lang.String state)

getContext

public java.lang.String getContext()

setContext

public void setContext(java.lang.String context)

getExtension

public java.lang.String getExtension()

setExtension

public void setExtension(java.lang.String extension)

getPriority

public java.lang.Integer getPriority()

setPriority

public void setPriority(java.lang.Integer priority)

getSeconds

public java.lang.Integer getSeconds()
Returns the number of elapsed seconds.

Returns:
the number of elapsed seconds.

setSeconds

public void setSeconds(java.lang.Integer seconds)
Sets the number of elapsed seconds.

Parameters:
seconds - the number of elapsed seconds.

getBridgedChannel

public java.lang.String getBridgedChannel()
Returns the name of the linked channel if this channel is bridged.

Returns:
the name of the linked channel if this channel is bridged.
Since:
1.0.0

setBridgedChannel

public void setBridgedChannel(java.lang.String bridgedChannel)
Sets the name of the linked channel.

Parameters:
bridgedChannel - the name of the linked channel if this channel is bridged.
Since:
1.0.0

getLink

public java.lang.String getLink()
Deprecated. as of 1.0.0, use getBridgedChannel() instead.

Returns the name of the linked channel if this channel is bridged.

Returns:
the name of the linked channel if this channel is bridged.

setLink

public void setLink(java.lang.String link)
Sets the name of the linked channel.

Asterisk versions up to 1.4 use "Link" instead of "BridgedChannel".

Parameters:
link - the name of the linked channel if this channel is bridged.

getBridgedUniqueId

public java.lang.String getBridgedUniqueId()
Returns the unique id of the linked channel if this channel is bridged.

Available since Asterisk 1.6.

Returns:
the unique id of the linked channel if this channel is bridged.
Since:
1.0.0

setBridgedUniqueId

public void setBridgedUniqueId(java.lang.String bridgedUniqueId)
Sets the unique id of the linked channel if this channel is bridged.

Available since Asterisk 1.6.

Parameters:
bridgedUniqueId - the unique id of the linked channel if this channel is bridged.
Since:
1.0.0

getUniqueId

public java.lang.String getUniqueId()
Returns the unique id of this channel.

Returns:
the unique id of this channel.

setUniqueId

public void setUniqueId(java.lang.String uniqueId)
Sets the unique id of this channel.

Parameters:
uniqueId - the unique id of this channel.

getVariables

public java.util.Map<java.lang.String,java.lang.String> getVariables()
Returns the channel variables if the StatusAction.setVariables(String) property has been set.

Available since Asterisk 1.6

Returns:
the channel variables.
Since:
1.0.0

setVariables

public void setVariables(java.util.Map<java.lang.String,java.lang.String> variables)
Sets the channel variables.

Available since Asterisk 1.6

Parameters:
variables - the channel variables.
Since:
1.0.0

Asterisk-Java

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