public enum Mqtt5DisconnectReasonCode extends Enum<Mqtt5DisconnectReasonCode> implements Mqtt5ReasonCode
MQTT 5 Disconnect message
.Enum Constant and Description |
---|
ADMINISTRATIVE_ACTION
The connection is closed due to an administrative action.
|
BAD_AUTHENTICATION_METHOD
The authentication method is not supported or does not match the authentication method currently in use.
|
CONNECTION_RATE_EXCEEDED
The connection is closed because the connection rate is too high.
|
DISCONNECT_WITH_WILL_MESSAGE
Disconnect normally.
|
IMPLEMENTATION_SPECIFIC_ERROR
A packet is valid but can not be processed by the implementation of the receiver.
|
KEEP_ALIVE_TIMEOUT
The connection is closed because no packet has been received for 1.5 times the keep alive time.
|
MALFORMED_PACKET
A packet could not be parsed correctly according to the MQTT specification.
|
MAXIMUM_CONNECT_TIME
The maximum connection time authorized for this connection has been exceeded.
|
MESSAGE_RATE_TOO_HIGH
The received data rate is too high.
|
NORMAL_DISCONNECTION
Disconnect normally.
|
NOT_AUTHORIZED
The client is not authorized to perform a request.
|
PACKET_TOO_LARGE
The receiver has received a packet with a greater size than allowed by the maximum packet size it sent in the
CONNECT or CONNACK packet.
|
PAYLOAD_FORMAT_INVALID
A payload does not match the specified payload format indicator.
|
PROTOCOL_ERROR
A packet contained data that is not allowed by the MQTT protocol or is inconsistent with the state of the
receiver.
|
QOS_NOT_SUPPORTED
The client specified a QoS greater than the maximum QoS the server sent in the CONNACK packet.
|
QUOTA_EXCEEDED
An implementation or administrative imposed limit has been exceeded.
|
RECEIVE_MAXIMUM_EXCEEDED
The receiver has received more publications for which it has not sent PUBACK or PUBCOMP than allowed by the
receive maximum it sent in the CONNECT or CONNACK packet.
|
RETAIN_NOT_SUPPORTED
The server does not support retained messages.
|
SERVER_BUSY
The server is busy and can not continue processing requests from the client.
|
SERVER_MOVED
The client should permanently use another server.
|
SERVER_SHUTTING_DOWN
The server is shutting down.
|
SESSION_TAKEN_OVER
Another client using the same client identifier has connected.
|
SHARED_SUBSCRIPTIONS_NOT_SUPPORTED
The server does not support shared subscriptions.
|
SUBSCRIPTION_IDENTIFIERS_NOT_SUPPORTED
The server does not support subscription identifiers.
|
TOPIC_ALIAS_INVALID
The receiver has received a PUBLISH packet containing a topic alias which is greater than the maximum topic alias
it sent in the CONNECT or CONNACK packet.
|
TOPIC_FILTER_INVALID
A packet contained a topic filter that is formed correctly but is not accepted by the server.
|
TOPIC_NAME_INVALID
A packet contained a topic name that is formed correctly but is not accepted by the receiver.
|
UNSPECIFIED_ERROR
The sender either does not want to reveal the reason for the disconnect or none of the other reason codes apply.
|
USE_ANOTHER_SERVER
The client should temporarily use another server.
|
WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED
The server does not support wildcard subscriptions.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canBeSentByClient() |
boolean |
canBeSentByServer() |
boolean |
canBeSetByUser() |
static @Nullable Mqtt5DisconnectReasonCode |
fromCode(int code)
Returns the Disconnect Reason Code belonging to the given byte code.
|
int |
getCode() |
static Mqtt5DisconnectReasonCode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Mqtt5DisconnectReasonCode[] |
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
isError
public static final Mqtt5DisconnectReasonCode NORMAL_DISCONNECTION
public static final Mqtt5DisconnectReasonCode DISCONNECT_WITH_WILL_MESSAGE
public static final Mqtt5DisconnectReasonCode UNSPECIFIED_ERROR
public static final Mqtt5DisconnectReasonCode MALFORMED_PACKET
public static final Mqtt5DisconnectReasonCode PROTOCOL_ERROR
public static final Mqtt5DisconnectReasonCode IMPLEMENTATION_SPECIFIC_ERROR
public static final Mqtt5DisconnectReasonCode NOT_AUTHORIZED
public static final Mqtt5DisconnectReasonCode SERVER_BUSY
public static final Mqtt5DisconnectReasonCode SERVER_SHUTTING_DOWN
public static final Mqtt5DisconnectReasonCode BAD_AUTHENTICATION_METHOD
public static final Mqtt5DisconnectReasonCode KEEP_ALIVE_TIMEOUT
public static final Mqtt5DisconnectReasonCode SESSION_TAKEN_OVER
public static final Mqtt5DisconnectReasonCode TOPIC_FILTER_INVALID
public static final Mqtt5DisconnectReasonCode TOPIC_NAME_INVALID
public static final Mqtt5DisconnectReasonCode RECEIVE_MAXIMUM_EXCEEDED
public static final Mqtt5DisconnectReasonCode TOPIC_ALIAS_INVALID
public static final Mqtt5DisconnectReasonCode PACKET_TOO_LARGE
public static final Mqtt5DisconnectReasonCode MESSAGE_RATE_TOO_HIGH
public static final Mqtt5DisconnectReasonCode QUOTA_EXCEEDED
public static final Mqtt5DisconnectReasonCode ADMINISTRATIVE_ACTION
public static final Mqtt5DisconnectReasonCode PAYLOAD_FORMAT_INVALID
public static final Mqtt5DisconnectReasonCode RETAIN_NOT_SUPPORTED
public static final Mqtt5DisconnectReasonCode QOS_NOT_SUPPORTED
public static final Mqtt5DisconnectReasonCode USE_ANOTHER_SERVER
public static final Mqtt5DisconnectReasonCode SERVER_MOVED
public static final Mqtt5DisconnectReasonCode SHARED_SUBSCRIPTIONS_NOT_SUPPORTED
public static final Mqtt5DisconnectReasonCode CONNECTION_RATE_EXCEEDED
public static final Mqtt5DisconnectReasonCode MAXIMUM_CONNECT_TIME
public static final Mqtt5DisconnectReasonCode SUBSCRIPTION_IDENTIFIERS_NOT_SUPPORTED
public static final Mqtt5DisconnectReasonCode WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED
public static Mqtt5DisconnectReasonCode[] values()
for (Mqtt5DisconnectReasonCode c : Mqtt5DisconnectReasonCode.values()) System.out.println(c);
public static Mqtt5DisconnectReasonCode 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 Mqtt5DisconnectReasonCode fromCode(int code)
code
- the byte code.null
if the byte code is not
a valid Disconnect Reason Code.public boolean canBeSentByServer()
canBeSentByServer
in interface Mqtt5ReasonCode
public boolean canBeSentByClient()
canBeSentByClient
in interface Mqtt5ReasonCode
public boolean canBeSetByUser()
canBeSetByUser
in interface Mqtt5ReasonCode