クラス MqttPahoMessageDrivenChannelAdapter
java.lang.ObjectSE
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.endpoint.MessageProducerSupport
org.springframework.integration.mqtt.inbound.AbstractMqttMessageDrivenChannelAdapter<org.eclipse.paho.client.mqttv3.IMqttAsyncClient,org.eclipse.paho.client.mqttv3.MqttConnectOptions>
org.springframework.integration.mqtt.inbound.MqttPahoMessageDrivenChannelAdapter
- 実装されたすべてのインターフェース:
org.eclipse.paho.client.mqttv3.MqttCallback
、org.eclipse.paho.client.mqttv3.MqttCallbackExtended
、Aware
、BeanFactoryAware
、BeanNameAware
、DisposableBean
、InitializingBean
、SmartInitializingSingleton
、ApplicationContextAware
、ApplicationEventPublisherAware
、Lifecycle
、Phased
、SmartLifecycle
、ExpressionCapable
、MessageProducer
、IntegrationPattern
、ClientManager.ConnectCallback
、MqttComponent<org.eclipse.paho.client.mqttv3.MqttConnectOptions>
、MqttPahoComponent
、NamedComponent
、IntegrationInboundManagement
、IntegrationManagement
、ManageableLifecycle
、ManageableSmartLifecycle
、TrackableComponent
public class MqttPahoMessageDrivenChannelAdapter
extends AbstractMqttMessageDrivenChannelAdapter<org.eclipse.paho.client.mqttv3.IMqttAsyncClient,org.eclipse.paho.client.mqttv3.MqttConnectOptions>
implements org.eclipse.paho.client.mqttv3.MqttCallbackExtended, MqttPahoComponent
Eclipse Paho の実装。このコンポーネントによって公開された
MqttIntegrationEvent
を使用する場合は、MqttPahoComponent adapter = event.getSourceAsType()
を使用して参照を取得し、Bean 名と MqttConnectOptions
を取得できるようにします。この手法により、同じイベントリスナー内の受信エンドポイントと送信エンドポイントの両方からのイベントを利用できます。- 導入:
- 4.0
- 作成者:
- Gary Russell, Artem Bilan, Artem Vozhdayenko
ネストされたクラスのサマリー
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverrides
フィールドサマリー
クラス org.springframework.integration.mqtt.inbound.AbstractMqttMessageDrivenChannelAdapter から継承されたフィールド
topicLock
クラス org.springframework.integration.endpoint.AbstractEndpoint から継承されたフィールド
lifecycleCondition, lifecycleLock
クラス org.springframework.integration.context.IntegrationObjectSupport から継承されたフィールド
EXPRESSION_PARSER, logger
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたフィールド
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
インターフェース org.springframework.context.SmartLifecycle から継承されたフィールド
DEFAULT_PHASE
コンストラクターのサマリー
コンストラクターコンストラクター説明MqttPahoMessageDrivenChannelAdapter
(StringSE url, StringSE clientId, StringSE... topic) 追加のMqttConnectOptions
が必要ない場合は、このコンストラクターを使用します。MqttPahoMessageDrivenChannelAdapter
(StringSE url, StringSE clientId, MqttPahoClientFactory clientFactory, StringSE... topic) 単一の URL に対してこのコンストラクターを使用します(ただし、サーバー URI がMqttPahoClientFactory
によって提供されるMqttConnectOptions.getServerURIs()
によって提供される場合はオーバーライドされる場合があります)。MqttPahoMessageDrivenChannelAdapter
(StringSE clientId, MqttPahoClientFactory clientFactory, StringSE... topic) サーバー URI がMqttPahoClientFactory
によって提供されるMqttConnectOptions.getServerURIs()
によって提供される場合、このコンストラクターを使用します。MqttPahoMessageDrivenChannelAdapter
(ClientManager<org.eclipse.paho.client.mqttv3.IMqttAsyncClient, org.eclipse.paho.client.mqttv3.MqttConnectOptions> clientManager, StringSE... topic) 単一のClientManager
を使用する必要がある場合 (たとえば、MQTT 接続を再利用する場合) に、このコンストラクターを使用します。メソッドのサマリー
修飾子と型メソッド説明void
トピックを購読リストに追加します。void
connectComplete
(boolean isReconnect) サーバーへの接続が正常に完了したときに呼び出されます。void
connectComplete
(boolean reconnect, StringSE serverURI) void
connectionLost
(ThrowableSE cause) void
deliveryComplete
(org.eclipse.paho.client.mqttv3.IMqttDeliveryToken token) void
destroy()
protected void
doStart()
デフォルトでは何もしません。protected void
doStop()
デフォルトでは何もしません。org.eclipse.paho.client.mqttv3.MqttConnectOptions
接続に関する情報を返します。void
messageArrived
(StringSE topic, org.eclipse.paho.client.mqttv3.MqttMessage mqttMessage) protected void
onInit()
サブクラスは、初期化ロジック用にこれを実装できます。void
removeTopic
(StringSE... topic) 購読リストからトピックを削除します。クラス org.springframework.integration.mqtt.inbound.AbstractMqttMessageDrivenChannelAdapter から継承されたメソッド
addTopic, addTopics, getApplicationEventPublisher, getClientId, getClientManager, getCompletionTimeout, getComponentType, getConverter, getDisconnectCompletionTimeout, getQos, getTopic, getUrl, isManualAcks, setApplicationEventPublisher, setCompletionTimeout, setConverter, setDisconnectCompletionTimeout, setManualAcks, setQos
クラス org.springframework.integration.endpoint.MessageProducerSupport から継承されたメソッド
afterSingletonsInstantiated, buildErrorMessage, getErrorChannel, getErrorMessageAttributes, getErrorMessageStrategy, getIntegrationPatternType, getMessagingTemplate, getOutputChannel, isObserved, registerObservationRegistry, sendErrorMessageIfNecessary, sendMessage, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setObservationConvention, setOutputChannel, setOutputChannelName, setSendTimeout, setShouldTrack, subscribeToPublisher
クラス org.springframework.integration.endpoint.AbstractEndpoint から継承されたメソッド
doStop, getPhase, getRole, isActive, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stop
クラス org.springframework.integration.context.IntegrationObjectSupport から継承されたメソッド
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, wait, waitSE, waitSE
インターフェース org.springframework.beans.factory.BeanNameAware から継承されたメソッド
setBeanName
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたメソッド
getManagedName, getManagedType, getOverrides, getThisAs, isLoggingEnabled, registerMetricsCaptor, setLoggingEnabled, setManagedName, setManagedType
インターフェース org.springframework.integration.mqtt.core.MqttComponent から継承されたメソッド
getBeanName
インターフェース org.springframework.integration.support.context.NamedComponent から継承されたメソッド
getBeanName, getComponentName
コンストラクターの詳細
MqttPahoMessageDrivenChannelAdapter
追加のMqttConnectOptions
が必要ない場合は、このコンストラクターを使用します。- パラメーター:
url
- URL。clientId
- クライアント ID。topic
- トピック。
MqttPahoMessageDrivenChannelAdapter
public MqttPahoMessageDrivenChannelAdapter(StringSE url, StringSE clientId, MqttPahoClientFactory clientFactory, StringSE... topic) 単一の URL に対してこのコンストラクターを使用します(ただし、サーバー URI がMqttPahoClientFactory
によって提供されるMqttConnectOptions.getServerURIs()
によって提供される場合はオーバーライドされる場合があります)。- パラメーター:
url
- URL。clientId
- クライアント ID。clientFactory
- クライアントファクトリ。topic
- トピック。
MqttPahoMessageDrivenChannelAdapter
public MqttPahoMessageDrivenChannelAdapter(StringSE clientId, MqttPahoClientFactory clientFactory, StringSE... topic) サーバー URI がMqttPahoClientFactory
によって提供されるMqttConnectOptions.getServerURIs()
によって提供される場合、このコンストラクターを使用します。- パラメーター:
clientId
- クライアント ID。clientFactory
- クライアントファクトリ。topic
- トピック。- 導入:
- 4.1
MqttPahoMessageDrivenChannelAdapter
public MqttPahoMessageDrivenChannelAdapter(ClientManager<org.eclipse.paho.client.mqttv3.IMqttAsyncClient, org.eclipse.paho.client.mqttv3.MqttConnectOptions> clientManager, StringSE... topic) 単一のClientManager
を使用する必要がある場合 (たとえば、MQTT 接続を再利用する場合) に、このコンストラクターを使用します。- パラメーター:
clientManager
- クライアントマネージャー。topic
- トピック。- 導入:
- 6.0
メソッドの詳細
getConnectionInfo
public org.eclipse.paho.client.mqttv3.MqttConnectOptions getConnectionInfo()インターフェースからコピーされた説明:MqttComponent
接続に関する情報を返します。- 次で指定:
- インターフェース
MqttComponent<org.eclipse.paho.client.mqttv3.MqttConnectOptions>
のgetConnectionInfo
- 次で指定:
- インターフェース
MqttPahoComponent
のgetConnectionInfo
- 戻り値:
- 情報。
onInit
protected void onInit()クラスからコピーされた説明:IntegrationObjectSupport
サブクラスは、初期化ロジック用にこれを実装できます。- オーバーライド:
- クラス
AbstractMqttMessageDrivenChannelAdapter<org.eclipse.paho.client.mqttv3.IMqttAsyncClient,
のorg.eclipse.paho.client.mqttv3.MqttConnectOptions> onInit
doStart
protected void doStart()クラスからコピーされた説明:MessageProducerSupport
デフォルトでは何もしません。サブクラスは、ライフサイクル管理の動作が必要な場合、これをオーバーライドできます。"lifecycleLock" によって保護されています。- オーバーライド:
- クラス
MessageProducerSupport
のdoStart
doStop
protected void doStop()クラスからコピーされた説明:MessageProducerSupport
デフォルトでは何もしません。サブクラスは、ライフサイクル管理の動作が必要な場合、これをオーバーライドできます。- オーバーライド:
- クラス
MessageProducerSupport
のdoStop
destroy
public void destroy()- 次で指定:
- インターフェース
DisposableBean
のdestroy
- 次で指定:
- インターフェース
IntegrationManagement
のdestroy
- オーバーライド:
- クラス
AbstractMqttMessageDrivenChannelAdapter<org.eclipse.paho.client.mqttv3.IMqttAsyncClient,
のorg.eclipse.paho.client.mqttv3.MqttConnectOptions> destroy
addTopic
クラスからコピーされた説明:AbstractMqttMessageDrivenChannelAdapter
トピックを購読リストに追加します。- オーバーライド:
- クラス
AbstractMqttMessageDrivenChannelAdapter<org.eclipse.paho.client.mqttv3.IMqttAsyncClient,
のorg.eclipse.paho.client.mqttv3.MqttConnectOptions> addTopic
- パラメーター:
topic
- トピック。qos
- QoS。
removeTopic
クラスからコピーされた説明:AbstractMqttMessageDrivenChannelAdapter
購読リストからトピックを削除します。- オーバーライド:
- クラス
AbstractMqttMessageDrivenChannelAdapter<org.eclipse.paho.client.mqttv3.IMqttAsyncClient,
のorg.eclipse.paho.client.mqttv3.MqttConnectOptions> removeTopic
- パラメーター:
topic
- トピック。
connectionLost
- 次で指定:
- インターフェース
org.eclipse.paho.client.mqttv3.MqttCallback
のconnectionLost
messageArrived
- 次で指定:
- インターフェース
org.eclipse.paho.client.mqttv3.MqttCallback
のmessageArrived
deliveryComplete
public void deliveryComplete(org.eclipse.paho.client.mqttv3.IMqttDeliveryToken token) - 次で指定:
- インターフェース
org.eclipse.paho.client.mqttv3.MqttCallback
のdeliveryComplete
connectComplete
public void connectComplete(boolean isReconnect) インターフェースからコピーされた説明:ClientManager.ConnectCallback
サーバーへの接続が正常に完了したときに呼び出されます。- 次で指定:
- インターフェース
ClientManager.ConnectCallback
のconnectComplete
- パラメーター:
isReconnect
- true の場合、接続は自動再接続の結果です。
connectComplete
- 次で指定:
- インターフェース
org.eclipse.paho.client.mqttv3.MqttCallbackExtended
のconnectComplete