Enum SubscribePacket.RetainHandlingType

    • 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.
    • 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.
    • 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​(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 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