Enum SubscriptionState

java.lang.Object
java.lang.Enum<SubscriptionState>
io.smallrye.reactive.messaging.mqtt.session.SubscriptionState
All Implemented Interfaces:
Serializable, Comparable<SubscriptionState>

public enum SubscriptionState extends Enum<SubscriptionState>
The state of a subscription.

Subscriptions established when a new topic gets added, or the connection was established. If the subscribe call returns an error for the subscription, the state will remain FAILED and it will not try to re-subscribe while the connection is active.

When the session (connection) disconnects, all subscriptions will automatically be reset to UNSUBSCRIBED.

  • Enum Constant Details

    • UNSUBSCRIBED

      public static final SubscriptionState UNSUBSCRIBED
      The topic is not subscribed.
    • SUBSCRIBING

      public static final SubscriptionState SUBSCRIBING
      The topic is in the process of subscribing.
    • SUBSCRIBED

      public static final SubscriptionState SUBSCRIBED
      The topic is subscribed.
    • FAILED

      public static final SubscriptionState FAILED
      The topic could not be subscribed.
  • Method Details

    • values

      public static SubscriptionState[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static SubscriptionState valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null