|
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 AgiReplypublic java.util.List<java.lang.String> getLines()
AgiReply
getLines in interface AgiReplypublic int getResultCode()
AgiReply
getResultCode in interface AgiReplypublic char getResultCodeAsChar()
AgiReply
getResultCodeAsChar in interface AgiReplypublic java.lang.String getResult()
AgiReply
getResult in interface AgiReplypublic int getStatus()
AgiReplySupported status codes are:
getStatus in interface AgiReplyAgiReply.SC_SUCCESS,
AgiReply.SC_INVALID_OR_UNKNOWN_COMMAND,
AgiReply.SC_DEAD_CHANNEL,
AgiReply.SC_INVALID_COMMAND_SYNTAXpublic java.lang.String getAttribute(java.lang.String name)
AgiReplyFor 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 AgiReplyname - 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()
AgiReplyThe 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 AgiReplynull if not set.public java.lang.String getSynopsis()
AgiReply
getSynopsis in interface AgiReplynull if there
were no syntax errors.public java.lang.String getUsage()
getUsage in interface AgiReplynull 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 | |||||||||