public class Response extends Object
| Constructor and Description |
|---|
Response()
Instantiates a new Response object.
|
Response(com.mirth.connect.donkey.model.message.Response response)
Instantiates a new Response object.
|
Response(Status status,
String message)
Instantiates a new Response object.
|
Response(Status status,
String message,
String statusMessage)
Instantiates a new Response object.
|
Response(Status status,
String message,
String statusMessage,
String error)
Instantiates a new Response object.
|
Response(String message)
Instantiates a new Response object.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other)
Indicates whether some other object is "equal to" this one.
|
String |
getError()
Returns the error string associated with this response, if it exists.
|
String |
getMessage()
Returns the actual response data, as a string.
|
Status |
getStatus()
Returns the Status (e.g.
|
String |
getStatusMessage()
Returns a brief message explaining the reason for the current status.
|
void |
setError(String error)
Sets the error string to be associated with this response.
|
void |
setMessage(String message)
Sets the response data.
|
void |
setStatus(Status status)
Sets the status of this response.
|
void |
setStatusMessage(String statusMessage)
Sets the status message to use for this response.
|
String |
toString()
Returns a string representation of the object.
|
public Response()
public Response(String message)
message - The actual response data.public Response(Status status, String message)
status - The status (e.g. SENT, ERROR) of the response.message - The actual response data.public Response(Status status, String message, String statusMessage)
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.public Response(Status status, String message, String statusMessage, String error)
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.public Response(com.mirth.connect.donkey.model.message.Response response)
response - The underlying Donkey Response object to reference.public String getMessage()
public void setMessage(String message)
message - The response data (String) to use.public Status getStatus()
public void setStatus(Status status)
status - The status (e.g. SENT, QUEUED) to use for this response.public String getError()
public void setError(String error)
error - The error string to use.public String getStatusMessage()
public void setStatusMessage(String statusMessage)
statusMessage - A brief message explaining the reason for the current status.public boolean equals(Object other)
The equals method implements an equivalence relation
on non-null object references:
x, x.equals(x) should return
true.
x and y, x.equals(y)
should return true if and only if
y.equals(x) returns true.
x, y, and z, if
x.equals(y) returns true and
y.equals(z) returns true, then
x.equals(z) should return true.
x and y, multiple invocations of
x.equals(y) consistently return true
or consistently return false, provided no
information used in equals comparisons on the
objects is modified.
x,
x.equals(null) should return false.
The equals method for class Object implements
the most discriminating possible equivalence relation on objects;
that is, for any non-null reference values x and
y, this method returns true if and only
if x and y refer to the same object
(x == y has the value true).
Note that it is generally necessary to override the hashCode
method whenever this method is overridden, so as to maintain the
general contract for the hashCode method, which states
that equal objects must have equal hash codes.
equals in class Objectother - the reference object with which to compare.true if this object is the same as the obj
argument; false otherwise.Object.hashCode(),
HashMappublic String toString()
toString method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())