Interface MqttHeaders.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<MqttHeaders.Builder,MqttHeaders>,SdkBuilder<MqttHeaders.Builder,MqttHeaders>,SdkPojo
- Enclosing class:
- MqttHeaders
public static interface MqttHeaders.Builder extends SdkPojo, CopyableBuilder<MqttHeaders.Builder,MqttHeaders>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MqttHeaders.BuildercontentType(String contentType)A UTF-8 encoded string that describes the content of the publishing message.MqttHeaders.BuildercorrelationData(String correlationData)The base64-encoded binary data used by the sender of the request message to identify which request the response message is for when it's received.MqttHeaders.BuildermessageExpiry(String messageExpiry)A user-defined integer value that will persist a message at the message broker for a specified amount of time to ensure that the message will expire if it's no longer relevant to the subscriber.MqttHeaders.BuilderpayloadFormatIndicator(String payloadFormatIndicator)AnEnumstring value that indicates whether the payload is formatted as UTF-8.MqttHeaders.BuilderresponseTopic(String responseTopic)A UTF-8 encoded string that's used as the topic name for a response message.MqttHeaders.BuilderuserProperties(Collection<UserProperty> userProperties)An array of key-value pairs that you define in the MQTT5 header.MqttHeaders.BuilderuserProperties(Consumer<UserProperty.Builder>... userProperties)An array of key-value pairs that you define in the MQTT5 header.MqttHeaders.BuilderuserProperties(UserProperty... userProperties)An array of key-value pairs that you define in the MQTT5 header.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
-
-
-
Method Detail
-
payloadFormatIndicator
MqttHeaders.Builder payloadFormatIndicator(String payloadFormatIndicator)
An
Enumstring value that indicates whether the payload is formatted as UTF-8.Valid values are
UNSPECIFIED_BYTESandUTF8_DATA.For more information, see Payload Format Indicator from the MQTT Version 5.0 specification.
Supports substitution templates.
- Parameters:
payloadFormatIndicator- AnEnumstring value that indicates whether the payload is formatted as UTF-8.Valid values are
UNSPECIFIED_BYTESandUTF8_DATA.For more information, see Payload Format Indicator from the MQTT Version 5.0 specification.
Supports substitution templates.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
contentType
MqttHeaders.Builder contentType(String contentType)
A UTF-8 encoded string that describes the content of the publishing message.
For more information, see Content Type from the MQTT Version 5.0 specification.
Supports substitution templates.
- Parameters:
contentType- A UTF-8 encoded string that describes the content of the publishing message.For more information, see Content Type from the MQTT Version 5.0 specification.
Supports substitution templates.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
responseTopic
MqttHeaders.Builder responseTopic(String responseTopic)
A UTF-8 encoded string that's used as the topic name for a response message. The response topic is used to describe the topic which the receiver should publish to as part of the request-response flow. The topic must not contain wildcard characters.
For more information, see Response Topic from the MQTT Version 5.0 specification.
Supports substitution templates.
- Parameters:
responseTopic- A UTF-8 encoded string that's used as the topic name for a response message. The response topic is used to describe the topic which the receiver should publish to as part of the request-response flow. The topic must not contain wildcard characters.For more information, see Response Topic from the MQTT Version 5.0 specification.
Supports substitution templates.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
correlationData
MqttHeaders.Builder correlationData(String correlationData)
The base64-encoded binary data used by the sender of the request message to identify which request the response message is for when it's received.
For more information, see Correlation Data from the MQTT Version 5.0 specification.
This binary data must be based64-encoded.
Supports substitution templates.
- Parameters:
correlationData- The base64-encoded binary data used by the sender of the request message to identify which request the response message is for when it's received.For more information, see Correlation Data from the MQTT Version 5.0 specification.
This binary data must be based64-encoded.
Supports substitution templates.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
messageExpiry
MqttHeaders.Builder messageExpiry(String messageExpiry)
A user-defined integer value that will persist a message at the message broker for a specified amount of time to ensure that the message will expire if it's no longer relevant to the subscriber. The value of
messageExpiryrepresents the number of seconds before it expires. For more information about the limits ofmessageExpiry, see Amazon Web Services IoT Core message broker and protocol limits and quotas from the Amazon Web Services Reference Guide.Supports substitution templates.
- Parameters:
messageExpiry- A user-defined integer value that will persist a message at the message broker for a specified amount of time to ensure that the message will expire if it's no longer relevant to the subscriber. The value ofmessageExpiryrepresents the number of seconds before it expires. For more information about the limits ofmessageExpiry, see Amazon Web Services IoT Core message broker and protocol limits and quotas from the Amazon Web Services Reference Guide.Supports substitution templates.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
userProperties
MqttHeaders.Builder userProperties(Collection<UserProperty> userProperties)
An array of key-value pairs that you define in the MQTT5 header.
- Parameters:
userProperties- An array of key-value pairs that you define in the MQTT5 header.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
userProperties
MqttHeaders.Builder userProperties(UserProperty... userProperties)
An array of key-value pairs that you define in the MQTT5 header.
- Parameters:
userProperties- An array of key-value pairs that you define in the MQTT5 header.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
userProperties
MqttHeaders.Builder userProperties(Consumer<UserProperty.Builder>... userProperties)
An array of key-value pairs that you define in the MQTT5 header.
This is a convenience method that creates an instance of theUserProperty.Builderavoiding the need to create one manually viaUserProperty.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#userProperties(List.) - Parameters:
userProperties- a consumer that will call methods onUserProperty.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#userProperties(java.util.Collection)
-
-