Package com.mirth.connect.userutil
Class Response
java.lang.Object
com.mirth.connect.userutil.Response
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
ConstructorsConstructorDescriptionResponse()Instantiates a new Response object.Response(com.mirth.connect.donkey.model.message.Response response) Instantiates a new Response object.Instantiates a new Response object.Instantiates a new Response object.Instantiates a new Response object.Instantiates a new Response object. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetError()Returns the error string associated with this response, if it exists.Returns the actual response data, as a string.Returns the Status (e.g.Returns a brief message explaining the reason for the current status.voidSets the error string to be associated with this response.voidsetMessage(String message) Sets the response data.voidSets the status of this response.voidsetStatusMessage(String statusMessage) Sets the status message to use for this response.toString()
-
Constructor Details
-
Response
public Response()Instantiates a new Response object. -
Response
Instantiates a new Response object.- Parameters:
message- The actual response data.
-
Response
Instantiates a new Response object.- Parameters:
status- The status (e.g. SENT, ERROR) of the response.message- The actual response data.
-
Response
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
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
Returns the actual response data, as a string.- Returns:
- The actual response data, as a string.
-
setMessage
Sets the response data.- Parameters:
message- The response data (String) to use.
-
getStatus
Returns the Status (e.g. SENT, QUEUED) of this response.- Returns:
- The Status (e.g. SENT, QUEUED) of this response.
-
setStatus
Sets the status of this response.- Parameters:
status- The status (e.g. SENT, QUEUED) to use for this response.
-
getError
Returns the error string associated with this response, if it exists.- Returns:
- The error string associated with this response, if it exists.
-
setError
Sets the error string to be associated with this response.- Parameters:
error- The error string to use.
-
getStatusMessage
Returns a brief message explaining the reason for the current status.- Returns:
- A brief message explaining the reason for the current status.
-
setStatusMessage
Sets the status message to use for this response.- Parameters:
statusMessage- A brief message explaining the reason for the current status.
-
equals
-
toString
-