Enum Class MqttVersion
- All Implemented Interfaces:
Serializable, Comparable<MqttVersion>, Constable
The MQTT protocol versions supported by Hato.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionintReturns the protocol level sent in the CONNECT packet.static MqttVersionReturns the enum constant of this class with the specified name.static MqttVersion[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
V3_1_1
MQTT 3.1.1. Protocol level 4 on the wire. -
V5
MQTT 5.0. Protocol level 5 on the wire.
-
-
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
-
protocolLevel
public int protocolLevel()Returns the protocol level sent in the CONNECT packet.- Returns:
- the protocol level sent in the CONNECT packet
-