Enum QoS

java.lang.Object
java.lang.Enum<QoS>
cool.mqtt.hooks.QoS
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<QoS>, java.lang.constant.Constable

public enum QoS
extends java.lang.Enum<QoS>
The Quality of Service.

QoS is an enum representing the 3 Quality of Service levels according to which the MQTT broker delivers Application Messages.

  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
  • Enum Constant Summary

    Enum Constants 
    Enum Constant Description
    AT_LEAST_ONCE
    The singleton instance for At least once level.
    AT_MOST_ONCE
    The singleton instance for At most once level.
    EXACTLY_ONCE
    The singleton instance for Exactly once level.
  • Method Summary

    Modifier and Type Method Description
    int getValue()
    Gets the Quality of Service level int value.
    static QoS valueOf​(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    static QoS[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • AT_MOST_ONCE

      public static final QoS AT_MOST_ONCE
      The singleton instance for At most once level. This has the numeric value of 0.
    • AT_LEAST_ONCE

      public static final QoS AT_LEAST_ONCE
      The singleton instance for At least once level. This has the numeric value of 1.
    • EXACTLY_ONCE

      public static final QoS EXACTLY_ONCE
      The singleton instance for Exactly once level. This has the numeric value of 2.
  • Method Details

    • values

      public static QoS[] 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 QoS 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()
      Gets the Quality of Service level int value.
      Returns:
      the Quality of Service level, from 0 (AT_MOST_ONCE) to 2 (EXACTLY_ONCE once)