Package com.isode.som

Class SomResponse

java.lang.Object
com.isode.som.SomResponse

public class SomResponse extends 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 Details

    • SomResponse

      public SomResponse()
      Create a new empty response object
    • SomResponse

      public SomResponse(int s, String v)
      Create a SomResponse object with a given status and data
      Parameters:
      s - status value
      v - data string
  • Method Details

    • 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 String getMessage()
      Returns:
      message data
    • getStatus

      public int getStatus()
      Returns:
      status value