|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectthings.thinger.service.local.CLIServiceTools
public class CLIServiceTools
Static tools for dealing with CLIService data. These can be used outside the server itself.
Version History
EPG - Initial - 1 SEP 07
Nested Class Summary | |
---|---|
static class |
CLIServiceTools.Responses
The specific responses. |
static class |
CLIServiceTools.Result
The classification of responses. |
Field Summary | |
---|---|
static java.lang.String |
RESPONSE_LEADER
|
static java.lang.String |
RESPONSE_MULTI_SEPERATOR
|
static java.lang.String |
RESPONSE_SINGLE_SEPERATOR
|
static char |
RESPONSE_TOKEN_SEPERATOR
|
Constructor Summary | |
---|---|
CLIServiceTools()
|
Method Summary | |
---|---|
static java.lang.String |
getCommandNameFromResponse(java.lang.String responseString)
Get the Command Name from the response. |
static java.lang.String |
getCompleteResponse(CommandResponse.CompletionDisposition cd,
java.lang.String commandName,
Receipt finalReceipt,
java.lang.String text,
java.lang.String additional)
Get a complete response string. |
static Receipt.Type |
getReceiptFromResponse(java.lang.String responseString)
Get the Receipt Type from the response. |
static CLIServiceTools.Responses |
getResponse(CommandResponse.CompletionDisposition cd)
Get the appropriate response given the disposition. |
static CLIServiceTools.Result |
getResultFromResponse(java.lang.String responseString)
Get the Result from the response. |
static java.lang.String |
getTextFromResponse(java.lang.String responseString)
Get the Receipt Type from the response. |
static boolean |
isResponseOkAndComplete(java.lang.String responseString)
Is the command response indicate it's complete and ok. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final char RESPONSE_TOKEN_SEPERATOR
public static final java.lang.String RESPONSE_SINGLE_SEPERATOR
public static final java.lang.String RESPONSE_MULTI_SEPERATOR
public static final java.lang.String RESPONSE_LEADER
Constructor Detail |
---|
public CLIServiceTools()
Method Detail |
---|
public static CLIServiceTools.Responses getResponse(CommandResponse.CompletionDisposition cd)
cd
- the complesion disposition.
public static java.lang.String getCompleteResponse(CommandResponse.CompletionDisposition cd, java.lang.String commandName, Receipt finalReceipt, java.lang.String text, java.lang.String additional)
cd
- the completion disposition.commandName
- the textual command namefinalReceipt
- the final receipt. It can be null.text
- the text message. It can be null.additional
- any additional response text. It cna be null.
public static boolean isResponseOkAndComplete(java.lang.String responseString)
responseString
- the response string.
public static java.lang.String getCommandNameFromResponse(java.lang.String responseString)
responseString
- the string to examine.
public static CLIServiceTools.Result getResultFromResponse(java.lang.String responseString)
responseString
- the string to examine.
public static Receipt.Type getReceiptFromResponse(java.lang.String responseString)
responseString
- the string to examine.
Receipt
public static java.lang.String getTextFromResponse(java.lang.String responseString)
responseString
- the string to examine.
Receipt
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |