MQTT

## Class MQTTListener

- java.lang.Object
- - MQTT.MQTTListener

All Implemented Interfaces:
  org.fusesource.mqtt.client.Listener

    public class MQTTListener
    extends java.lang.Object
    implements org.fusesource.mqtt.client.Listener

The listener interface for receiving MQTT events. The class that is interested in processing a MQTT event implements this interface, and the object created with that class is registered with a component using the component's `addMQTTListener`method. When the MQTT event occurs, that object's appropriate method is invoked.``

See Also:
  `MQTTEvent`

### Constructor Summary

Constructors
Constructor and Description
`MQTTListener(MQTTCommunication com)` Instantiates a new MQTT listener.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `onConnected()`
`void` `onDisconnected()`
`void` `onFailure(java.lang.Throwable value)`
`void` `onPublish(org.fusesource.hawtbuf.UTF8Buffer topic, org.fusesource.hawtbuf.Buffer payload, java.lang.Runnable ack)`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### MQTTListener

    public MQTTListener(MQTTCommunication com)

Instantiates a new MQTT listener.

Parameters:
  `com` - the com

### Method Detail

#### onConnected

    public void onConnected()

Specified by:
  `onConnected` in interface `org.fusesource.mqtt.client.Listener`

#### onDisconnected

    public void onDisconnected()

Specified by:
  `onDisconnected` in interface `org.fusesource.mqtt.client.Listener`

#### onFailure

    public void onFailure(java.lang.Throwable value)

Specified by:
  `onFailure` in interface `org.fusesource.mqtt.client.Listener`

#### onPublish

    public void onPublish(org.fusesource.hawtbuf.UTF8Buffer topic,
                          org.fusesource.hawtbuf.Buffer payload,
                          java.lang.Runnable ack)

Specified by:
  `onPublish` in interface `org.fusesource.mqtt.client.Listener`