|
Asterisk-Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
org.asteriskjava.manager.event.ManagerEvent
org.asteriskjava.manager.event.ResponseEvent
org.asteriskjava.manager.event.AsyncAgiEvent
public class AsyncAgiEvent
The following sub events are reported:
AgiAction
has finished.res/res_agi.c
.
Available since Asterisk 1.6
AgiAction
,
Serialized FormField Summary | |
---|---|
static java.lang.String |
SUB_EVENT_END
|
static java.lang.String |
SUB_EVENT_EXEC
|
static java.lang.String |
SUB_EVENT_START
|
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
AsyncAgiEvent(java.lang.Object source)
Creates a new AsyncAgiEvent. |
Method Summary | |
---|---|
java.util.List<java.lang.String> |
decodeEnv()
Decodes the AGI environment and returns a list of lines. |
java.util.List<java.lang.String> |
decodeResult()
Decodes the result. |
java.lang.String |
getChannel()
Returns the name of the channel this event occurred on. |
java.lang.String |
getCommandId()
Returns the command id of the corresponding AgiAction . |
java.lang.String |
getEnv()
Returns the raw AGI environment similar to the AGI request for FastAGI. |
java.lang.String |
getResult()
Returns the raw result of a command execution in response to the corresponding AgiAction . |
java.lang.String |
getSubEvent()
Returns the sub event type. |
boolean |
isEnd()
Checks is this an end sub event. |
boolean |
isExec()
Checks is this an exec sub event. |
boolean |
isStart()
Checks is this a start sub event. |
protected boolean |
isSubEvent(java.lang.String subEvent)
|
void |
setChannel(java.lang.String channel)
Sets the name of the channel this event occurred on. |
void |
setCommandId(java.lang.String commandId)
Sets the command id. |
void |
setEnv(java.lang.String env)
Sets the AGI environment. |
void |
setResult(java.lang.String result)
Sets the raw result. |
void |
setSubEvent(java.lang.String subEvent)
Sets the sub event type. |
Methods inherited from class org.asteriskjava.manager.event.ResponseEvent |
---|
getActionId, getInternalActionId, setActionId, setInternalActionId |
Methods inherited from class org.asteriskjava.manager.event.ManagerEvent |
---|
appendPropertyIfNotNull, getDateReceived, getFile, getFunc, getLine, getPrivilege, getSequenceNumber, getServer, getTimestamp, setDateReceived, setFile, setFunc, setLine, setPrivilege, setSequenceNumber, 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 |
Field Detail |
---|
public static final java.lang.String SUB_EVENT_START
public static final java.lang.String SUB_EVENT_EXEC
public static final java.lang.String SUB_EVENT_END
Constructor Detail |
---|
public AsyncAgiEvent(java.lang.Object source)
source
- Method Detail |
---|
public java.lang.String getChannel()
public void setChannel(java.lang.String channel)
channel
- the name of the channel this event occurred on.public java.lang.String getSubEvent()
public void setSubEvent(java.lang.String subEvent)
subEvent
- the sub event type.public java.lang.String getCommandId()
AgiAction
.This property is only available for the "Exec" sub event.
AgiAction.setCommandId(String)
public void setCommandId(java.lang.String commandId)
commandId
- the command id.public java.lang.String getResult()
AgiAction
.This property is only available for the "Exec" sub event.
The result is URL encoded and ends with a newline ("\n").
Example:
200%20result%3d0
public java.util.List<java.lang.String> decodeResult()
public void setResult(java.lang.String result)
result
- the URL encoded result.public java.lang.String getEnv()
This property is only available for the "Start" sub event.
The environment is passed in multiple lines (separated by "\n"). Each line is URL encoded and contains a key and a value. The environment ends with two newline characters ("\n\n").
Example:
... agi_channel%3a%20IAX2%2fpbx0-1 agi_language%3a%20de agi_type%3a%20IAX2 agi_uniqueid%3a%201201838738.19 agi_version%3a%201.6.0-beta1 ...
public java.util.List<java.lang.String> decodeEnv()
getEnv()
returns null
).getEnv()
public void setEnv(java.lang.String env)
env
- the URL encoded AGI environment.public boolean isStart()
true
if this is a "Start" sub event, false
otherwise.public boolean isExec()
true
if this is an "Exec" sub event, false
otherwise.public boolean isEnd()
true
if this is an "End" sub event, false
otherwise.protected boolean isSubEvent(java.lang.String subEvent)
|
Asterisk-Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |