Enum Mqtt5ClientOptions.ClientSessionBehavior

java.lang.Object
java.lang.Enum<Mqtt5ClientOptions.ClientSessionBehavior>
software.amazon.awssdk.crt.mqtt5.Mqtt5ClientOptions.ClientSessionBehavior
All Implemented Interfaces:
Serializable, Comparable<Mqtt5ClientOptions.ClientSessionBehavior>
Enclosing class:
Mqtt5ClientOptions

public static enum Mqtt5ClientOptions.ClientSessionBehavior extends Enum<Mqtt5ClientOptions.ClientSessionBehavior>
Controls how the Mqtt5Client should behave with respect to MQTT sessions.
  • Enum Constant Details

    • DEFAULT

      public static final Mqtt5ClientOptions.ClientSessionBehavior DEFAULT
      Default client session behavior. Maps to CLEAN.
    • CLEAN

      public static final Mqtt5ClientOptions.ClientSessionBehavior CLEAN
      Always ask for a clean session when connecting
    • REJOIN_POST_SUCCESS

      public static final Mqtt5ClientOptions.ClientSessionBehavior REJOIN_POST_SUCCESS
      Always attempt to rejoin an existing session after an initial connection success. Session rejoin requires an appropriate non-zero session expiry interval in the client's CONNECT options.
    • REJOIN_ALWAYS

      public static final Mqtt5ClientOptions.ClientSessionBehavior REJOIN_ALWAYS
      Always attempt to rejoin an existing session. Since the client does not yet support durable session persistence, this option is not guaranteed to be spec compliant because any unacknowledged qos1 publishes (which are part of the client session state) will not be present on the initial connection. Until we support durable session resumption, this option is technically spec-breaking, but useful.
  • Method Details

    • values

      public static Mqtt5ClientOptions.ClientSessionBehavior[] 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 Mqtt5ClientOptions.ClientSessionBehavior 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
    • getValue

      public int getValue()
      Returns:
      The native enum integer value associated with this enum value
    • getEnumValueFromInteger

      public static Mqtt5ClientOptions.ClientSessionBehavior getEnumValueFromInteger(int value)
      Creates a ClientSessionBehavior enum value from a native integer value.
      Parameters:
      value - native integer value for the Client Session Behavior Type
      Returns:
      a new ClientSessionBehavior value