Enum Mqtt5ClientOptions.ClientOfflineQueueBehavior

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Mqtt5ClientOptions.ClientOfflineQueueBehavior>
    Enclosing class:
    Mqtt5ClientOptions

    public static enum Mqtt5ClientOptions.ClientOfflineQueueBehavior
    extends java.lang.Enum<Mqtt5ClientOptions.ClientOfflineQueueBehavior>
    Controls how disconnects affect the queued and in-progress operations tracked by the client. Also controls how operations are handled while the client is not connected. In particular, if the client is not connected, then any operation that would be failed on disconnect (according to these rules) will be rejected.
    • Enum Constant Detail

      • FAIL_NON_QOS1_PUBLISH_ON_DISCONNECT

        public static final Mqtt5ClientOptions.ClientOfflineQueueBehavior FAIL_NON_QOS1_PUBLISH_ON_DISCONNECT
        Re-queues QoS 1+ publishes on disconnect; un-acked publishes go to the front while unprocessed publishes stay in place. All other operations (QoS 0 publishes, subscribe, unsubscribe) are failed.
      • FAIL_QOS0_PUBLISH_ON_DISCONNECT

        public static final Mqtt5ClientOptions.ClientOfflineQueueBehavior FAIL_QOS0_PUBLISH_ON_DISCONNECT
        QoS 0 publishes that are not complete at the time of disconnection are failed. Un-acked QoS 1+ publishes are re-queued at the head of the line for immediate retransmission on a session resumption. All other operations are requeued in original order behind any retransmissions.
      • FAIL_ALL_ON_DISCONNECT

        public static final Mqtt5ClientOptions.ClientOfflineQueueBehavior FAIL_ALL_ON_DISCONNECT
        All operations that are not complete at the time of disconnection are failed, except operations that the MQTT5 spec requires to be retransmitted (un-acked QoS1+ publishes).
    • Method Detail

      • values

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

        public static Mqtt5ClientOptions.ClientOfflineQueueBehavior 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 Mqtt5ClientOptions.ClientOfflineQueueBehavior getEnumValueFromInteger​(int value)
        Creates a Java ClientOfflineQueueBehavior enum value from a native integer value.
        Parameters:
        value - native integer value for the client operation queue behavior type
        Returns:
        a new ClientOfflineQueueBehavior value