C
- the type of the complete builder.@DoNotImplement public static interface Mqtt3PublishBuilderBase.Complete<C extends Mqtt3PublishBuilderBase.Complete<C>> extends Mqtt3PublishBuilderBase<C>
Mqtt3PublishBuilderBase
that is complete which means all mandatory fields are set.Mqtt3PublishBuilderBase.Complete<C extends Mqtt3PublishBuilderBase.Complete<C>>
Modifier and Type | Method and Description |
---|---|
C |
payload(byte[] payload)
Sets the optional
payload . |
C |
payload(@Nullable ByteBuffer payload)
Sets the optional
payload . |
C |
qos(@NotNull MqttQos qos)
Sets the
QoS . |
C |
retain(boolean retain)
Sets whether the Publish message should be
retained . |
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.