クラス MqttPahoMessageHandler
java.lang.ObjectSE
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.handler.MessageHandlerSupport
org.springframework.integration.handler.AbstractMessageHandler
org.springframework.integration.mqtt.outbound.AbstractMqttMessageHandler<org.eclipse.paho.client.mqttv3.IMqttAsyncClient,org.eclipse.paho.client.mqttv3.MqttConnectOptions>
org.springframework.integration.mqtt.outbound.MqttPahoMessageHandler
- 実装されたすべてのインターフェース:
org.eclipse.paho.client.mqttv3.MqttCallback
、org.reactivestreams.Subscriber<Message<?>>
、Aware
、BeanFactoryAware
、BeanNameAware
、DisposableBean
、InitializingBean
、ApplicationContextAware
、ApplicationEventPublisherAware
、Lifecycle
、Ordered
、ComponentSourceAware
、ExpressionCapable
、Orderable
、IntegrationPattern
、MqttComponent<org.eclipse.paho.client.mqttv3.MqttConnectOptions>
、MqttPahoComponent
、NamedComponent
、IntegrationManagement
、ManageableLifecycle
、TrackableComponent
、MessageHandler
、reactor.core.CoreSubscriber<Message<?>>
public class MqttPahoMessageHandler
extends AbstractMqttMessageHandler<org.eclipse.paho.client.mqttv3.IMqttAsyncClient,org.eclipse.paho.client.mqttv3.MqttConnectOptions>
implements org.eclipse.paho.client.mqttv3.MqttCallback, MqttPahoComponent
Eclipse Paho の実装。このコンポーネントによって公開された
MqttIntegrationEvent
を使用する場合は、MqttPahoComponent handler = event.getSourceAsType()
を使用して参照を取得し、Bean 名と MqttConnectOptions
を取得できるようにします。この手法により、同じイベントリスナー内の受信エンドポイントと送信エンドポイントの両方からのイベントを利用できます。- 導入:
- 4.0
- 作成者:
- Gary Russell, Artem Bilan, Artem Vozhdayenko, Christian Tzolov
ネストされたクラスのサマリー
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverrides
フィールドのサマリー
クラス org.springframework.integration.mqtt.outbound.AbstractMqttMessageHandler から継承されたフィールド
DEFAULT_COMPLETION_TIMEOUT, DISCONNECT_COMPLETION_TIMEOUT, lock
クラス org.springframework.integration.context.IntegrationObjectSupport から継承されたフィールド
EXPRESSION_PARSER, logger
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたフィールド
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
インターフェース org.springframework.core.Ordered から継承されたフィールド
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
コンストラクターの概要
コンストラクターコンストラクター説明MqttPahoMessageHandler
(StringSE url, StringSE clientId) 追加のMqttConnectOptions
が必要ない場合は、このコンストラクターを使用します。MqttPahoMessageHandler
(StringSE url, StringSE clientId, MqttPahoClientFactory clientFactory) 単一の URL に対してこのコンストラクターを使用します(ただし、サーバー URI がMqttPahoClientFactory
によって提供されるMqttConnectOptions.getServerURIs()
によって提供される場合はオーバーライドされる場合があります)。MqttPahoMessageHandler
(StringSE clientId, MqttPahoClientFactory clientFactory) サーバー URI がMqttPahoClientFactory
によって提供されるMqttConnectOptions.getServerURIs()
によって提供される場合、このコンストラクターを使用します。MqttPahoMessageHandler
(ClientManager<org.eclipse.paho.client.mqttv3.IMqttAsyncClient, org.eclipse.paho.client.mqttv3.MqttConnectOptions> clientManager) 単一のClientManager
を使用する必要がある場合 (たとえば、MQTT 接続を再利用する場合) に、このコンストラクターを使用します。メソッドのサマリー
修飾子と型メソッド説明void
connectionLost
(ThrowableSE cause) void
deliveryComplete
(org.eclipse.paho.client.mqttv3.IMqttDeliveryToken token) protected void
doStart()
protected void
doStop()
org.eclipse.paho.client.mqttv3.MqttConnectOptions
接続に関する情報を返します。void
messageArrived
(StringSE topic, org.eclipse.paho.client.mqttv3.MqttMessage message) protected void
onInit()
サブクラスは、初期化ロジック用にこれを実装できます。protected void
クラス org.springframework.integration.mqtt.outbound.AbstractMqttMessageHandler から継承されたメソッド
getApplicationEventPublisher, getClientId, getClientInstance, getClientManager, getCompletionTimeout, getComponentType, getConverter, getDefaultQos, getDefaultRetained, getDefaultTopic, getDisconnectCompletionTimeout, getQosProcessor, getRetainedProcessor, getTopicProcessor, getUrl, handleMessageInternal, incrementClientInstance, isAsync, isRunning, messageSentEvent, sendDeliveryCompleteEvent, sendFailedDeliveryEvent, setApplicationEventPublisher, setAsync, setAsyncEvents, setCompletionTimeout, setConverter, setDefaultQos, setDefaultRetained, setDefaultTopic, setDisconnectCompletionTimeout, setQosExpression, setQosExpressionString, setRetainedExpression, setRetainedExpressionString, setTopicExpression, setTopicExpressionString, start, stop
クラス org.springframework.integration.handler.AbstractMessageHandler から継承されたメソッド
handleMessage, onComplete, onError, onNext, onSubscribe, setObservationConvention
クラス org.springframework.integration.handler.MessageHandlerSupport から継承されたメソッド
buildSendTimer, destroy, getIntegrationPatternType, getManagedName, getManagedType, getMetricsCaptor, getObservationRegistry, getOrder, getOverrides, isLoggingEnabled, isObserved, registerMetricsCaptor, registerObservationRegistry, sendTimer, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, shouldTrack
クラス 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
インターフェース reactor.core.CoreSubscriber から継承されたメソッド
currentContext
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたメソッド
getThisAs
インターフェース org.springframework.integration.mqtt.core.MqttComponent から継承されたメソッド
getBeanName
インターフェース org.springframework.integration.support.context.NamedComponent から継承されたメソッド
getBeanName, getComponentName
コンストラクターの詳細
MqttPahoMessageHandler
MqttPahoMessageHandler
単一の URL に対してこのコンストラクターを使用します(ただし、サーバー URI がMqttPahoClientFactory
によって提供されるMqttConnectOptions.getServerURIs()
によって提供される場合はオーバーライドされる場合があります)。- パラメーター:
url
- URL。clientId
- クライアント ID。clientFactory
- クライアントファクトリ。
MqttPahoMessageHandler
サーバー URI がMqttPahoClientFactory
によって提供されるMqttConnectOptions.getServerURIs()
によって提供される場合、このコンストラクターを使用します。- パラメーター:
clientId
- クライアント ID。clientFactory
- クライアントファクトリ。- 導入:
- 4.1
MqttPahoMessageHandler
public MqttPahoMessageHandler(ClientManager<org.eclipse.paho.client.mqttv3.IMqttAsyncClient, org.eclipse.paho.client.mqttv3.MqttConnectOptions> clientManager) 単一のClientManager
を使用する必要がある場合 (たとえば、MQTT 接続を再利用する場合) に、このコンストラクターを使用します。- パラメーター:
clientManager
- クライアントマネージャー。- 導入:
- 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
サブクラスは、初期化ロジック用にこれを実装できます。- オーバーライド:
- クラス
AbstractMqttMessageHandler<org.eclipse.paho.client.mqttv3.IMqttAsyncClient,
のorg.eclipse.paho.client.mqttv3.MqttConnectOptions> onInit
doStart
protected void doStart()- 次で指定:
- クラス
AbstractMqttMessageHandler<org.eclipse.paho.client.mqttv3.IMqttAsyncClient,
のorg.eclipse.paho.client.mqttv3.MqttConnectOptions> doStart
doStop
protected void doStop()- 次で指定:
- クラス
AbstractMqttMessageHandler<org.eclipse.paho.client.mqttv3.IMqttAsyncClient,
のorg.eclipse.paho.client.mqttv3.MqttConnectOptions> doStop
publish
- 次で指定:
- クラス
AbstractMqttMessageHandler<org.eclipse.paho.client.mqttv3.IMqttAsyncClient,
のorg.eclipse.paho.client.mqttv3.MqttConnectOptions> publish
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