Interface TopicSubscription


@DoNotImplement
public interface TopicSubscription
Represents a Subscription.

Contains all values (except RetainHandling) of an MQTT 5 Subscription, but is also used to represent MQTT 3 Subscriptions.

Since:
4.0.0, CE 2019.1
  • Method Details

    • builder

      @Deprecated(since="4.4.0") static TopicSubscriptionBuilder builder()
      Deprecated.
      Returns:
      A new TopicSubscriptionBuilder to create a topic subscription.
      Since:
      4.0.0, CE 2019.1
    • getTopicFilter

      @NotNull @NotNull String getTopicFilter()
      The topic filter of the subscription.
      Returns:
      The topic filter of the subscription.
      Since:
      4.0.0, CE 2019.1
    • getQos

      The quality of service level of the subscription.
      Returns:
      The quality of service level of the subscription.
      Since:
      4.0.0, CE 2019.1
    • getRetainAsPublished

      boolean getRetainAsPublished()
      The retain as published flag indicates if the client wants the retain flag preserved for received messages to the topic filter of the subscription.

      If true the retain flag is preserved. If false it isn't.

      Returns:
      The retain as published flag of the subscription.
      Since:
      4.0.0, CE 2019.1
    • getNoLocal

      boolean getNoLocal()
      The no local flag indicates if the client wants to receive messages published by itself to the topic filter of the subscription.

      If false the client also receives it's own messages. If true it doesn't.

      Returns:
      The no local flag of the subscription.
      Since:
      4.0.0, CE 2019.1
    • getSubscriptionIdentifier

      @NotNull @NotNull Optional<Integer> getSubscriptionIdentifier()
      The current subscription identifier that is associated with the subscription.
      Returns:
      An Optional containing the subscription identifier if present.
      Since:
      4.0.0, CE 2019.1