Package com.hivemq.client.mqtt
Interface MqttClientConfig
- All Known Subinterfaces:
Mqtt3ClientConfig,Mqtt5ClientConfig
Configuration of an
MqttClient.- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionReturns the identifier of the client.@NotNull Optional<? extends MqttClientConnectionConfig> Returns the optional connection configuration of the client.default @NotNull InetSocketAddressdefault intdefault @NotNull Optional<MqttClientSslConfig> getState()default @NotNull Optional<MqttWebSocketConfig>
-
Method Details
-
getMqttVersion
- Returns:
- the MQTT version of the client.
-
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
- Returns:
- the server address the client connects to.
- Since:
- 1.1
-
getServerHost
- Returns:
- the server host the clients connects to.
-
getServerPort
default int getServerPort()- Returns:
- the server port the client connects to.
-
getSslConfig
- Returns:
- the optional secure transport configuration of the client.
-
getWebSocketConfig
- Returns:
- the optional WebSocket configuration of the client.
-
getTransportConfig
- Returns:
- the transport configuration of the client.
- Since:
- 1.1
-
getExecutorConfig
- Returns:
- the executor configuration of the client.
-
getAutomaticReconnect
- Returns:
- the optional automatic reconnect strategy of the client.
- Since:
- 1.1
-
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
- Returns:
- the state of the client.
-
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.
-