Class MqttAsyncCallback

  • All Implemented Interfaces:
    org.eclipse.paho.client.mqttv3.MqttCallback

    public class MqttAsyncCallback
    extends OneTimeTriggerAbstractCallback
    implements org.eclipse.paho.client.mqttv3.MqttCallback
    MQTT Asynchronous call back handler
    • Constructor Detail

      • MqttAsyncCallback

        public MqttAsyncCallback​(org.eclipse.paho.client.mqttv3.MqttAsyncClient mqttAsyncClient,
                                 MqttInjectHandler injectHandler,
                                 MqttConnectionFactory confac,
                                 org.eclipse.paho.client.mqttv3.MqttConnectOptions connectOptions,
                                 Properties mqttProperties)
    • Method Detail

      • connectionLost

        public void connectionLost​(Throwable throwable)
        Handle losing connection with the server. Here we just print it to the test console.
        Specified by:
        connectionLost in interface org.eclipse.paho.client.mqttv3.MqttCallback
        Parameters:
        throwable - Throwable connection lost
      • messageArrived

        public void messageArrived​(String topic,
                                   org.eclipse.paho.client.mqttv3.MqttMessage mqttMessage)
                            throws org.eclipse.paho.client.mqttv3.MqttException
        Specified by:
        messageArrived in interface org.eclipse.paho.client.mqttv3.MqttCallback
        Throws:
        org.eclipse.paho.client.mqttv3.MqttException
      • deliveryComplete

        public void deliveryComplete​(org.eclipse.paho.client.mqttv3.IMqttDeliveryToken iMqttDeliveryToken)
        Specified by:
        deliveryComplete in interface org.eclipse.paho.client.mqttv3.MqttCallback
      • setMqttConnectionConsumer

        public void setMqttConnectionConsumer​(MqttConnectionConsumer connectionConsumer)
      • getMqttConnectionOptions

        public org.eclipse.paho.client.mqttv3.MqttConnectOptions getMqttConnectionOptions()
      • updateInjectHandler

        public void updateInjectHandler​(MqttInjectHandler injectHandler)
      • setName

        public void setName​(String name)
        Set the inbound endpoint name
        Parameters:
        name -
      • getName

        public String getName()
        get the inbound endpoint name
        Returns:
        name