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 ConstantsEnum ConstantDescriptionAlways ask for a clean session when connectingDefault client session behavior.Always attempt to rejoin an existing session.Always attempt to rejoin an existing session after an initial connection success. -
Method Summary
Modifier and TypeMethodDescriptiongetEnumValueFromInteger
(int value) Creates a ClientSessionBehavior enum value from a native integer value.int
getValue()
Returns the enum constant of this type with the specified name.values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
Default client session behavior. Maps to CLEAN. -
CLEAN
Always ask for a clean session when connecting -
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
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
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
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
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
-