Package software.amazon.awssdk.crt.mqtt5
Enum PublishResult.PublishResultType
- java.lang.Object
-
- java.lang.Enum<PublishResult.PublishResultType>
-
- software.amazon.awssdk.crt.mqtt5.PublishResult.PublishResultType
-
- All Implemented Interfaces:
Serializable
,Comparable<PublishResult.PublishResultType>
- Enclosing class:
- PublishResult
public static enum PublishResult.PublishResultType extends 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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PublishResult.PublishResultType
getEnumValueFromInteger(int value)
Creates a Java PublishResultType enum value from a native integer value.int
getValue()
static PublishResult.PublishResultType
valueOf(String name)
Returns the enum constant of this type with the specified name.static PublishResult.PublishResultType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
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(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- 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
-
-