Enum Class Mqtt3ConnAckReturnCode
java.lang.Object
java.lang.Enum<Mqtt3ConnAckReturnCode>
com.hivemq.client.mqtt.mqtt3.message.connect.connack.Mqtt3ConnAckReturnCode
- All Implemented Interfaces:
Mqtt3ReturnCode,Serializable,Comparable<Mqtt3ConnAckReturnCode>,Constable
Return Code of an
MQTT 3 ConnAck 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 server does not accept the user name or password specified by the client.The client identifier is formed correctly but is not accepted by the server.The client is not authorized to connect.The MQTT service is not available.The connection is accepted.The server does not support the version of the MQTT protocol requested by the client. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable Mqtt3ConnAckReturnCodefromCode(int code) Returns the ConnAck Return Code belonging to the given byte code.intgetCode()booleanisError()static Mqtt3ConnAckReturnCodeReturns the enum constant of this class with the specified name.static Mqtt3ConnAckReturnCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SUCCESS
The connection is accepted. -
UNSUPPORTED_PROTOCOL_VERSION
The server does not support the version of the MQTT protocol requested by the client. -
IDENTIFIER_REJECTED
The client identifier is formed correctly but is not accepted by the server. -
SERVER_UNAVAILABLE
The MQTT service is not available. -
BAD_USER_NAME_OR_PASSWORD
The server does not accept the user name or password specified by the client. -
NOT_AUTHORIZED
The client is not authorized to connect.
-
-
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 interfaceMqtt3ReturnCode- Returns:
- the byte code of this Return Code.
-
isError
public boolean isError()- Specified by:
isErrorin interfaceMqtt3ReturnCode- Returns:
- whether this Return Code is an Error Code.
-
fromCode
Returns the ConnAck Return Code belonging to the given byte code.- Parameters:
code- the byte code.- Returns:
- the ConnAck Return Code belonging to the given byte code or
nullif the byte code is not a valid ConnAck Return Code.
-