Enum PublishResult.PublishResultType

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

    public static enum PublishResult.PublishResultType
    extends java.lang.Enum<PublishResult.PublishResultType>
    The type of data returned after calling Publish on an MQTT5 client. The type returned from a publish varies based on the QoS settings of the message sent.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      NONE
      No PublishResult result data (QoS 0) This means the PublishResult has no data and getValue will return null.
      PUBACK
      PublishResult result was a publish acknowledgment (PubAck - QoS 1) This means the PublishResult has a PubAck and getValue will return the PubAckPacket associated with the publish.
    • Enum Constant Detail

      • NONE

        public static final PublishResult.PublishResultType NONE
        No PublishResult result data (QoS 0) This means the PublishResult has no data and getValue will return null.
      • PUBACK

        public static final PublishResult.PublishResultType PUBACK
        PublishResult result was a publish acknowledgment (PubAck - QoS 1) This means the PublishResult has a PubAck and getValue will return the PubAckPacket associated with the publish.
    • Method Detail

      • values

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

        public static PublishResult.PublishResultType 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 PublishResult.PublishResultType getEnumValueFromInteger​(int value)
        Creates a Java PublishResultType enum value from a native integer value.
        Parameters:
        value - native integer value for PublishResultType
        Returns:
        a new PublishResultType value