Class MQTTMessage
- java.lang.Object
-
- software.amazon.awssdk.aws.greengrass.model.MQTTMessage
-
- All Implemented Interfaces:
EventStreamJsonMessage
public class MQTTMessage extends Object implements EventStreamJsonMessage
-
-
Field Summary
Fields Modifier and Type Field Description static StringAPPLICATION_MODEL_TYPEstatic MQTTMessageVOID
-
Constructor Summary
Constructors Constructor Description MQTTMessage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object rhs)StringgetApplicationModelType()Returns the named model type.StringgetContentType()(Optional) Message content type.byte[]getCorrelationData()(Optional) Correlation data blob for request/response.LonggetMessageExpiryIntervalSeconds()(Optional) Message expiry interval in seconds.byte[]getPayload()(Optional) The message payload as a blob.PayloadFormatgetPayloadFormat()StringgetPayloadFormatAsString()(Optional) Message payload format.StringgetResponseTopic()(Optional) Response topic for request/response.StringgetTopicName()The topic to which the message was published.List<UserProperty>getUserProperties()(Optional) MQTT user properties associated with the message.inthashCode()BooleanisRetain()(Optional) The value of the retain flag.voidsetContentType(String contentType)(Optional) Message content type.voidsetCorrelationData(byte[] correlationData)(Optional) Correlation data blob for request/response.voidsetMessageExpiryIntervalSeconds(Long messageExpiryIntervalSeconds)(Optional) Message expiry interval in seconds.voidsetPayload(byte[] payload)(Optional) The message payload as a blob.voidsetPayloadFormat(String payloadFormat)(Optional) Message payload format.voidsetPayloadFormat(PayloadFormat payloadFormat)(Optional) Message payload format.voidsetResponseTopic(String responseTopic)(Optional) Response topic for request/response.voidsetRetain(Boolean retain)(Optional) The value of the retain flag.voidsetTopicName(String topicName)The topic to which the message was published.voidsetUserProperties(List<UserProperty> userProperties)(Optional) MQTT user properties associated with the message.MQTTMessagewithContentType(String contentType)(Optional) Message content type.MQTTMessagewithCorrelationData(byte[] correlationData)(Optional) Correlation data blob for request/response.MQTTMessagewithMessageExpiryIntervalSeconds(Long messageExpiryIntervalSeconds)(Optional) Message expiry interval in seconds.MQTTMessagewithPayload(byte[] payload)(Optional) The message payload as a blob.MQTTMessagewithPayloadFormat(String payloadFormat)(Optional) Message payload format.MQTTMessagewithPayloadFormat(PayloadFormat payloadFormat)(Optional) Message payload format.MQTTMessagewithResponseTopic(String responseTopic)(Optional) Response topic for request/response.MQTTMessagewithRetain(Boolean retain)(Optional) The value of the retain flag.MQTTMessagewithTopicName(String topicName)The topic to which the message was published.MQTTMessagewithUserProperties(List<UserProperty> userProperties)(Optional) MQTT user properties associated with the message.-
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 MQTTMessage VOID
-
-
Method Detail
-
getTopicName
public String getTopicName()
The topic to which the message was published.
-
setTopicName
public void setTopicName(String topicName)
The topic to which the message was published.
-
withTopicName
public MQTTMessage withTopicName(String topicName)
The topic to which the message was published.
-
getPayload
public byte[] getPayload()
(Optional) The message payload as a blob.
-
setPayload
public void setPayload(byte[] payload)
(Optional) The message payload as a blob.
-
withPayload
public MQTTMessage withPayload(byte[] payload)
(Optional) The message payload as a blob.
-
isRetain
public Boolean isRetain()
(Optional) The value of the retain flag.
-
setRetain
public void setRetain(Boolean retain)
(Optional) The value of the retain flag.
-
withRetain
public MQTTMessage withRetain(Boolean retain)
(Optional) The value of the retain flag.
-
getUserProperties
public List<UserProperty> getUserProperties()
(Optional) MQTT user properties associated with the message.
-
setUserProperties
public void setUserProperties(List<UserProperty> userProperties)
(Optional) MQTT user properties associated with the message.
-
withUserProperties
public MQTTMessage withUserProperties(List<UserProperty> userProperties)
(Optional) MQTT user properties associated with the message.
-
getMessageExpiryIntervalSeconds
public Long getMessageExpiryIntervalSeconds()
(Optional) Message expiry interval in seconds.
-
setMessageExpiryIntervalSeconds
public void setMessageExpiryIntervalSeconds(Long messageExpiryIntervalSeconds)
(Optional) Message expiry interval in seconds.
-
withMessageExpiryIntervalSeconds
public MQTTMessage withMessageExpiryIntervalSeconds(Long messageExpiryIntervalSeconds)
(Optional) Message expiry interval in seconds.
-
getCorrelationData
public byte[] getCorrelationData()
(Optional) Correlation data blob for request/response.
-
setCorrelationData
public void setCorrelationData(byte[] correlationData)
(Optional) Correlation data blob for request/response.
-
withCorrelationData
public MQTTMessage withCorrelationData(byte[] correlationData)
(Optional) Correlation data blob for request/response.
-
getResponseTopic
public String getResponseTopic()
(Optional) Response topic for request/response.
-
setResponseTopic
public void setResponseTopic(String responseTopic)
(Optional) Response topic for request/response.
-
withResponseTopic
public MQTTMessage withResponseTopic(String responseTopic)
(Optional) Response topic for request/response.
-
getPayloadFormat
public PayloadFormat getPayloadFormat()
-
getPayloadFormatAsString
public String getPayloadFormatAsString()
(Optional) Message payload format.
-
setPayloadFormat
public void setPayloadFormat(String payloadFormat)
(Optional) Message payload format.
-
withPayloadFormat
public MQTTMessage withPayloadFormat(String payloadFormat)
(Optional) Message payload format.
-
setPayloadFormat
public void setPayloadFormat(PayloadFormat payloadFormat)
(Optional) Message payload format.
-
withPayloadFormat
public MQTTMessage withPayloadFormat(PayloadFormat payloadFormat)
(Optional) Message payload format.
-
getContentType
public String getContentType()
(Optional) Message content type.
-
setContentType
public void setContentType(String contentType)
(Optional) Message content type.
-
withContentType
public MQTTMessage withContentType(String contentType)
(Optional) Message content type.
-
getApplicationModelType
public String getApplicationModelType()
Description copied from interface:EventStreamJsonMessageReturns the named model type. May be used for a header.- Specified by:
getApplicationModelTypein interfaceEventStreamJsonMessage- Returns:
- the named model type
-
-