public class MqttPahoMessageDrivenChannelAdapter extends AbstractMqttMessageDrivenChannelAdapter implements org.eclipse.paho.client.mqttv3.MqttCallback, MqttPahoComponent, ApplicationEventPublisherAware
MqttIntegrationEvent を使用する場合は、MqttPahoComponent adapter = event.getSourceAsType() を使用して参照を取得し、Bean 名と MqttConnectOptions を取得できるようにします。この手法により、同じイベントリスナー内の受信エンドポイントと送信エンドポイントの両方からのイベントを利用できます。| 修飾子と型 | フィールドと説明 |
|---|---|
static long | DEFAULT_COMPLETION_TIMEOUT ミリ秒単位のデフォルトの完了タイムアウト。 |
static long | DISCONNECT_COMPLETION_TIMEOUT ミリ秒単位のデフォルトの切断完了タイムアウト。 |
topicLocklifecycleCondition, lifecycleLockEXPRESSION_PARSER, loggerDEFAULT_PHASE| コンストラクターと説明 |
|---|
MqttPahoMessageDrivenChannelAdapter(StringSE clientId, MqttPahoClientFactory clientFactory, StringSE... topic) サーバー URI が MqttPahoClientFactory によって提供される MqttConnectOptions.getServerURIs() によって提供される場合、このコンストラクターを使用します。 |
MqttPahoMessageDrivenChannelAdapter(StringSE url, StringSE clientId, MqttPahoClientFactory clientFactory, StringSE... topic) 単一の URL に対してこのコンストラクターを使用します(ただし、サーバー URI が MqttPahoClientFactory によって提供される MqttConnectOptions.getServerURIs() によって提供される場合はオーバーライドされる場合があります)。 |
MqttPahoMessageDrivenChannelAdapter(StringSE url, StringSE clientId, StringSE... topic) 追加の MqttConnectOptions が必要ない場合は、このコンストラクターを使用します。 |
| 修飾子と型 | メソッドと説明 |
|---|---|
void | addTopic(StringSE topic, int qos) トピックを購読リストに追加します。 |
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 | getConnectionInfo() 接続に関する情報を返します。 |
void | messageArrived(StringSE topic, org.eclipse.paho.client.mqttv3.MqttMessage mqttMessage) |
void | removeTopic(StringSE... topic) 購読リストからトピックを削除します。 |
void | setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) |
void | setCompletionTimeout(long completionTimeout) 操作の完了タイムアウトを設定します。 |
void | setDisconnectCompletionTimeout(long completionTimeout) 切断時の完了タイムアウトを設定します。 |
void | setManualAcks(boolean manualAcks) 確認モードを手動に設定します。 |
void | setRecoveryInterval(int recoveryInterval) 再接続の試行の間に待機する時間(ミリ秒)。 |
addTopic, addTopics, getClientId, getComponentType, getConverter, getQos, getTopic, getUrl, onInit, setConverter, setQosafterSingletonsInstantiated, buildErrorMessage, getErrorChannel, getErrorMessageAttributes, getIntegrationPatternType, getMessagingTemplate, getOutputChannel, sendErrorMessageIfNecessary, sendMessage, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setOutputChannel, setOutputChannelName, setSendTimeout, setShouldTrack, subscribeToPublisherdestroy, doStop, getPhase, getRole, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stopafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringcloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, waitSE, waitSE, waitSEgetBeanNamesetBeanNamegetBeanName, getComponentNamepublic static final long DEFAULT_COMPLETION_TIMEOUT
public static final long DISCONNECT_COMPLETION_TIMEOUT
public MqttPahoMessageDrivenChannelAdapter(StringSE url, StringSE clientId, MqttPahoClientFactory clientFactory, StringSE... topic)
MqttPahoClientFactory によって提供される MqttConnectOptions.getServerURIs() によって提供される場合はオーバーライドされる場合があります)。url - URL。clientId - クライアント ID。clientFactory - クライアントファクトリ。topic - トピック。public MqttPahoMessageDrivenChannelAdapter(StringSE clientId, MqttPahoClientFactory clientFactory, StringSE... topic)
MqttPahoClientFactory によって提供される MqttConnectOptions.getServerURIs() によって提供される場合、このコンストラクターを使用します。clientId - クライアント ID。clientFactory - クライアントファクトリ。topic - トピック。public void setCompletionTimeout(long completionTimeout)
completionTimeout - タイムアウト。public void setDisconnectCompletionTimeout(long completionTimeout)
completionTimeout - タイムアウト。public void setRecoveryInterval(int recoveryInterval)
recoveryInterval - 間隔。public void setManualAcks(boolean manualAcks)
manualAcks - 手動の ack に当てはまります。public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher)
ApplicationEventPublisherAware の setApplicationEventPublisher public org.eclipse.paho.client.mqttv3.MqttConnectOptions getConnectionInfo()
MqttComponentMqttComponent<org.eclipse.paho.client.mqttv3.MqttConnectOptions> の getConnectionInfo MqttPahoComponent の getConnectionInfo protected void doStart()
MessageProducerSupportMessageProducerSupport の doStart protected void doStop()
MessageProducerSupportMessageProducerSupport の doStop public void addTopic(StringSE topic, int qos)
AbstractMqttMessageDrivenChannelAdapterAbstractMqttMessageDrivenChannelAdapter の addTopic topic - トピック。qos - QoS。public void removeTopic(StringSE... topic)
AbstractMqttMessageDrivenChannelAdapterAbstractMqttMessageDrivenChannelAdapter の removeTopic topic - トピック。public void connectionLost(ThrowableSE cause)
org.eclipse.paho.client.mqttv3.MqttCallback の connectionLost public void messageArrived(StringSE topic, org.eclipse.paho.client.mqttv3.MqttMessage mqttMessage)
org.eclipse.paho.client.mqttv3.MqttCallback の messageArrived public void deliveryComplete(org.eclipse.paho.client.mqttv3.IMqttDeliveryToken token)
org.eclipse.paho.client.mqttv3.MqttCallback の deliveryComplete