Enum Class Mqtt5DisconnectReasonCode
java.lang.Object
java.lang.Enum<Mqtt5DisconnectReasonCode>
com.hivemq.client.mqtt.mqtt5.message.disconnect.Mqtt5DisconnectReasonCode
- All Implemented Interfaces:
Mqtt5ReasonCode,Serializable,Comparable<Mqtt5DisconnectReasonCode>,Constable
public enum Mqtt5DisconnectReasonCode
extends Enum<Mqtt5DisconnectReasonCode>
implements Mqtt5ReasonCode
Reason Code of an
MQTT 5 Disconnect message.- Since:
- 1.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe connection is closed due to an administrative action.The authentication method is not supported or does not match the authentication method currently in use.The connection is closed because the connection rate is too high.Disconnect normally.A packet is valid but can not be processed by the implementation of the receiver.The connection is closed because no packet has been received for 1.5 times the keep alive time.A packet could not be parsed correctly according to the MQTT specification.The maximum connection time authorized for this connection has been exceeded.The received data rate is too high.Disconnect normally.The client is not authorized to perform a request.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.A payload does not match the specified payload format indicator.A packet contained data that is not allowed by the MQTT protocol or is inconsistent with the state of the receiver.The client specified a QoS greater than the maximum QoS the server sent in the CONNACK packet.An implementation or administrative imposed limit has been 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.The server does not support retained messages.The server is busy and can not continue processing requests from the client.The client should permanently use another server.The server is shutting down.Another client using the same client identifier has connected.The server does not support shared subscriptions.The server does not support subscription identifiers.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.A packet contained a topic filter that is formed correctly but is not accepted by the server.A packet contained a topic name that is formed correctly but is not accepted by the receiver.The sender either does not want to reveal the reason for the disconnect or none of the other reason codes apply.The client should temporarily use another server.The server does not support wildcard subscriptions. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanfromCode(int code) Returns the Disconnect Reason Code belonging to the given byte code.intgetCode()static Mqtt5DisconnectReasonCodeReturns the enum constant of this class with the specified name.static Mqtt5DisconnectReasonCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface com.hivemq.client.mqtt.mqtt5.message.Mqtt5ReasonCode
isError
-
Enum Constant Details
-
NORMAL_DISCONNECTION
Disconnect normally. The server must not publish the Will message. -
DISCONNECT_WITH_WILL_MESSAGE
Disconnect normally. The server must also publish the Will message. -
UNSPECIFIED_ERROR
The sender either does not want to reveal the reason for the disconnect or none of the other reason codes apply. -
MALFORMED_PACKET
A packet could not be parsed correctly according to the MQTT specification. -
PROTOCOL_ERROR
A packet contained data that is not allowed by the MQTT protocol or is inconsistent with the state of the receiver. -
IMPLEMENTATION_SPECIFIC_ERROR
A packet is valid but can not be processed by the implementation of the receiver. -
NOT_AUTHORIZED
The client is not authorized to perform a request. -
SERVER_BUSY
The server is busy and can not continue processing requests from the client. -
SERVER_SHUTTING_DOWN
The server is shutting down. -
BAD_AUTHENTICATION_METHOD
The authentication method is not supported or does not match the authentication method currently in use. -
KEEP_ALIVE_TIMEOUT
The connection is closed because no packet has been received for 1.5 times the keep alive time. -
SESSION_TAKEN_OVER
Another client using the same client identifier has connected. -
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. -
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. -
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. -
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. -
MESSAGE_RATE_TOO_HIGH
The received data rate is too high. -
QUOTA_EXCEEDED
An implementation or administrative imposed limit has been exceeded. -
ADMINISTRATIVE_ACTION
The connection is closed due to an administrative action. -
PAYLOAD_FORMAT_INVALID
A payload does not match the specified payload format indicator. -
RETAIN_NOT_SUPPORTED
The server does not support retained messages. -
QOS_NOT_SUPPORTED
The client specified a QoS greater than the maximum QoS the server sent in the CONNACK packet. -
USE_ANOTHER_SERVER
The client should temporarily use another server. -
SERVER_MOVED
The client should permanently use another server. -
SHARED_SUBSCRIPTIONS_NOT_SUPPORTED
The server does not support shared subscriptions. -
CONNECTION_RATE_EXCEEDED
The connection is closed because the connection rate is too high. -
MAXIMUM_CONNECT_TIME
The maximum connection time authorized for this connection has been exceeded. -
SUBSCRIPTION_IDENTIFIERS_NOT_SUPPORTED
The server does not support subscription identifiers. -
WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED
The server does not support wildcard subscriptions.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
getCode
public int getCode()- Specified by:
getCodein interfaceMqtt5ReasonCode- Returns:
- the byte code of this Reason Code.
-
fromCode
Returns the Disconnect Reason Code belonging to the given byte code.- Parameters:
code- the byte code.- Returns:
- the Disconnect Reason Code belonging to the given byte code or
nullif the byte code is not a valid Disconnect Reason Code.
-
canBeSentByServer
public boolean canBeSentByServer()- Specified by:
canBeSentByServerin interfaceMqtt5ReasonCode- Returns:
- whether this Reason Code can be sent by the server according to the MQTT 5 specification.
-
canBeSentByClient
public boolean canBeSentByClient()- Specified by:
canBeSentByClientin interfaceMqtt5ReasonCode- Returns:
- whether this Reason Code can be sent by the client according to the MQTT 5 specification.
-
canBeSetByUser
public boolean canBeSetByUser()- Specified by:
canBeSetByUserin interfaceMqtt5ReasonCode- Returns:
- whether this Reason Code can be set by the user.
-