|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.war.ctracgts.Response
public class Response
Field Summary | |
---|---|
static java.lang.String |
ERROR
|
static java.lang.String |
JSON_message
|
static java.lang.String |
JSON_success
|
static java.lang.String |
JSON_type
|
static java.lang.String |
OK
|
static java.lang.String |
RESP_ERR_
|
static java.lang.String |
RESP_ERR_ACCOUNT
|
static java.lang.String |
RESP_ERR_COMMAND
|
static java.lang.String |
RESP_ERR_DEVICE
|
static java.lang.String |
RESP_ERR_DEVICE_CMD
|
static java.lang.String |
RESP_ERR_EXPIRED
|
static java.lang.String |
RESP_ERR_GROUP
|
static java.lang.String |
RESP_ERR_INTERNAL
|
static java.lang.String |
RESP_ERR_JSON
|
static java.lang.String |
RESP_ERR_LOGIN
|
static java.lang.String |
RESP_ERR_MESSAGE
|
static java.lang.String |
RESP_ERR_MOBILEID
|
static java.lang.String |
RESP_ERR_NO_GET
|
static java.lang.String |
RESP_ERR_NO_POST
|
static java.lang.String |
RESP_ERR_NO_RTP
|
static java.lang.String |
RESP_ERR_NO_SUPPORT
|
static java.lang.String |
RESP_ERR_NOT_AUTH
|
static java.lang.String |
RESP_ERR_PARK
|
static java.lang.String |
RESP_ERR_SYNTAX
|
static java.lang.String |
RESP_OK_
|
static java.lang.String |
RESP_OK_AUTH
|
static java.lang.String |
RESP_OK_EVENTS
|
static java.lang.String |
RESP_OK_JSON
|
static java.lang.String |
RESP_OK_LOGIN
|
static java.lang.String |
RESP_OK_MESSAGE
|
static java.lang.String |
RESP_OK_MOBILEID
|
static java.lang.String |
RESP_OK_NEWVERS
|
static java.lang.String |
RESP_OK_NOTICE
|
static java.lang.String |
RESP_OK_SUCCESS
|
static java.lang.String |
RESP_OK_UNITS
|
static java.lang.String |
RESP_OK_VERSION
|
static java.lang.String |
TYPE_JSON
|
Constructor Summary | |
---|---|
Response()
|
Method Summary | |
---|---|
static java.lang.String |
AUTH(boolean json,
java.lang.String m)
|
static java.lang.String |
CreateResponse(boolean isJSON,
java.lang.String resp,
RTProperties rtp)
Creates/Returns a Response String |
static java.lang.String |
CreateResponse(boolean isJSON,
java.lang.String resp,
java.lang.String msg)
Creates/Returns a Response String |
static JSON._Object |
CreateResponseJSON(java.lang.String success,
java.lang.String type,
java.lang.String message)
Creates/Returns a Response JSON object |
static java.lang.String |
ERR_ACCOUNT(boolean json,
java.lang.String m)
|
static java.lang.String |
ERR_COMMAND(boolean json,
java.lang.String m)
|
static java.lang.String |
ERR_DEVICE_CMD(boolean json,
java.lang.String m)
|
static java.lang.String |
ERR_DEVICE(boolean json,
java.lang.String m)
|
static java.lang.String |
ERR_EXPIRED(boolean json,
java.lang.String m)
|
static java.lang.String |
ERR_GROUP(boolean json,
java.lang.String m)
|
static java.lang.String |
ERR_INTERNAL(boolean json,
java.lang.String m)
|
static java.lang.String |
ERR_JSON(boolean json,
java.lang.String j)
|
static java.lang.String |
ERR_LOGIN(boolean json,
java.lang.String m)
|
static java.lang.String |
ERR_MESSAGE(boolean json,
java.lang.String m)
|
static java.lang.String |
ERR_MOBILEID(boolean json,
RTProperties m)
|
static java.lang.String |
ERR_NO_GET(boolean json,
java.lang.String m)
|
static java.lang.String |
ERR_NO_POST(boolean json,
java.lang.String m)
|
static java.lang.String |
ERR_NO_RTP(boolean json,
java.lang.String m)
|
static java.lang.String |
ERR_NO_SUPPORT(boolean json,
java.lang.String m)
|
static java.lang.String |
ERR_NOT_AUTH(boolean json,
java.lang.String m)
|
static java.lang.String |
ERR_PARK(boolean json,
java.lang.String m)
|
static java.lang.String |
ERR_SYNTAX(boolean json,
java.lang.String m)
|
static java.lang.String |
EVENTS(boolean json,
RTProperties m)
|
static java.lang.String |
GetMessage(java.lang.String code)
Extracts and returns the text message from the Response Code |
static boolean |
IsError(java.lang.String code)
Returns true if the specified Response Code represents an Error |
static boolean |
IsExpired(java.lang.String resp)
Returns true if the specified Response Code represents an "Expired" error |
static boolean |
IsInternal(java.lang.String resp)
Returns true if the specified Response Code represents an "Internal" error |
static boolean |
IsNoRTP(java.lang.String resp)
Returns true if the specified Response Code represents a "RTP not supported" error |
static boolean |
IsNotAuth(java.lang.String resp)
Returns true if the specified Response Code represents a "Not Authorized" error |
static boolean |
IsOK(java.lang.String code)
Returns true if the specified Response Code represents Success/Ack |
static boolean |
IsResponse(java.lang.String resp,
java.lang.String code)
Returns true if the specified Response starts with the specified Code |
static java.lang.String |
LOGIN(boolean json,
java.lang.String m)
|
static java.lang.String |
MESSAGE(boolean json,
java.lang.String m)
|
static java.lang.String |
MOBILEID(boolean json,
RTProperties m)
|
static java.lang.String |
NEWVERS(boolean json,
RTProperties v)
|
static java.lang.String |
NOTICE(boolean json,
java.lang.String m)
|
static java.lang.String |
OK_JSON(boolean json,
java.lang.String j)
|
static java.lang.String[] |
ParseMessage(java.lang.String code)
Parse and return the Response text into a 3-element array with the following format: "Type", "SubType", "Message" |
static java.lang.String |
SUCCESS(boolean json,
java.lang.String m)
|
static java.lang.String |
UNITS(boolean json,
java.lang.String m)
|
static java.lang.String |
VERSION(boolean json,
RTProperties m)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String OK
public static final java.lang.String ERROR
public static final java.lang.String RESP_OK_
public static final java.lang.String RESP_OK_SUCCESS
public static final java.lang.String RESP_OK_VERSION
public static final java.lang.String RESP_OK_MOBILEID
public static final java.lang.String RESP_OK_LOGIN
public static final java.lang.String RESP_OK_UNITS
public static final java.lang.String RESP_OK_AUTH
public static final java.lang.String RESP_OK_NEWVERS
public static final java.lang.String RESP_OK_NOTICE
public static final java.lang.String RESP_OK_EVENTS
public static final java.lang.String RESP_OK_MESSAGE
public static final java.lang.String RESP_OK_JSON
public static final java.lang.String RESP_ERR_
public static final java.lang.String RESP_ERR_MOBILEID
public static final java.lang.String RESP_ERR_MESSAGE
public static final java.lang.String RESP_ERR_NO_GET
public static final java.lang.String RESP_ERR_NO_POST
public static final java.lang.String RESP_ERR_NO_RTP
public static final java.lang.String RESP_ERR_NOT_AUTH
public static final java.lang.String RESP_ERR_EXPIRED
public static final java.lang.String RESP_ERR_INTERNAL
public static final java.lang.String RESP_ERR_SYNTAX
public static final java.lang.String RESP_ERR_COMMAND
public static final java.lang.String RESP_ERR_LOGIN
public static final java.lang.String RESP_ERR_ACCOUNT
public static final java.lang.String RESP_ERR_DEVICE
public static final java.lang.String RESP_ERR_DEVICE_CMD
public static final java.lang.String RESP_ERR_PARK
public static final java.lang.String RESP_ERR_JSON
public static final java.lang.String RESP_ERR_NO_SUPPORT
public static final java.lang.String RESP_ERR_GROUP
public static final java.lang.String JSON_success
public static final java.lang.String JSON_type
public static final java.lang.String JSON_message
public static final java.lang.String TYPE_JSON
Constructor Detail |
---|
public Response()
Method Detail |
---|
public static java.lang.String VERSION(boolean json, RTProperties m)
public static java.lang.String MOBILEID(boolean json, RTProperties m)
public static java.lang.String EVENTS(boolean json, RTProperties m)
public static java.lang.String MESSAGE(boolean json, java.lang.String m)
public static java.lang.String NOTICE(boolean json, java.lang.String m)
public static java.lang.String LOGIN(boolean json, java.lang.String m)
public static java.lang.String UNITS(boolean json, java.lang.String m)
public static java.lang.String AUTH(boolean json, java.lang.String m)
public static java.lang.String NEWVERS(boolean json, RTProperties v)
public static java.lang.String SUCCESS(boolean json, java.lang.String m)
public static java.lang.String OK_JSON(boolean json, java.lang.String j)
public static java.lang.String ERR_MOBILEID(boolean json, RTProperties m)
public static java.lang.String ERR_NOT_AUTH(boolean json, java.lang.String m)
public static java.lang.String ERR_MESSAGE(boolean json, java.lang.String m)
public static java.lang.String ERR_EXPIRED(boolean json, java.lang.String m)
public static java.lang.String ERR_INTERNAL(boolean json, java.lang.String m)
public static java.lang.String ERR_NO_GET(boolean json, java.lang.String m)
public static java.lang.String ERR_NO_POST(boolean json, java.lang.String m)
public static java.lang.String ERR_NO_RTP(boolean json, java.lang.String m)
public static java.lang.String ERR_SYNTAX(boolean json, java.lang.String m)
public static java.lang.String ERR_COMMAND(boolean json, java.lang.String m)
public static java.lang.String ERR_LOGIN(boolean json, java.lang.String m)
public static java.lang.String ERR_ACCOUNT(boolean json, java.lang.String m)
public static java.lang.String ERR_DEVICE(boolean json, java.lang.String m)
public static java.lang.String ERR_DEVICE_CMD(boolean json, java.lang.String m)
public static java.lang.String ERR_JSON(boolean json, java.lang.String j)
public static java.lang.String ERR_PARK(boolean json, java.lang.String m)
public static java.lang.String ERR_NO_SUPPORT(boolean json, java.lang.String m)
public static java.lang.String ERR_GROUP(boolean json, java.lang.String m)
public static JSON._Object CreateResponseJSON(java.lang.String success, java.lang.String type, java.lang.String message)
success
- The value of the "success" JSON tagtype
- The value of the "type" JSON tagmessage
- The value of the "message" JSON tag
public static java.lang.String CreateResponse(boolean isJSON, java.lang.String resp, java.lang.String msg)
isJSON
- True if response String must be a JSON objectresp
- The Response Type:SubTypemsg
- The Response Message
public static java.lang.String CreateResponse(boolean isJSON, java.lang.String resp, RTProperties rtp)
isJSON
- True if response String must be a JSON objectresp
- The Response Type:SubTypertp
- The RTProperties instance
public static boolean IsResponse(java.lang.String resp, java.lang.String code)
resp
- The Response to checkcode
- The Response Code
public static boolean IsOK(java.lang.String code)
code
- The Response Code to check
public static boolean IsError(java.lang.String code)
code
- The Response Code to check
public static boolean IsNoRTP(java.lang.String resp)
resp
- The Response Code to check
public static boolean IsNotAuth(java.lang.String resp)
resp
- The Response Code to check
public static boolean IsExpired(java.lang.String resp)
resp
- The Response Code to check
public static boolean IsInternal(java.lang.String resp)
resp
- The Response Code to check
public static java.lang.String[] ParseMessage(java.lang.String code)
code
- The Response Code
public static java.lang.String GetMessage(java.lang.String code)
code
- The Response Code from which the text message is returned
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |