Enum QOS

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<QOS>

    public enum QOS
    extends java.lang.Enum<QOS>
    MQTT message delivery quality of service. Enum values match MQTT5 spec encoding values.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      AT_LEAST_ONCE
      A level of service that ensures that the message arrives at the receiver at least once.
      AT_MOST_ONCE
      The message is delivered according to the capabilities of the underlying network.
      EXACTLY_ONCE
      A level of service that ensures that the message arrives at the receiver exactly once.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static QOS getEnumValueFromInteger​(int value)
      Creates a Java QualityOfService enum value from a native integer value.
      int getValue()  
      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

        compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

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

      • AT_MOST_ONCE

        public static final QOS AT_MOST_ONCE
        The message is delivered according to the capabilities of the underlying network. No response is sent by the receiver and no retry is performed by the sender. The message arrives at the receiver either once or not at all.
      • AT_LEAST_ONCE

        public static final QOS AT_LEAST_ONCE
        A level of service that ensures that the message arrives at the receiver at least once.
      • EXACTLY_ONCE

        public static final QOS EXACTLY_ONCE
        A level of service that ensures that the message arrives at the receiver exactly once.
    • Method Detail

      • values

        public static QOS[] 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 (QOS c : QOS.values())
            System.out.println(c);
        
        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()
        Returns:
        The native enum integer value associated with this Java enum value
      • getEnumValueFromInteger

        public static QOS getEnumValueFromInteger​(int value)
        Creates a Java QualityOfService enum value from a native integer value.
        Parameters:
        value - native integer value for quality of service
        Returns:
        a new QualityOfService value