public class Message extends JsonWrapper
| Modifier and Type | Field and Description |
|---|---|
static String |
EMPTY_MESSAGE
The String representation of an empty message in JSON.
|
EMPTY_JSON| Constructor and Description |
|---|
Message()
Create a new, empty message.
|
Message(javax.json.JsonObject jsonObject)
Create a Message based on the given JSON object.
|
Message(javax.json.JsonObject jsonObject,
String messageType)
Create a Message based on the given JSON object.
|
Message(String jsonString)
Create a Message based on the given String representation of a JSON
object.
|
Message(String jsonString,
String messageType)
Create a Message based on the given String representation of a JSON
object.
|
| Modifier and Type | Method and Description |
|---|---|
Message |
clone()
Create a clone of this Message.
|
String |
getMessageType()
Get the type of the message if one was set.
|
void |
setMessageType(String messageType)
Set the type of the message.
|
equals, hashCode, toJsonObject, toStringpublic static final String EMPTY_MESSAGE
public Message()
public Message(String jsonString)
jsonString - The JSON String to parse.public Message(String jsonString, String messageType)
jsonString - The JSON String to parse.messageType - The type of the message (e.g., "geometry_msgs/Twist").public Message(javax.json.JsonObject jsonObject)
jsonObject - The JSON object containing the message data.public Message(javax.json.JsonObject jsonObject,
String messageType)
jsonObject - The JSON object containing the message data.messageType - The type of the message (e.g., "geometry_msgs/Twist").public String getMessageType()
public void setMessageType(String messageType)
messageType - The type of the message (e.g., "geometry_msgs/Twist").public Message clone()
clone in class JsonWrapperCopyright © 2014. All rights reserved.