Interface Mqtt5Connect
- All Superinterfaces:
Mqtt5Message
MQTT 5 Connect message. This message is translated from and to an MQTT 5 CONNECT packet.
- Since:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanThe default whether a client wants to start a clean session.static final intThe default keep alive in seconds a client wants to use.static final longThe default session expiry interval in seconds a client wants to use.static final intThe value that disables keep alive.static final longThe value that disables session expiry. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull Mqtt5ConnectBuilderbuilder()Creates a builder for a Connect message.extend()Creates a builder for extending this Connect message.intlongdefault @NotNull Mqtt5MessageTypegetType()boolean
-
Field Details
-
NO_KEEP_ALIVE
static final int NO_KEEP_ALIVEThe value that disables keep alive.- See Also:
-
DEFAULT_KEEP_ALIVE
static final int DEFAULT_KEEP_ALIVEThe default keep alive in seconds a client wants to use.- See Also:
-
DEFAULT_CLEAN_START
static final boolean DEFAULT_CLEAN_STARTThe default whether a client wants to start a clean session.- See Also:
-
DEFAULT_SESSION_EXPIRY_INTERVAL
static final long DEFAULT_SESSION_EXPIRY_INTERVALThe default session expiry interval in seconds a client wants to use.- See Also:
-
NO_SESSION_EXPIRY
static final long NO_SESSION_EXPIRYThe value that disables session expiry.- See Also:
-
-
Method Details
-
builder
Creates a builder for a Connect message.- Returns:
- the created builder.
-
getKeepAlive
int getKeepAlive()- Returns:
- the keep alive in seconds the client wants to use.
-
isCleanStart
boolean isCleanStart()- Returns:
- whether the client has no session present or wants to clear a present session.
-
getSessionExpiryInterval
long getSessionExpiryInterval()- Returns:
- the session expiry interval in seconds the client wants to use. The default is
DEFAULT_SESSION_EXPIRY_INTERVAL. If it isNO_SESSION_EXPIRYthe session does not expire.
-
getRestrictions
- Returns:
- the restrictions set from the client.
-
getSimpleAuth
- Returns:
- the optional simple authentication and/or authorization related data of this Connect message.
-
getEnhancedAuthMechanism
- Returns:
- the optional enhanced authentication and/or authorization mechanism of this Connect message.
-
getWillPublish
- Returns:
- the optional Will Publish of this Connect message.
-
getUserProperties
- Returns:
- the optional user properties of this Connect message.
-
getType
- Specified by:
getTypein interfaceMqtt5Message- Returns:
- the type of this MQTT message.
-
extend
Creates a builder for extending this Connect message.- Returns:
- the created builder.
-