Class MqttBrokerConnection.ConnectionCallback

  • All Implemented Interfaces:
    com.hivemq.client.mqtt.lifecycle.MqttClientConnectedListener, com.hivemq.client.mqtt.lifecycle.MqttClientDisconnectedListener
    Enclosing class:
    MqttBrokerConnection

    @NonNullByDefault
    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 Detail

    • Method Detail

      • 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)