Enum SubscribePacket.RetainHandlingType
- java.lang.Object
-
- java.lang.Enum<SubscribePacket.RetainHandlingType>
-
- software.amazon.awssdk.crt.mqtt5.packets.SubscribePacket.RetainHandlingType
-
- All Implemented Interfaces:
Serializable
,Comparable<SubscribePacket.RetainHandlingType>
- Enclosing class:
- SubscribePacket
public static enum SubscribePacket.RetainHandlingType extends Enum<SubscribePacket.RetainHandlingType>
Configures how retained messages should be handled when subscribing with a subscription that matches topics with associated retained messages. Enum values match MQTT5 spec encoding values.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DONT_SEND
Subscriptions must not trigger any retained message publishes from the server.SEND_ON_SUBSCRIBE
The server should always send all retained messages on topics that match a subscription's filter.SEND_ON_SUBSCRIBE_IF_NEW
The server should send retained messages on topics that match the subscription's filter, but only for the first matching subscription, per session.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SubscribePacket.RetainHandlingType
getEnumValueFromInteger(int value)
Creates a Java RetainHandlingType enum value from a native integer value.int
getValue()
static SubscribePacket.RetainHandlingType
valueOf(String name)
Returns the enum constant of this type with the specified name.static SubscribePacket.RetainHandlingType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SEND_ON_SUBSCRIBE
public static final SubscribePacket.RetainHandlingType SEND_ON_SUBSCRIBE
The server should always send all retained messages on topics that match a subscription's filter.
-
SEND_ON_SUBSCRIBE_IF_NEW
public static final SubscribePacket.RetainHandlingType SEND_ON_SUBSCRIBE_IF_NEW
The server should send retained messages on topics that match the subscription's filter, but only for the first matching subscription, per session.
-
DONT_SEND
public static final SubscribePacket.RetainHandlingType DONT_SEND
Subscriptions must not trigger any retained message publishes from the server.
-
-
Method Detail
-
values
public static SubscribePacket.RetainHandlingType[] 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 (SubscribePacket.RetainHandlingType c : SubscribePacket.RetainHandlingType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SubscribePacket.RetainHandlingType 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 Java enum value
-
getEnumValueFromInteger
public static SubscribePacket.RetainHandlingType getEnumValueFromInteger(int value)
Creates a Java RetainHandlingType enum value from a native integer value.- Parameters:
value
- native integer value for RetainHandlingType- Returns:
- a new RetainHandlingType value
-
-