Enum Mqtt5ClientOptions.ClientSessionBehavior

    • Enum Constant Detail

      • 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 Detail

      • values

        public static Mqtt5ClientOptions.ClientSessionBehavior[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Mqtt5ClientOptions.ClientSessionBehavior c : Mqtt5ClientOptions.ClientSessionBehavior.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Mqtt5ClientOptions.ClientSessionBehavior valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.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