Interface Publish

  • All Known Subinterfaces:
    RetainedPublish

    @DoNotImplement
    public interface Publish
    Represents a PUBLISH.

    Contains all values of an MQTT 5 PUBLISH, but will also used to represent MQTT 3 publishes.

    Since:
    4.0.0
    • Method Detail

      • getQos

        @NotNull Qos getQos()
        The quality of service level of the publish.
        Returns:
        The qos.
        Since:
        4.0.0
      • getRetain

        boolean getRetain()
        If true this message is a retained message, for false this is just a normal publish.
        Returns:
        The retain flag.
        Since:
        4.0.0
      • getTopic

        @NotNull java.lang.String getTopic()
        The topic filter the message is published to.
        Returns:
        The topic.
        Since:
        4.0.0
      • getPayloadFormatIndicator

        @NotNull java.util.Optional<PayloadFormatIndicator> getPayloadFormatIndicator()
        If this property is present, this is the payload format indicator.
        Returns:
        An Optional that contains the payload format indicator if present.
        Since:
        4.0.0
      • getMessageExpiryInterval

        @NotNull java.util.Optional<java.lang.Long> getMessageExpiryInterval()
        If this property is present, this is the message expiry interval.
        Returns:
        An Optional that contains the message expiry interval if present.
        Since:
        4.0.0
      • getResponseTopic

        @NotNull java.util.Optional<java.lang.String> getResponseTopic()
        If this property is present, this is the response topic.
        Returns:
        An Optional that contains the response topic if present.
        Since:
        4.0.0
      • getCorrelationData

        @NotNull java.util.Optional<@Immutable java.nio.ByteBuffer> getCorrelationData()
        If this property is present, this is the correlation data.
        Returns:
        An Optional that contains the correlation data if present.
        Since:
        4.0.0
      • getContentType

        @NotNull java.util.Optional<java.lang.String> getContentType()
        If this property is present, this is the content type.
        Returns:
        An Optional that contains the content type if present.
        Since:
        4.0.0
      • getPayload

        @NotNull java.util.Optional<@Immutable java.nio.ByteBuffer> getPayload()
        If this property is present, this is the payload.
        Returns:
        An Optional that contains the payload if present.
        Since:
        4.0.0