Enum Class RetainHandling
- All Implemented Interfaces:
Serializable, Comparable<RetainHandling>, Constable
When the broker sends the retained messages that match a subscription as it makes the
subscription (the MQTT 5.0 Retain Handling option). See
Subscribe.withRetainHandling(RetainHandling).-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDo not send them when the subscription is made.Send them whenever the subscription is made, as MQTT 3.1.1 does.Send them only when the subscription did not exist in the session. -
Method Summary
Modifier and TypeMethodDescriptionstatic RetainHandlingReturns the enum constant of this class with the specified name.static RetainHandling[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SEND
Send them whenever the subscription is made, as MQTT 3.1.1 does. -
SEND_IF_NEW_SUBSCRIPTION
Send them only when the subscription did not exist in the session. A broker that resumes no session for the client, for example after a connection with Session Present false, sees the client's re-created subscriptions as new, so retained messages can arrive after each such reconnection. -
DO_NOT_SEND
Do not send them when the subscription is made.
-
-
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
-