Interface MqttMessage<T>

    • Method Detail

      • of

        static <T> MqttMessage<T> of​(T payload)
        Description copied from interface: Message
        Create a message with the given payload. No metadata are associated with the message, the acknowledgement is immediate.
        Type Parameters:
        T - The type of payload
        Parameters:
        payload - The payload.
        Returns:
        A message with the given payload, no metadata, and a no-op ack function.
      • of

        static <T> MqttMessage<T> of​(String topic,
                                     T payload)
        Description copied from interface: Message
        Create a message with the given payload and metadata. The acknowledgement is immediate.
        Type Parameters:
        T - The type of payload
        Parameters:
        topic - The payload, must not be null.
        payload - The metadata, if null an empty set of metadata is used.
        Returns:
        A message with the given payload, metadata and a no-op ack function.
      • of

        static <T> MqttMessage<T> of​(String topic,
                                     T payload,
                                     Supplier<CompletionStage<Void>> ack)
        Description copied from interface: Message
        Create a message with the given payload, metadata and ack function.
        Type Parameters:
        T - the type of payload
        Parameters:
        topic - 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.
        Returns:
        A message with the given payload and ack function.
      • of

        static <T> MqttMessage<T> of​(String topic,
                                     T payload,
                                     io.netty.handler.codec.mqtt.MqttQoS qos)
      • of

        static <T> MqttMessage<T> of​(String topic,
                                     T payload,
                                     io.netty.handler.codec.mqtt.MqttQoS qos,
                                     boolean retain)
      • getMessageId

        int getMessageId()
      • getQosLevel

        io.netty.handler.codec.mqtt.MqttQoS getQosLevel()
      • isDuplicate

        boolean isDuplicate()
      • isRetain

        boolean isRetain()