Interface Mqtt5PublishBuilderBase.Complete<C extends Mqtt5PublishBuilderBase.Complete<C>>
- Type Parameters:
C- the type of the complete builder.
- All Superinterfaces:
Mqtt5PublishBuilderBase<C>
- All Known Subinterfaces:
Mqtt5PublishBuilder.Complete,Mqtt5PublishBuilder.Nested.Complete<P>,Mqtt5PublishBuilder.Send.Complete<P>,Mqtt5PublishBuilderBase.WillBase.Complete<C>,Mqtt5WillPublishBuilder.Complete,Mqtt5WillPublishBuilder.Nested.Complete<P>
- Enclosing interface:
Mqtt5PublishBuilderBase<C extends Mqtt5PublishBuilderBase.Complete<C>>
@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.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.hivemq.client.mqtt.mqtt5.message.publish.Mqtt5PublishBuilderBase
Mqtt5PublishBuilderBase.Complete<C extends Mqtt5PublishBuilderBase.Complete<C>>, Mqtt5PublishBuilderBase.WillBase<C extends Mqtt5PublishBuilderBase.WillBase.Complete<C>> -
Method Summary
Modifier and TypeMethodDescriptioncontentType(@Nullable MqttUtf8String contentType) Sets the optionalcontent type.contentType(@Nullable String contentType) Sets the optionalcontent type.correlationData(byte @Nullable [] correlationData) Sets the optionalcorrelation data.correlationData(@Nullable ByteBuffer correlationData) Sets the optionalcorrelation data.messageExpiryInterval(long messageExpiryInterval) Sets themessage expiry intervalin seconds.Disables themessage expiry.Sets the optionalpayload.payload(@Nullable ByteBuffer payload) Sets the optionalpayload.payloadFormatIndicator(@Nullable Mqtt5PayloadFormatIndicator payloadFormatIndicator) Sets the optionalpayload format indicator.Sets theQoS.@NotNull MqttTopicBuilder.Nested<? extends C> Fluent counterpart ofresponseTopic(MqttTopic).responseTopic(@Nullable MqttTopic responseTopic) Sets the optionalresponse topic.responseTopic(@Nullable String responseTopic) Sets the optionalresponse topic.retain(boolean retain) Sets whether the Publish message should beretained.@NotNull Mqtt5UserPropertiesBuilder.Nested<? extends C> Fluent counterpart ofuserProperties(Mqtt5UserProperties).userProperties(@NotNull Mqtt5UserProperties userProperties) Sets theUser Properties.Methods inherited from interface com.hivemq.client.mqtt.mqtt5.message.publish.Mqtt5PublishBuilderBase
topic, topic, topic
-
Method Details
-
payload
Sets the optionalpayload.- Parameters:
payload- the payload as byte array ornullto remove any previously set payload.- Returns:
- the builder.
-
payload
Sets the optionalpayload.- Parameters:
payload- the payload asByteBufferornullto remove any previously set payload.- Returns:
- the builder.
-
qos
Sets theQoS.- Parameters:
qos- the QoS.- Returns:
- the builder.
-
retain
Sets whether the Publish message should beretained.- Parameters:
retain- whether the Publish message should be retained.- Returns:
- the builder.
-
messageExpiryInterval
Sets themessage expiry intervalin seconds.The value must be in the range of an unsigned int: [0, 4_294_967_295] or -1 to disable message expiry.
- Parameters:
messageExpiryInterval- the message expiry interval in seconds.- Returns:
- the builder.
-
noMessageExpiry
Disables themessage expiry.- Returns:
- the builder.
-
payloadFormatIndicator
@CheckReturnValue @NotNull C payloadFormatIndicator(@Nullable @Nullable Mqtt5PayloadFormatIndicator payloadFormatIndicator) Sets the optionalpayload format indicator.- Parameters:
payloadFormatIndicator- the payload format indicator ornullto remove any previously set payload format indicator.- Returns:
- the builder.
-
contentType
Sets the optionalcontent type.- Parameters:
contentType- the content type ornullto remove any previously set content type.- Returns:
- the builder.
-
contentType
Sets the optionalcontent type.- Parameters:
contentType- the content type ornullto remove any previously set content type.- Returns:
- the builder.
-
responseTopic
Sets the optionalresponse topic.- Parameters:
responseTopic- the response topic ornullto remove any previously set response topic.- Returns:
- the builder.
-
responseTopic
Sets the optionalresponse topic.- Parameters:
responseTopic- the response topic ornullto remove any previously set response topic.- Returns:
- the builder.
-
responseTopic
Fluent counterpart ofresponseTopic(MqttTopic).Calling
MqttTopicBuilder.Nested.Complete.applyTopic()on the returned builder has the same effect as callingresponseTopic(MqttTopic)with the result ofMqttTopicBuilder.Complete.build().- Returns:
- the fluent builder for the response topic.
- See Also:
-
correlationData
Sets the optionalcorrelation data.- Parameters:
correlationData- the correlation data as byte array ornullto remove any previously set correlation data.- Returns:
- the builder.
-
correlationData
Sets the optionalcorrelation data.- Parameters:
correlationData- the correlation data asByteBufferornullto remove any previously set correlation data.- Returns:
- the builder.
-
userProperties
Sets theUser Properties.- Parameters:
userProperties- the User Properties.- Returns:
- the builder.
-
userProperties
Fluent counterpart ofuserProperties(Mqtt5UserProperties).Calling
Mqtt5UserPropertiesBuilder.Nested.applyUserProperties()on the returned builder has the effect ofextendingthe current User Properties.- Returns:
- the fluent builder for the User Properties.
- See Also:
-