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 Details

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

    • values

      public static SubscribePacket.RetainHandlingType[] 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 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 name
      NullPointerException - 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