Enum RetainHandling

    • Enum Constant Detail

      • SEND

        public static final RetainHandling SEND
        Send every retained message for any subscription.
        Since:
        4.0.0, CE 2019.1
      • SEND_IF_NEW_SUBSCRIPTION

        public static final RetainHandling SEND_IF_NEW_SUBSCRIPTION
        Send every retained message for new subscriptions only.
        Since:
        4.0.0, CE 2019.1
      • DO_NOT_SEND

        public static final RetainHandling DO_NOT_SEND
        Never send a retained message for the subscription.
        Since:
        4.0.0, CE 2019.1
    • Method Detail

      • values

        public static RetainHandling[] 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 (RetainHandling c : RetainHandling.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static RetainHandling 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
      • getCode

        public int getCode()
        Get the retain handling as integer.
        Returns:
        The retain handling.
        Since:
        4.0.0, CE 2019.1
      • fromCode

        @Nullable
        public static @Nullable RetainHandling fromCode​(int code)
        Returns the Retain Handling belonging to the given byte code.
        Parameters:
        code - The byte code.
        Returns:
        The Retain Handling belonging to the byte code or null if the byte code is not a valid Retain Handling.
        Since:
        4.0.0, CE 2019.1