public class Message
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Message.ResponseType
This enum specifies the type of message contained in the responseMsg field.
|
Modifier and Type | Field and Description |
---|---|
private boolean |
hasResponseBeenSet
Whether or not the responseMsg field has been set.
|
private boolean |
hasResponseTypeBeenSet
Whether of not the responseType field has been set.
|
private java.lang.String |
outboundMsg
The message sent to the server
|
private java.lang.String |
responseMsg
The server's response message.
|
private Message.ResponseType |
responseMsgType
If this message's response represented an OK result or an error.
|
Constructor and Description |
---|
Message(java.lang.String outboundMsg)
Constructs a new Message given a message to be sent
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getOutboundMsg() |
java.lang.String |
getResponseMsg() |
Message.ResponseType |
getResponseMsgType() |
void |
setResponseMessage(java.lang.String responseMsg)
Sets the response of this message
|
void |
setResponseType(Message.ResponseType responseMsgType)
Sets the ResponseType of this message.
|
java.lang.String |
toString()
Basic toString() implementation to describe a Message
|
private final java.lang.String outboundMsg
private java.lang.String responseMsg
private boolean hasResponseBeenSet
private Message.ResponseType responseMsgType
private boolean hasResponseTypeBeenSet
public Message(java.lang.String outboundMsg)
outboundMsg
- The message to sendpublic java.lang.String getOutboundMsg()
public java.lang.String getResponseMsg()
public Message.ResponseType getResponseMsgType()
public void setResponseMessage(java.lang.String responseMsg) throws java.lang.IllegalArgumentException
responseMsg
- The response to be setjava.lang.IllegalArgumentException
- If this method is called once responseMsg has already been setpublic void setResponseType(Message.ResponseType responseMsgType)
responseMsgType
- The new value of responseTypeIllegalArgument
- If this method is called once responseType has already been set.public java.lang.String toString()
toString
in class java.lang.Object