org.springframework.integration.mqtt.inbound
Class MqttPahoMessageDrivenChannelAdapter

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.endpoint.AbstractEndpoint
          extended by org.springframework.integration.endpoint.MessageProducerSupport
              extended by org.springframework.integration.mqtt.inbound.AbstractMqttMessageDrivenChannelAdapter
                  extended by org.springframework.integration.mqtt.inbound.MqttPahoMessageDrivenChannelAdapter
All Implemented Interfaces:
org.eclipse.paho.client.mqttv3.MqttCallback, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle, org.springframework.integration.core.MessageProducer, org.springframework.integration.history.TrackableComponent, org.springframework.integration.support.context.NamedComponent

public class MqttPahoMessageDrivenChannelAdapter
extends AbstractMqttMessageDrivenChannelAdapter
implements org.eclipse.paho.client.mqttv3.MqttCallback

Eclipse Paho Implementation.

Since:
1.0

Field Summary
 
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
logger
 
Constructor Summary
MqttPahoMessageDrivenChannelAdapter(java.lang.String url, java.lang.String clientId, MqttPahoClientFactory clientFactory, java.lang.String... topic)
           
MqttPahoMessageDrivenChannelAdapter(java.lang.String url, java.lang.String clientId, java.lang.String... topic)
           
 
Method Summary
 void connectionLost(java.lang.Throwable cause)
           
 void deliveryComplete(org.eclipse.paho.client.mqttv3.IMqttDeliveryToken token)
           
protected  void doStart()
           
protected  void doStop()
           
 void messageArrived(java.lang.String topic, org.eclipse.paho.client.mqttv3.MqttMessage mqttMessage)
           
 
Methods inherited from class org.springframework.integration.mqtt.inbound.AbstractMqttMessageDrivenChannelAdapter
getClientId, getComponentType, getConverter, getTopic, getUrl, onInit, setConverter
 
Methods inherited from class org.springframework.integration.endpoint.MessageProducerSupport
sendMessage, setErrorChannel, setOutputChannel, setSendTimeout, setShouldTrack
 
Methods inherited from class org.springframework.integration.endpoint.AbstractEndpoint
getPhase, isAutoStartup, isRunning, setAutoStartup, setPhase, setTaskScheduler, start, stop, stop
 
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.integration.support.context.NamedComponent
getComponentName
 

Constructor Detail

MqttPahoMessageDrivenChannelAdapter

public MqttPahoMessageDrivenChannelAdapter(java.lang.String url,
                                           java.lang.String clientId,
                                           MqttPahoClientFactory clientFactory,
                                           java.lang.String... topic)

MqttPahoMessageDrivenChannelAdapter

public MqttPahoMessageDrivenChannelAdapter(java.lang.String url,
                                           java.lang.String clientId,
                                           java.lang.String... topic)
Method Detail

doStart

protected void doStart()
Overrides:
doStart in class org.springframework.integration.endpoint.MessageProducerSupport

doStop

protected void doStop()
Overrides:
doStop in class org.springframework.integration.endpoint.MessageProducerSupport

connectionLost

public void connectionLost(java.lang.Throwable cause)
Specified by:
connectionLost in interface org.eclipse.paho.client.mqttv3.MqttCallback

messageArrived

public void messageArrived(java.lang.String topic,
                           org.eclipse.paho.client.mqttv3.MqttMessage mqttMessage)
                    throws java.lang.Exception
Specified by:
messageArrived in interface org.eclipse.paho.client.mqttv3.MqttCallback
Throws:
java.lang.Exception

deliveryComplete

public void deliveryComplete(org.eclipse.paho.client.mqttv3.IMqttDeliveryToken token)
Specified by:
deliveryComplete in interface org.eclipse.paho.client.mqttv3.MqttCallback