Class MqttBrokerConnection.ConnectionCallback

java.lang.Object
org.openhab.core.io.transport.mqtt.MqttBrokerConnection.ConnectionCallback
All Implemented Interfaces:
com.hivemq.client.mqtt.lifecycle.MqttClientConnectedListener, com.hivemq.client.mqtt.lifecycle.MqttClientDisconnectedListener
Enclosing class:
MqttBrokerConnection

public class MqttBrokerConnection.ConnectionCallback extends Object implements com.hivemq.client.mqtt.lifecycle.MqttClientConnectedListener, com.hivemq.client.mqtt.lifecycle.MqttClientDisconnectedListener
Create a listener object for being used as a callback for a connection attempt. The callback will interact with the AbstractReconnectStrategy as well as inform registered MqttConnectionObservers.
  • Constructor Details

  • Method Details

    • onConnected

      public void onConnected(@Nullable com.hivemq.client.mqtt.lifecycle.MqttClientConnectedContext context)
      Specified by:
      onConnected in interface com.hivemq.client.mqtt.lifecycle.MqttClientConnectedListener
    • onDisconnected

      public void onDisconnected(@Nullable com.hivemq.client.mqtt.lifecycle.MqttClientDisconnectedContext context)
      Specified by:
      onDisconnected in interface com.hivemq.client.mqtt.lifecycle.MqttClientDisconnectedListener
    • onDisconnected

      public void onDisconnected(Throwable t)
    • createFuture

      public CompletableFuture<Boolean> createFuture()