com.mirth.connect.userutil
Class Response

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

public class Response
extends java.lang.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 Summary
Response()
          Instantiates a new Response object.
Response(com.mirth.connect.donkey.model.message.Response response)
          Instantiates a new Response object.
Response(Status status, java.lang.String message)
          Instantiates a new Response object.
Response(Status status, java.lang.String message, java.lang.String statusMessage)
          Instantiates a new Response object.
Response(Status status, java.lang.String message, java.lang.String statusMessage, java.lang.String error)
          Instantiates a new Response object.
Response(java.lang.String message)
          Instantiates a new Response object.
 
Method Summary
 boolean equals(java.lang.Object other)
          Indicates that the underlying Donkey Response objects are "equal".
 java.lang.String getError()
          Returns the error string associated with this response, if it exists.
 java.lang.String getMessage()
          Returns the actual response data, as a string.
 Status getStatus()
          Returns the Status (e.g.
 java.lang.String getStatusMessage()
          Returns a brief message explaining the reason for the current status.
 void setError(java.lang.String error)
          Sets the error string to be associated with this response.
 void setMessage(java.lang.String message)
          Sets the response data.
 void setStatus(Status status)
          Sets the status of this response.
 void setStatusMessage(java.lang.String statusMessage)
          Sets the status message to use for this response.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Response

public Response()
Instantiates a new Response object.


Response

public Response(java.lang.String message)
Instantiates a new Response object.

Parameters:
message - The actual response data.

Response

public Response(Status status,
                java.lang.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,
                java.lang.String message,
                java.lang.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,
                java.lang.String message,
                java.lang.String statusMessage,
                java.lang.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 Detail

getMessage

public java.lang.String getMessage()
Returns the actual response data, as a string.


setMessage

public void setMessage(java.lang.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.


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 java.lang.String getError()
Returns the error string associated with this response, if it exists.


setError

public void setError(java.lang.String error)
Sets the error string to be associated with this response.

Parameters:
error - The error string to use.

getStatusMessage

public java.lang.String getStatusMessage()
Returns a brief message explaining the reason for the current status.


setStatusMessage

public void setStatusMessage(java.lang.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(java.lang.Object other)
Indicates that the underlying Donkey Response objects are "equal".

Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object