Class Response

java.lang.Object
com.mirth.connect.userutil.Response

public class Response extends Object
This class represents a channel or destination response and is used to retrieve details such as the response data, message status, and errors.
  • Constructor Details

    • Response

      public Response()
      Instantiates a new Response object.
    • Response

      public Response(String message)
      Instantiates a new Response object.
      Parameters:
      message - The actual response data.
    • Response

      public Response(Status status, String message)
      Instantiates a new Response object.
      Parameters:
      status - The status (e.g. SENT, ERROR) of the response.
      message - The actual response data.
    • Response

      public Response(Status status, String message, String statusMessage)
      Instantiates a new Response object.
      Parameters:
      status - The status (e.g. SENT, ERROR) of the response.
      message - The actual response data.
      statusMessage - A brief message explaining the reason for the current status.
    • Response

      public Response(Status status, String message, String statusMessage, String error)
      Instantiates a new Response object.
      Parameters:
      status - The status (e.g. SENT, ERROR) of the response.
      message - The actual response data.
      statusMessage - A brief message explaining the reason for the current status.
      error - The error string associated with this response, if applicable.
    • Response

      public Response(com.mirth.connect.donkey.model.message.Response response)
      Instantiates a new Response object. NOTE: This should be excluded from the public Javadoc.
      Parameters:
      response - The underlying Donkey Response object to reference.
  • Method Details

    • getMessage

      public String getMessage()
      Returns the actual response data, as a string.
      Returns:
      The actual response data, as a string.
    • setMessage

      public void setMessage(String message)
      Sets the response data.
      Parameters:
      message - The response data (String) to use.
    • getStatus

      public Status getStatus()
      Returns the Status (e.g. SENT, QUEUED) of this response.
      Returns:
      The Status (e.g. SENT, QUEUED) of this response.
    • setStatus

      public void setStatus(Status status)
      Sets the status of this response.
      Parameters:
      status - The status (e.g. SENT, QUEUED) to use for this response.
    • getError

      public String getError()
      Returns the error string associated with this response, if it exists.
      Returns:
      The error string associated with this response, if it exists.
    • setError

      public void setError(String error)
      Sets the error string to be associated with this response.
      Parameters:
      error - The error string to use.
    • getStatusMessage

      public String getStatusMessage()
      Returns a brief message explaining the reason for the current status.
      Returns:
      A brief message explaining the reason for the current status.
    • setStatusMessage

      public void setStatusMessage(String statusMessage)
      Sets the status message to use for this response.
      Parameters:
      statusMessage - A brief message explaining the reason for the current status.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object