Class JsonMessage
- java.lang.Object
-
- software.amazon.awssdk.aws.greengrass.model.JsonMessage
-
- All Implemented Interfaces:
EventStreamJsonMessage
public class JsonMessage extends Object implements EventStreamJsonMessage
-
-
Field Summary
Fields Modifier and Type Field Description static String
APPLICATION_MODEL_TYPE
static JsonMessage
VOID
-
Constructor Summary
Constructors Constructor Description JsonMessage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object rhs)
String
getApplicationModelType()
Returns the named model type.MessageContext
getContext()
The context of the message, such as the topic where the message was published.Map<String,Object>
getMessage()
The JSON message as an object.int
hashCode()
void
setContext(MessageContext context)
The context of the message, such as the topic where the message was published.void
setMessage(Map<String,Object> message)
The JSON message as an object.JsonMessage
withContext(MessageContext context)
The context of the message, such as the topic where the message was published.JsonMessage
withMessage(Map<String,Object> message)
The JSON message as an object.-
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.eventstreamrpc.model.EventStreamJsonMessage
fromJson, isVoid, postFromJson, toPayload
-
-
-
-
Field Detail
-
APPLICATION_MODEL_TYPE
public static final String APPLICATION_MODEL_TYPE
- See Also:
- Constant Field Values
-
VOID
public static final JsonMessage VOID
-
-
Method Detail
-
withMessage
public JsonMessage withMessage(Map<String,Object> message)
The JSON message as an object.
-
getContext
public MessageContext getContext()
The context of the message, such as the topic where the message was published.
-
setContext
public void setContext(MessageContext context)
The context of the message, such as the topic where the message was published.
-
withContext
public JsonMessage withContext(MessageContext context)
The context of the message, such as the topic where the message was published.
-
getApplicationModelType
public String getApplicationModelType()
Description copied from interface:EventStreamJsonMessage
Returns the named model type. May be used for a header.- Specified by:
getApplicationModelType
in interfaceEventStreamJsonMessage
- Returns:
- the named model type
-
-