public enum Mqtt5PubRecReasonCode extends Enum<Mqtt5PubRecReasonCode> implements Mqtt5ReasonCode
MQTT 5 PubRec message
.Enum Constant and Description |
---|
IMPLEMENTATION_SPECIFIC_ERROR
The PUBLISH packet is valid but is not accepted by the receiver.
|
NO_MATCHING_SUBSCRIBERS
The message is accepted but there are no subscribers.
|
NOT_AUTHORIZED
The sender is not authorized to make the publication.
|
PACKET_IDENTIFIER_IN_USE
The packet identifier is already in use.
|
PAYLOAD_FORMAT_INVALID
The payload does not match the specified payload format indicator.
|
QUOTA_EXCEEDED
An implementation or administrative imposed limit has been exceeded.
|
SUCCESS
The message is accepted.
|
TOPIC_NAME_INVALID
The topic name is formed correctly but is not accepted by the receiver.
|
UNSPECIFIED_ERROR
The receiver either does not want to reveal the reason for the failure or none of the other reason codes apply.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canBeSentByClient() |
boolean |
canBeSetByUser() |
static @Nullable Mqtt5PubRecReasonCode |
fromCode(int code)
Returns the PubRec Reason Code belonging to the given byte code.
|
int |
getCode() |
static Mqtt5PubRecReasonCode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Mqtt5PubRecReasonCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
canBeSentByServer, isError
public static final Mqtt5PubRecReasonCode SUCCESS
public static final Mqtt5PubRecReasonCode NO_MATCHING_SUBSCRIBERS
public static final Mqtt5PubRecReasonCode UNSPECIFIED_ERROR
public static final Mqtt5PubRecReasonCode IMPLEMENTATION_SPECIFIC_ERROR
public static final Mqtt5PubRecReasonCode NOT_AUTHORIZED
public static final Mqtt5PubRecReasonCode TOPIC_NAME_INVALID
public static final Mqtt5PubRecReasonCode PACKET_IDENTIFIER_IN_USE
public static final Mqtt5PubRecReasonCode QUOTA_EXCEEDED
public static final Mqtt5PubRecReasonCode PAYLOAD_FORMAT_INVALID
public static Mqtt5PubRecReasonCode[] values()
for (Mqtt5PubRecReasonCode c : Mqtt5PubRecReasonCode.values()) System.out.println(c);
public static Mqtt5PubRecReasonCode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getCode()
getCode
in interface Mqtt5ReasonCode
@Nullable public static @Nullable Mqtt5PubRecReasonCode fromCode(int code)
code
- the byte code.null
if the byte code is not a
valid PubRec Reason Code.public boolean canBeSentByClient()
canBeSentByClient
in interface Mqtt5ReasonCode
public boolean canBeSetByUser()
canBeSetByUser
in interface Mqtt5ReasonCode