Interface MqttServiceObserver


  • @NonNullByDefault
    public interface MqttServiceObserver
    Implement this interface to get notified of new and removed MQTT broker. Register this observer at {@see MqttService}.
    Author:
    David Graeff - Initial contribution
    • Method Detail

      • brokerAdded

        void brokerAdded​(String brokerID,
                         MqttBrokerConnection broker)
        Called, if a new broker has been added to the {@see MqttService}. If a broker connection is replaced, you will be notified by a brokerRemoved call, followed by a brokerAdded call.
        Parameters:
        The - unique ID within MqttService
        broker - The new broker connection
      • brokerRemoved

        void brokerRemoved​(String brokerID,
                           MqttBrokerConnection broker)
        Called, if a broker has been removed from the {@see MqttService}.
        Parameters:
        The - unique ID within MqttService
        broker - The removed broker connection. Please unsubscribe from all topics and unregister all your listeners.