C - the type of the complete builder.@DoNotImplement public static interface Mqtt5PublishBuilderBase.Complete<C extends Mqtt5PublishBuilderBase.Complete<C>> extends Mqtt5PublishBuilderBase<C>
Mqtt5PublishBuilderBase that is complete which means all mandatory fields are set.Mqtt5PublishBuilderBase.Complete<C extends Mqtt5PublishBuilderBase.Complete<C>>, Mqtt5PublishBuilderBase.WillBase<C extends Mqtt5PublishBuilderBase.WillBase.Complete<C>>| Modifier and Type | Method and Description |
|---|---|
C |
contentType(@Nullable MqttUtf8String contentType)
Sets the optional
content type. |
C |
contentType(@Nullable String contentType)
Sets the optional
content type. |
C |
correlationData(byte[] correlationData)
Sets the optional
correlation data. |
C |
correlationData(@Nullable ByteBuffer correlationData)
Sets the optional
correlation data. |
C |
messageExpiryInterval(long messageExpiryInterval)
Sets the
message expiry interval in seconds. |
C |
noMessageExpiry()
Disables the
message expiry. |
C |
payload(byte[] payload)
Sets the optional
payload. |
C |
payload(@Nullable ByteBuffer payload)
Sets the optional
payload. |
C |
payloadFormatIndicator(@Nullable Mqtt5PayloadFormatIndicator payloadFormatIndicator)
Sets the optional
payload format indicator. |
C |
qos(@NotNull MqttQos qos)
Sets the
QoS. |
MqttTopicBuilder.Nested<? extends C> |
responseTopic()
Fluent counterpart of
responseTopic(MqttTopic). |
C |
responseTopic(@Nullable MqttTopic responseTopic)
Sets the optional
response topic. |
C |
responseTopic(@Nullable String responseTopic)
Sets the optional
response topic. |
C |
retain(boolean retain)
Sets whether the Publish message should be
retained. |
Mqtt5UserPropertiesBuilder.Nested<? extends C> |
userProperties()
Fluent counterpart of
userProperties(Mqtt5UserProperties). |
C |
userProperties(@NotNull Mqtt5UserProperties userProperties)
Sets the
User Properties. |
topic, topic, topic@CheckReturnValue @NotNull C payload(byte[] payload)
payload.payload - the payload as byte array or null to remove any previously set payload.@CheckReturnValue @NotNull C payload(@Nullable @Nullable ByteBuffer payload)
payload.payload - the payload as ByteBuffer or null to remove any previously set payload.@CheckReturnValue @NotNull C qos(@NotNull @NotNull MqttQos qos)
QoS.qos - the QoS.@CheckReturnValue @NotNull C retain(boolean retain)
retained.retain - whether the Publish message should be retained.@CheckReturnValue @NotNull C messageExpiryInterval(long messageExpiryInterval)
message expiry interval in seconds.
The value must be in the range of an unsigned int: [0, 4_294_967_295].
messageExpiryInterval - the message expiry interval in seconds.@CheckReturnValue @NotNull C noMessageExpiry()
message expiry.@CheckReturnValue @NotNull C payloadFormatIndicator(@Nullable @Nullable Mqtt5PayloadFormatIndicator payloadFormatIndicator)
payload format indicator.payloadFormatIndicator - the payload format indicator or null to remove any previously set
payload format indicator.@CheckReturnValue @NotNull C contentType(@Nullable @Nullable String contentType)
content type.contentType - the content type or null to remove any previously set content type.@CheckReturnValue @NotNull C contentType(@Nullable @Nullable MqttUtf8String contentType)
content type.contentType - the content type or null to remove any previously set content type.@CheckReturnValue @NotNull C responseTopic(@Nullable @Nullable String responseTopic)
response topic.responseTopic - the response topic or null to remove any previously set response topic.@CheckReturnValue @NotNull C responseTopic(@Nullable @Nullable MqttTopic responseTopic)
response topic.responseTopic - the response topic or null to remove any previously set response topic.@CheckReturnValue MqttTopicBuilder.Nested<? extends C> responseTopic()
responseTopic(MqttTopic).
Calling MqttTopicBuilder.Nested.Complete#applyTopic() on the returned builder has the same effect as
calling responseTopic(MqttTopic) with the result of MqttTopicBuilder.Complete#build().
responseTopic(MqttTopic)@CheckReturnValue @NotNull C correlationData(byte[] correlationData)
correlation data.correlationData - the correlation data as byte array or null to remove any previously set
correlation data.@CheckReturnValue @NotNull C correlationData(@Nullable @Nullable ByteBuffer correlationData)
correlation data.correlationData - the correlation data as ByteBuffer or null to remove any
previously set correlation data.@CheckReturnValue @NotNull C userProperties(@NotNull @NotNull Mqtt5UserProperties userProperties)
User Properties.userProperties - the User Properties.@CheckReturnValue Mqtt5UserPropertiesBuilder.Nested<? extends C> userProperties()
userProperties(Mqtt5UserProperties).
Calling Mqtt5UserPropertiesBuilder.Nested#applyUserProperties() on the returned builder has the
effect of extending the current User Properties.
userProperties(Mqtt5UserProperties)