Interface MqttClientConfig

All Known Subinterfaces:
Mqtt3ClientConfig, Mqtt5ClientConfig

@DoNotImplement public interface MqttClientConfig
Configuration of an MqttClient.
Since:
1.0
  • Method Details

    • getMqttVersion

      @NotNull @NotNull MqttVersion getMqttVersion()
      Returns:
      the MQTT version of the client.
    • getClientIdentifier

      @NotNull @NotNull Optional<MqttClientIdentifier> getClientIdentifier()
      Returns the identifier of the client. It is not present if it was not specified by the client itself but is assigned by the server and the server did not tell the assigned Client Identifier yet.
      Returns:
      the (currently not present) identifier of the client.
    • getServerAddress

      @NotNull default @NotNull InetSocketAddress getServerAddress()
      Returns:
      the server address the client connects to.
      Since:
      1.1
    • getServerHost

      @NotNull default @NotNull String getServerHost()
      Returns:
      the server host the clients connects to.
    • getServerPort

      default int getServerPort()
      Returns:
      the server port the client connects to.
    • getSslConfig

      @NotNull default @NotNull Optional<MqttClientSslConfig> getSslConfig()
      Returns:
      the optional secure transport configuration of the client.
    • getWebSocketConfig

      @NotNull default @NotNull Optional<MqttWebSocketConfig> getWebSocketConfig()
      Returns:
      the optional WebSocket configuration of the client.
    • getTransportConfig

      @NotNull @NotNull MqttClientTransportConfig getTransportConfig()
      Returns:
      the transport configuration of the client.
      Since:
      1.1
    • getExecutorConfig

      @NotNull @NotNull MqttClientExecutorConfig getExecutorConfig()
      Returns:
      the executor configuration of the client.
    • getAutomaticReconnect

      @NotNull @NotNull Optional<MqttClientAutoReconnect> getAutomaticReconnect()
      Returns:
      the optional automatic reconnect strategy of the client.
      Since:
      1.1
    • getConnectedListeners

      @NotNull @Immutable @NotNull List<@NotNull MqttClientConnectedListener> getConnectedListeners()
      Returns:
      the listeners which are notified (in the order of the list) when this client is connected (a successful ConnAck message is received).
      Since:
      1.1
    • getDisconnectedListeners

      @NotNull @Immutable @NotNull List<@NotNull MqttClientDisconnectedListener> getDisconnectedListeners()
      Returns:
      the listeners which are notified (in the order of the list) when this client is disconnected (with or without a Disconnect message) or the connection fails.
      Since:
      1.1
    • getState

      @NotNull @NotNull MqttClientState getState()
      Returns:
      the state of the client.
    • getConnectionConfig

      @NotNull @NotNull Optional<? extends MqttClientConnectionConfig> getConnectionConfig()
      Returns the optional connection configuration of the client. It is present if the client is connected and has received the ConnAck message.
      Returns:
      the optional connection configuration of the client.