Class GenericResponse


  • public class GenericResponse
    extends Object
    • Constructor Detail

      • GenericResponse

        public GenericResponse()
    • Method Detail

      • getResponseObject

        public com.fasterxml.jackson.databind.JsonNode getResponseObject()
      • setResponseObject

        public void setResponseObject​(com.fasterxml.jackson.databind.JsonNode responseObject)
        Sets the JSON payload to include in this GenericResponse.
        Parameters:
        responseObject - the JSON payload to store as the response object
      • getResponseMessage

        public String getResponseMessage()
        Gets the human-readable response message.
        Returns:
        the response message, or `null` if none has been set
      • setResponseMessage

        public void setResponseMessage​(String responseMessage)
      • getResponseCode

        public int getResponseCode()
      • setResponseCode

        public void setResponseCode​(int responseCode)
      • isSuccess

        public boolean isSuccess()
      • setSuccess

        public void setSuccess​(boolean success)
        Set whether this response indicates a successful outcome.
        Parameters:
        success - `true` if the response indicates success, `false` otherwise
      • getResponseBytes

        public byte[] getResponseBytes()
        Provides the raw byte payload of this response.
        Returns:
        the raw response bytes, or null if no bytes are set
      • setResponseBytes

        public void setResponseBytes​(byte[] responseBytes)
        Set the raw binary payload for the response.
        Parameters:
        responseBytes - the raw payload bytes to store, or null if none
      • toString

        public String toString()
        Produce a string representation of this GenericResponse including its primary fields. The returned string contains the values of `success`, `responseMessage`, `responseCode`, and `responseObject`. The `responseBytes` field is intentionally omitted.
        Overrides:
        toString in class Object
        Returns:
        a string containing the values of `success`, `responseMessage`, `responseCode`, and `responseObject`