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 that the underlying Donkey Response objects are "equal".
|
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)
equals
in class Object
other
- the reference object with which to compare.true
if this object is the same as the obj
argument; false
otherwise.Object.hashCode()
,
HashMap
public String toString()
java.lang.Object
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())