|
Asterisk-Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.asteriskjava.fastagi.internal.AgiReplyImpl
public class AgiReplyImpl
Default implementation of the AgiReply interface.
Field Summary |
---|
Fields inherited from interface org.asteriskjava.fastagi.reply.AgiReply |
---|
SC_DEAD_CHANNEL, SC_INVALID_COMMAND_SYNTAX, SC_INVALID_OR_UNKNOWN_COMMAND, SC_SUCCESS |
Method Summary | |
---|---|
java.lang.String |
getAttribute(java.lang.String name)
Returns an additional attribute contained in the reply. |
protected java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
|
java.lang.String |
getExtra()
Returns the text in parenthesis contained in this reply. |
java.lang.String |
getFirstLine()
Returns the first line of the raw reply. |
java.util.List<java.lang.String> |
getLines()
Returns a List containing the lines of the raw reply. |
java.lang.String |
getResult()
Returns the result, that is the part directly following the "result=" string. |
int |
getResultCode()
Returns the return code (the result as int). |
char |
getResultCodeAsChar()
Returns the return code as character. |
int |
getStatus()
Returns the status code. |
java.lang.String |
getSynopsis()
Returns the synopsis of the command sent if Asterisk expected a different syntax (getStatus() == SC_INVALID_COMMAND_SYNTAX). |
java.lang.String |
getUsage()
Returns the usage of the command sent if Asterisk expected a different syntax (getStatus() == SC_INVALID_COMMAND_SYNTAX). |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public java.lang.String getFirstLine()
AgiReply
getFirstLine
in interface AgiReply
public java.util.List<java.lang.String> getLines()
AgiReply
getLines
in interface AgiReply
public int getResultCode()
AgiReply
getResultCode
in interface AgiReply
public char getResultCodeAsChar()
AgiReply
getResultCodeAsChar
in interface AgiReply
public java.lang.String getResult()
AgiReply
getResult
in interface AgiReply
public int getStatus()
AgiReply
Supported status codes are:
getStatus
in interface AgiReply
AgiReply.SC_SUCCESS
,
AgiReply.SC_INVALID_OR_UNKNOWN_COMMAND
,
AgiReply.SC_DEAD_CHANNEL
,
AgiReply.SC_INVALID_COMMAND_SYNTAX
public java.lang.String getAttribute(java.lang.String name)
AgiReply
For example the reply to the StreamFileCommand contains an additional endpos attribute indicating the frame where the playback was stopped. This can be retrieved by calling getAttribute("endpos") on the corresponding reply.
getAttribute
in interface AgiReply
name
- the name of the attribute to retrieve. The name is case
insensitive.
null
if it is not
set.protected java.util.Map<java.lang.String,java.lang.String> getAttributes()
public java.lang.String getExtra()
AgiReply
The meaning of this property depends on the command sent. Sometimes it contains a flag like "timeout" or "hangup" or - in case of the GetVariableCommand - the value of the variable.
getExtra
in interface AgiReply
null
if not set.public java.lang.String getSynopsis()
AgiReply
getSynopsis
in interface AgiReply
null
if there
were no syntax errors.public java.lang.String getUsage()
getUsage
in interface AgiReply
null
if there were
no syntax errors.public java.lang.String toString()
toString
in class java.lang.Object
|
Asterisk-Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |