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, CE 2019.1
    • Method Detail

      • getQos

        @NotNull Qos getQos()
        The quality of service level of the publish.
        Returns:
        The qos.
        Since:
        4.0.0, CE 2019.1
      • 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, CE 2019.1
      • getTopic

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

        @NotNull 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, CE 2019.1
      • getMessageExpiryInterval

        @NotNull Optional<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, CE 2019.1
      • getResponseTopic

        @NotNull Optional<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, CE 2019.1
      • getContentType

        @NotNull Optional<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, CE 2019.1