クラス AmqpInboundChannelAdapter
java.lang.ObjectSE
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.endpoint.MessageProducerSupport
org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter
- 実装されているすべてのインターフェース:
Aware、BeanFactoryAware、BeanNameAware、DisposableBean、InitializingBean、SmartInitializingSingleton、ApplicationContextAware、Lifecycle、Phased、SmartLifecycle、ComponentSourceAware、ExpressionCapable、OrderlyShutdownCapable、MessageProducer、IntegrationPattern、NamedComponent、IntegrationInboundManagement、IntegrationManagement、ManageableLifecycle、ManageableSmartLifecycle、TrackableComponent
public class AmqpInboundChannelAdapter
extends MessageProducerSupport
implements OrderlyShutdownCapable
AMQP キューからメッセージを受信し、Spring Integration メッセージに変換し、結果をメッセージチャネルに送信するアダプター。
- 導入:
- 2.1
- 作成者:
- Mark Fisher, Gary Russell, Artem Bilan, Ngoc Nhan
ネストされたクラスの要約
ネストされたクラス修飾子と型クラス説明protected classstatic enumリスナーコンテナーが consumerBatchEnabled で構成されている場合のペイロード型を定義します。protected classインターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverridesフィールドのサマリー
フィールド修飾子と型フィールド説明static final StringSEバッチモードがAmqpInboundChannelAdapter.BatchMode.EXTRACT_PAYLOADS_WITH_HEADERSの場合、List<Map<String, Object>ヘッダーを含むヘッダー。クラス 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コンストラクターの概要
コンストラクターコンストラクター説明AmqpInboundChannelAdapter(MessageListenerContainer listenerContainer) 提供されたコンテナーを使用してインスタンスを構築します。メソッドのサマリー
修飾子と型メソッド説明intスケジューラー、エグゼキューターなどの通常のシャットダウンの後、シャットダウン遅延が経過した後、残りのアクティブなスケジューラー / エグゼキュータースレッドの強制シャットダウンの前に呼び出されます。オプションで、まだ処理中のアクティブなメッセージの数を返すことができます。intシャットダウンが始まる前に呼び出されます。protected voiddoStart()デフォルトでは何もしません。protected voiddoStop()デフォルトでは何もしません。サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。protected AttributeAccessorgetErrorMessageAttributes(Message<?> message) errorMessageStrategyでエラーメッセージを作成するときに使用するAttributeAccessorを設定します。protected voidonInit()サブクラスは、初期化ロジック用にこれを実装できます。voidsetBatchingStrategy(BatchingStrategy batchingStrategy) バッチプロデューサー(BatchingRabbitTemplate など)によって作成されたメッセージをバッチ解除するときに使用するバッチ戦略を設定します。voidsetBatchMode(AmqpInboundChannelAdapter.BatchMode batchMode) リスナーコンテナーが consumerBatchEnabled で構成されている場合は、バッチ用に生成されるメッセージのペイロード型を設定します。voidsetBindSourceMessage(boolean bindSourceMessage) IntegrationMessageHeaderAccessor.SOURCE_DATAという名前のヘッダーのソースメッセージをバインドするには、true に設定します。voidsetHeaderMapper(AmqpHeaderMapper headerMapper) voidsetHeaderNameForBatchedHeaders(StringSE headerNameForBatchedHeaders) バッチモードがAmqpInboundChannelAdapter.BatchMode.EXTRACT_PAYLOADS_WITH_HEADERSの場合、List<Map<String, Object>ヘッダーを含むヘッダー名を設定します。voidsetMessageConverter(MessageConverter messageConverter) voidsetMessageRecoverer(MessageRecoverer messageRecoverer) 再試行操作用にMessageRecovererを構成します。voidsetRecoveryCallback(org.springframework.retry.RecoveryCallback<?> recoveryCallback) アダプター内で再試行を使用する場合は、RecoveryCallbackを設定します。voidsetRetryTemplate(org.springframework.retry.support.RetryTemplate retryTemplate) アダプター内でメッセージ配信を再試行するために使用するRetryTemplateを設定します。クラス org.springframework.integration.endpoint.MessageProducerSupport から継承されたメソッド
afterSingletonsInstantiated, buildErrorMessage, getErrorChannel, getErrorMessageStrategy, getIntegrationPatternType, getMessagingTemplate, getOutputChannel, getRequiredOutputChannel, isObserved, registerObservationRegistry, sendErrorMessageIfNecessary, sendMessage, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setObservationConvention, setOutputChannel, setOutputChannelName, setSendTimeout, setShouldTrack, subscribeToPublisherクラス org.springframework.integration.endpoint.AbstractEndpoint から継承されたメソッド
destroy, 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.integration.support.management.IntegrationManagement から継承されたメソッド
destroy, getManagedName, getManagedType, getOverrides, getThisAs, isLoggingEnabled, registerMetricsCaptor, setLoggingEnabled, setManagedName, setManagedTypeインターフェース org.springframework.integration.support.context.NamedComponent から継承されたメソッド
getBeanName, getComponentName
フィールドの詳細
CONSOLIDATED_HEADERS
バッチモードがAmqpInboundChannelAdapter.BatchMode.EXTRACT_PAYLOADS_WITH_HEADERSの場合、List<Map<String, Object>ヘッダーを含むヘッダー。- 関連事項:
コンストラクターの詳細
AmqpInboundChannelAdapter
提供されたコンテナーを使用してインスタンスを構築します。- パラメーター:
listenerContainer- コンテナー。
メソッドの詳細
setMessageConverter
setHeaderMapper
setRetryTemplate
public void setRetryTemplate(org.springframework.retry.support.RetryTemplate retryTemplate) アダプター内でメッセージ配信を再試行するために使用するRetryTemplateを設定します。コンテナーレベルでの再試行の追加とは異なり、これをErrorMessageSendingRecovererRecoveryCallbackとともに使用して、再試行が終了した後にエラーチャネルに公開できます。通常、ここで再試行を使用する場合はエラーチャネルを設定しないでください。代わりに、RecoveryCallbackを使用してください。- パラメーター:
retryTemplate- テンプレート。- 導入:
- 4.3.10.
- 関連事項:
setRecoveryCallback
public void setRecoveryCallback(org.springframework.retry.RecoveryCallback<?> recoveryCallback) アダプター内で再試行を使用する場合は、RecoveryCallbackを設定してください。setMessageRecoverer(MessageRecoverer)と相互に排他的です。- パラメーター:
recoveryCallback- コールバック。- 導入:
- 4.3.10
- 関連事項:
setMessageRecoverer
再試行操作用にMessageRecovererを構成します。setRecoveryCallback(RecoveryCallback)の代わりに AMQP 固有の便利さ。- パラメーター:
messageRecoverer- 使用するMessageRecoverer。- 導入:
- 5.5
setBatchingStrategy
バッチプロデューサー(BatchingRabbitTemplate など)によって作成されたメッセージをバッチ解除するときに使用するバッチ戦略を設定します。デフォルトはSimpleBatchingStrategyです。- パラメーター:
batchingStrategy- 戦略。- 導入:
- 5.2
setBindSourceMessage
public void setBindSourceMessage(boolean bindSourceMessage) IntegrationMessageHeaderAccessor.SOURCE_DATAという名前のヘッダーのソースメッセージをバインドするには、true に設定します。- パラメーター:
bindSourceMessage- バインドする場合は true。- 導入:
- 5.1.6
setBatchMode
リスナーコンテナーが consumerBatchEnabled で構成されている場合は、バッチ用に生成されたメッセージのペイロード型を設定します。デフォルトはAmqpInboundChannelAdapter.BatchMode.MESSAGESです。- パラメーター:
batchMode- バッチモード。- 導入:
- 5.3
setHeaderNameForBatchedHeaders
バッチモードがAmqpInboundChannelAdapter.BatchMode.EXTRACT_PAYLOADS_WITH_HEADERSの場合、List<Map<String, Object>ヘッダーを含むヘッダー名を設定します。デフォルトはCONSOLIDATED_HEADERSです。- パラメーター:
headerNameForBatchedHeaders- バッチモードがAmqpInboundChannelAdapter.BatchMode.EXTRACT_PAYLOADS_WITH_HEADERSの場合のList<Map<String, Object>ヘッダーを含むヘッダーの名前。- 導入:
- 6.4
getComponentType
クラスからコピーされた説明:IntegrationObjectSupportサブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。- 次で指定:
- インターフェース
NamedComponentのgetComponentType - オーバーライド:
- クラス
IntegrationObjectSupportのgetComponentType
onInit
protected void onInit()クラスからコピーされた説明:IntegrationObjectSupportサブクラスは、初期化ロジック用にこれを実装できます。- オーバーライド:
- クラス
MessageProducerSupportのonInit
doStart
protected void doStart()クラスからコピーされた説明:MessageProducerSupportデフォルトでは何も実行されません。ライフサイクル管理された動作が必要な場合、サブクラスはこれをオーバーライドできます。'lifecycleLock' によって保護されています。- オーバーライド:
- クラス
MessageProducerSupportのdoStart
doStop
protected void doStop()クラスからコピーされた説明:MessageProducerSupportデフォルトでは何もしません。サブクラスは、ライフサイクル管理の動作が必要な場合、これをオーバーライドできます。- オーバーライド:
- クラス
MessageProducerSupportのdoStop
beforeShutdown
public int beforeShutdown()インターフェースからコピーされた説明:OrderlyShutdownCapableシャットダウンが始まる前に呼び出されます。実装は、新しいメッセージの受け入れを停止する必要があります。オプションで、処理中のアクティブなメッセージの数を返すことができます。- 次で指定:
- インターフェース
OrderlyShutdownCapableのbeforeShutdown - 戻り値:
- 使用可能な場合、アクティブなメッセージの数。
afterShutdown
public int afterShutdown()インターフェースからコピーされた説明:OrderlyShutdownCapableスケジューラー、エグゼキューターなどの通常のシャットダウンの後、シャットダウン遅延が経過した後、残りのアクティブなスケジューラー / エグゼキュータースレッドの強制シャットダウンの前に呼び出されます。オプションで、まだ処理中のアクティブなメッセージの数を返すことができます。- 次で指定:
- インターフェース
OrderlyShutdownCapableのafterShutdown - 戻り値:
- 使用可能な場合、アクティブなメッセージの数。
getErrorMessageAttributes
クラスからコピーされた説明:MessageProducerSupporterrorMessageStrategyでエラーメッセージを作成するときに使用するAttributeAccessorを設定します。- オーバーライド:
- クラス
MessageProducerSupportのgetErrorMessageAttributes - パラメーター:
message- メッセージ。- 戻り値:
- 属性。