|
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.AgiExecEvent
public class AgiExecEvent
AgiExecEvents are triggered when an AGI command is executed. For each command two events are triggered: one before excution ("Start") and one after execution ("End").
The following sub events are reported:res/res_agi.c
.
Available since Asterisk 1.6
Field Summary | |
---|---|
static java.lang.String |
SUB_EVENT_END
Execution of an AGI command has finished. |
static java.lang.String |
SUB_EVENT_START
Execution of an AGI command has started. |
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
AgiExecEvent(java.lang.Object source)
Creates a new AgiExecEvent. |
Method Summary | |
---|---|
java.lang.String |
getChannel()
Returns the name of the channel this event occurred on. |
java.lang.String |
getCommand()
Returns the AGI command. |
java.lang.String |
getCommandId()
Returns the command id. |
java.lang.String |
getResult()
Returns the result as a string. |
java.lang.Integer |
getResultCode()
Returns the result code. |
java.lang.String |
getSubEvent()
Returns the sub event type. |
boolean |
isEnd()
Checks is this an end sub event. |
boolean |
isStart()
Checks is this a start sub event. |
void |
setChannel(java.lang.String channel)
Sets the name of the channel this event occurred on. |
void |
setCommand(java.lang.String command)
Sets the AGI command. |
void |
setCommandId(java.lang.String commandId)
Sets the command id. |
void |
setResult(java.lang.String result)
Sets the string respresentation of the result. |
void |
setResultCode(java.lang.Integer resultCode)
Sets the result code. |
void |
setSubEvent(java.lang.String subEvent)
Sets the sub event type. |
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_END
Constructor Detail |
---|
public AgiExecEvent(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()
SUB_EVENT_START
,
SUB_EVENT_END
public void setSubEvent(java.lang.String subEvent)
subEvent
- the sub event type.public java.lang.String getCommandId()
public void setCommandId(java.lang.String commandId)
commandId
- the command id.public java.lang.String getCommand()
public void setCommand(java.lang.String command)
command
- the AGI command.public java.lang.Integer getResultCode()
public void setResultCode(java.lang.Integer resultCode)
resultCode
- the result code.public java.lang.String getResult()
They correspond to the numeric values returned by getResultCode()
. Usually you will want to
stick with the numeric values.
Possible values are:
public void setResult(java.lang.String result)
result
- a string respresentation of the result.public boolean isStart()
true
if this is a "Start" sub event, false
otherwise.public boolean isEnd()
true
if this is an "End" sub event, false
otherwise.
|
Asterisk-Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |