Package com.isode.som
Class SomResponse
java.lang.Object
com.isode.som.SomResponse
Class which handles a SOM command response. The essential functionality
is in parsing the data string into a continuation ("*"), error ("NO") or
successful ("OK") response and associated result data or error text.
- Author:
- tc
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new empty response objectSomResponse(int s, String v) Create a SomResponse object with a given status and data -
Method Summary
Modifier and TypeMethodDescriptionbooleanintvoidparse()Parse response string into status indication and data
-
Constructor Details
-
SomResponse
public SomResponse()Create a new empty response object -
SomResponse
Create a SomResponse object with a given status and data- Parameters:
s- status valuev- data string
-
-
Method Details
-
expectData
public boolean expectData()- Returns:
- indication of whether data should be expected for this response
-
parse
Parse response string into status indication and data- Throws:
SomException- indicating problem with data
-
getMessage
- Returns:
- message data
-
getStatus
public int getStatus()- Returns:
- status value
-