public enum Mqtt3ConnAckReturnCode extends Enum<Mqtt3ConnAckReturnCode> implements Mqtt3ReturnCode
MQTT 3 ConnAck message.| Enum Constant and Description |
|---|
BAD_USER_NAME_OR_PASSWORD
The server does not accept the user name or password specified by the client.
|
IDENTIFIER_REJECTED
The client identifier is formed correctly but is not accepted by the server.
|
NOT_AUTHORIZED
The client is not authorized to connect.
|
SERVER_UNAVAILABLE
The MQTT service is not available.
|
SUCCESS
The connection is accepted.
|
UNSUPPORTED_PROTOCOL_VERSION
The server does not support the version of the MQTT protocol requested by the client.
|
| Modifier and Type | Method and Description |
|---|---|
static @Nullable Mqtt3ConnAckReturnCode |
fromCode(int code)
Returns the ConnAck Return Code belonging to the given byte code.
|
int |
getCode() |
boolean |
isError() |
static Mqtt3ConnAckReturnCode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Mqtt3ConnAckReturnCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Mqtt3ConnAckReturnCode SUCCESS
public static final Mqtt3ConnAckReturnCode UNSUPPORTED_PROTOCOL_VERSION
public static final Mqtt3ConnAckReturnCode IDENTIFIER_REJECTED
public static final Mqtt3ConnAckReturnCode SERVER_UNAVAILABLE
public static final Mqtt3ConnAckReturnCode BAD_USER_NAME_OR_PASSWORD
public static final Mqtt3ConnAckReturnCode NOT_AUTHORIZED
public static Mqtt3ConnAckReturnCode[] values()
for (Mqtt3ConnAckReturnCode c : Mqtt3ConnAckReturnCode.values()) System.out.println(c);
public static Mqtt3ConnAckReturnCode 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 Mqtt3ReturnCodepublic boolean isError()
isError in interface Mqtt3ReturnCode@Nullable public static @Nullable Mqtt3ConnAckReturnCode fromCode(int code)
code - the byte code.null if the byte code is not a
valid ConnAck Return Code.