クラス 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、ComponentSourceAware、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 から継承されたフィールド
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トピックを購読リストに追加します。voidconnectComplete(boolean isReconnect) サーバーへの接続が正常に完了したときに呼び出されます。voidconnectComplete(boolean reconnect, StringSE serverURI) voidconnectionLost(ThrowableSE cause) voiddeliveryComplete(org.eclipse.paho.client.mqttv3.IMqttDeliveryToken token) voiddestroy()protected voiddoStart()デフォルトでは何もしません。protected voiddoStop()デフォルトでは何もしません。org.eclipse.paho.client.mqttv3.MqttConnectOptions接続に関する情報を返します。voidmessageArrived(StringSE topic, org.eclipse.paho.client.mqttv3.MqttMessage mqttMessage) protected voidonInit()サブクラスは、初期化ロジック用にこれを実装できます。voidremoveTopic(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, getRequiredOutputChannel, 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, getComponentDescription, getComponentName, getComponentSource, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentDescription, setComponentName, setComponentSource, 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
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