クラス 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 class
static 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 から継承されたフィールド
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
コンストラクターの概要
コンストラクターコンストラクター説明AmqpInboundChannelAdapter
(MessageListenerContainer listenerContainer) 提供されたコンテナーを使用してインスタンスを構築します。メソッドのサマリー
修飾子と型メソッド説明int
スケジューラー、エグゼキューターなどの通常のシャットダウンの後、シャットダウン遅延が経過した後、残りのアクティブなスケジューラー / エグゼキュータースレッドの強制シャットダウンの前に呼び出されます。オプションで、まだ処理中のアクティブなメッセージの数を返すことができます。int
シャットダウンが始まる前に呼び出されます。protected void
doStart()
デフォルトでは何もしません。protected void
doStop()
デフォルトでは何もしません。サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。protected AttributeAccessor
getErrorMessageAttributes
(Message<?> message) errorMessageStrategy
でエラーメッセージを作成するときに使用するAttributeAccessor
を設定します。protected void
onInit()
サブクラスは、初期化ロジック用にこれを実装できます。void
setBatchingStrategy
(BatchingStrategy batchingStrategy) バッチプロデューサー(BatchingRabbitTemplate など)によって作成されたメッセージをバッチ解除するときに使用するバッチ戦略を設定します。void
setBatchMode
(AmqpInboundChannelAdapter.BatchMode batchMode) リスナーコンテナーが consumerBatchEnabled で構成されている場合は、バッチ用に生成されるメッセージのペイロード型を設定します。void
setBindSourceMessage
(boolean bindSourceMessage) IntegrationMessageHeaderAccessor.SOURCE_DATA
という名前のヘッダーのソースメッセージをバインドするには、true に設定します。void
setHeaderMapper
(AmqpHeaderMapper headerMapper) void
setHeaderNameForBatchedHeaders
(StringSE headerNameForBatchedHeaders) バッチモードがAmqpInboundChannelAdapter.BatchMode.EXTRACT_PAYLOADS_WITH_HEADERS
の場合、List<Map<String, Object>
ヘッダーを含むヘッダー名を設定します。void
setMessageConverter
(MessageConverter messageConverter) void
setMessageRecoverer
(MessageRecoverer messageRecoverer) 再試行操作用にMessageRecoverer
を構成します。void
setRecoveryCallback
(org.springframework.retry.RecoveryCallback<?> recoveryCallback) アダプター内で再試行を使用する場合は、RecoveryCallback
を設定します。void
setRetryTemplate
(org.springframework.retry.support.RetryTemplate retryTemplate) アダプター内でメッセージ配信を再試行するために使用するRetryTemplate
を設定します。クラス org.springframework.integration.endpoint.MessageProducerSupport から継承されたメソッド
afterSingletonsInstantiated, buildErrorMessage, getErrorChannel, getErrorMessageStrategy, getIntegrationPatternType, getMessagingTemplate, getOutputChannel, 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
を設定します。コンテナーレベルでの再試行の追加とは異なり、これをErrorMessageSendingRecoverer
RecoveryCallback
とともに使用して、再試行が終了した後にエラーチャネルに公開できます。通常、ここで再試行を使用する場合はエラーチャネルを設定しないでください。代わりに、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
クラスからコピーされた説明:MessageProducerSupport
errorMessageStrategy
でエラーメッセージを作成するときに使用するAttributeAccessor
を設定します。- オーバーライド:
- クラス
MessageProducerSupport
のgetErrorMessageAttributes
- パラメーター:
message
- メッセージ。- 戻り値:
- 属性。