public interface MqttMessage<T> extends Message<T>
| Modifier and Type | Method and Description |
|---|---|
int |
getMessageId() |
io.netty.handler.codec.mqtt.MqttQoS |
getQosLevel() |
String |
getTopic() |
boolean |
isDuplicate() |
boolean |
isRetain() |
static <T> MqttMessage<T> |
of(String topic,
T payload)
Create a message with the given payload and metadata.
|
static <T> MqttMessage<T> |
of(String topic,
T payload,
io.netty.handler.codec.mqtt.MqttQoS qos) |
static <T> MqttMessage<T> |
of(String topic,
T payload,
io.netty.handler.codec.mqtt.MqttQoS qos,
boolean retain) |
static <T> MqttMessage<T> |
of(String topic,
T payload,
Supplier<CompletionStage<Void>> ack)
Create a message with the given payload, metadata and ack function.
|
static <T> MqttMessage<T> |
of(T payload)
Create a message with the given payload.
|
default MqttMessage<T> |
withAck(Supplier<CompletionStage<Void>> ack)
Creates a new instance of
Message with the given acknowledgement supplier. |
ack, addMetadata, getAck, getMetadata, getMetadata, getNack, getPayload, nack, nack, of, of, of, unwrap, withMetadata, withMetadata, withNack, withPayloadstatic <T> MqttMessage<T> of(T payload)
Messagestatic <T> MqttMessage<T> of(String topic, T payload)
Messagestatic <T> MqttMessage<T> of(String topic, T payload, Supplier<CompletionStage<Void>> ack)
Messageof in interface Message<T>T - the type of payloadtopic - The payload, must not be null.payload - the metadata, if null, empty metadata are used.ack - The ack function, this will be invoked when the returned messages Message.ack() method is invoked.static <T> MqttMessage<T> of(String topic, T payload, io.netty.handler.codec.mqtt.MqttQoS qos)
static <T> MqttMessage<T> of(String topic, T payload, io.netty.handler.codec.mqtt.MqttQoS qos, boolean retain)
default MqttMessage<T> withAck(Supplier<CompletionStage<Void>> ack)
Messageint getMessageId()
io.netty.handler.codec.mqtt.MqttQoS getQosLevel()
boolean isDuplicate()
boolean isRetain()
String getTopic()
Copyright © 2018–2021 SmallRye. All rights reserved.