Package software.amazon.awssdk.crt.mqtt5
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 Summary
Enum Constants Enum Constant Description CLEAN
Always ask for a clean session when connectingDEFAULT
Default client session behavior.REJOIN_ALWAYS
Always attempt to rejoin an existing session.REJOIN_POST_SUCCESS
Always attempt to rejoin an existing session after an initial connection success.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Mqtt5ClientOptions.ClientSessionBehavior
getEnumValueFromInteger(int value)
Creates a ClientSessionBehavior enum value from a native integer value.int
getValue()
static Mqtt5ClientOptions.ClientSessionBehavior
valueOf(String name)
Returns the enum constant of this type with the specified name.static Mqtt5ClientOptions.ClientSessionBehavior[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 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(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 nameNullPointerException
- 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
-
-