Interface Mqtt5Connect

All Superinterfaces:
Mqtt5Message

@DoNotImplement public interface Mqtt5Connect extends Mqtt5Message
MQTT 5 Connect message. This message is translated from and to an MQTT 5 CONNECT packet.
Since:
1.0
  • Field Details

    • NO_KEEP_ALIVE

      static final int NO_KEEP_ALIVE
      The value that disables keep alive.
      See Also:
    • DEFAULT_KEEP_ALIVE

      static final int DEFAULT_KEEP_ALIVE
      The default keep alive in seconds a client wants to use.
      See Also:
    • DEFAULT_CLEAN_START

      static final boolean DEFAULT_CLEAN_START
      The default whether a client wants to start a clean session.
      See Also:
    • DEFAULT_SESSION_EXPIRY_INTERVAL

      static final long DEFAULT_SESSION_EXPIRY_INTERVAL
      The default session expiry interval in seconds a client wants to use.
      See Also:
    • NO_SESSION_EXPIRY

      static final long NO_SESSION_EXPIRY
      The value that disables session expiry.
      See Also:
  • Method Details

    • builder

      @NotNull static @NotNull Mqtt5ConnectBuilder 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 is NO_SESSION_EXPIRY the session does not expire.
    • getRestrictions

      @NotNull @NotNull Mqtt5ConnectRestrictions getRestrictions()
      Returns:
      the restrictions set from the client.
    • getSimpleAuth

      @NotNull @NotNull Optional<Mqtt5SimpleAuth> getSimpleAuth()
      Returns:
      the optional simple authentication and/or authorization related data of this Connect message.
    • getEnhancedAuthMechanism

      @NotNull @NotNull Optional<Mqtt5EnhancedAuthMechanism> getEnhancedAuthMechanism()
      Returns:
      the optional enhanced authentication and/or authorization mechanism of this Connect message.
    • getWillPublish

      @NotNull @NotNull Optional<Mqtt5WillPublish> getWillPublish()
      Returns:
      the optional Will Publish of this Connect message.
    • getUserProperties

      @NotNull @NotNull Mqtt5UserProperties getUserProperties()
      Returns:
      the optional user properties of this Connect message.
    • getType

      @NotNull default @NotNull Mqtt5MessageType getType()
      Specified by:
      getType in interface Mqtt5Message
      Returns:
      the type of this MQTT message.
    • extend

      @NotNull @NotNull Mqtt5ConnectBuilder extend()
      Creates a builder for extending this Connect message.
      Returns:
      the created builder.