@FunctionalInterface public interface MqttClientDisconnectedListener
| Modifier and Type | Method and Description |
|---|---|
void |
onDisconnected(@NotNull MqttClientDisconnectedContext context)
Listener method which is notified in the following cases:
A client was disconnected (with or without a Disconnect message, by the server, client or user) or the
connection failed.
|
void onDisconnected(@NotNull
@NotNull MqttClientDisconnectedContext context)
CONNECTED and the MqttClientConnectionConfig will
still be present.
CONNECTING.
CONNECTING_RECONNECT.
MqttClientDisconnectedListeners
are called to
DISCONNECTED or
DISCONNECTED_RECONNECT if the client
is instructed to reconnect.
This method must not block. If you want to reconnect you have to use the supplied MqttClientDisconnectedContext.getReconnector().
context - provides context about the client that is now disconnected, the cause for disconnection and allows
reconnecting.