Enum Class QoS

java.lang.Object
java.lang.Enum<QoS>
org.eclipse.hono.util.QoS
All Implemented Interfaces:
Serializable, Comparable<QoS>, Constable

public enum QoS extends Enum<QoS>
Denotes the QoS level (in Hono's terms) with which a message was sent by the device.
  • Enum Constant Details

    • AT_MOST_ONCE

      public static final QoS AT_MOST_ONCE
    • AT_LEAST_ONCE

      public static final QoS AT_LEAST_ONCE
  • Method Details

    • values

      public static QoS[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static QoS valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • from

      public static QoS from(int code)
      Gets the quality of service corresponding to a given integer.
      Parameters:
      code - The code to get the qos for.
      Returns:
      AT_MOST_ONCE if code is 0, AT_LEAST_ONCE if code is 1, otherwise null.