Package com.isode.som
Class SomResponse
- java.lang.Object
-
- com.isode.som.SomResponse
-
public class SomResponse extends java.lang.Object
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
Constructors Constructor Description SomResponse()
Create a new empty response objectSomResponse(int s, java.lang.String v)
Create a SomResponse object with a given status and data
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
expectData()
java.lang.String
getMessage()
int
getStatus()
void
parse()
Parse response string into status indication and data
-
-
-
Method Detail
-
expectData
public boolean expectData()
- Returns:
- indication of whether data should be expected for this response
-
parse
public void parse() throws SomException
Parse response string into status indication and data- Throws:
SomException
- indicating problem with data
-
getMessage
public java.lang.String getMessage()
- Returns:
- message data
-
getStatus
public int getStatus()
- Returns:
- status value
-
-