クラス MessageHandlerChain
java.lang.ObjectSE
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.handler.MessageHandlerSupport
org.springframework.integration.handler.AbstractMessageHandler
org.springframework.integration.handler.AbstractMessageProducingHandler
org.springframework.integration.handler.MessageHandlerChain
- 実装済みのインターフェース一覧:
org.reactivestreams.Subscriber<Message<?>>、Aware、BeanFactoryAware、BeanNameAware、DisposableBean、InitializingBean、ApplicationContextAware、Lifecycle、Ordered、ComponentSourceAware、ExpressionCapable、Orderable、MessageProducer、CompositeMessageHandler、HeaderPropagationAware、IntegrationPattern、NamedComponent、IntegrationManagement、ManageableLifecycle、TrackableComponent、MessageHandler、reactor.core.CoreSubscriber<Message<?>>
public class MessageHandlerChain
extends AbstractMessageProducingHandler
implements CompositeMessageHandler, ManageableLifecycle
MessageHandler インスタンスのチェーンを順番に呼び出す複合
MessageHandler 実装。 最後のハンドラーを除く各ハンドラーは、MessageProducer インターフェースを実装する必要があります。最後のハンドラーは、チェーン自体に出力チャネルが構成されている場合にも必要です。ハンドラーの型について他の前提はありません。
強制されていませんが、各ハンドラーが応答メッセージを生成してその出力チャネルに送信することが期待されます。たとえば MessageFilter を使用して、チェーンの途中でメッセージをフィルタリングすることができます。null を返す MessageHandler でも同じ効果がありますが、このオプションはあまり表現力がありません。
このコンポーネントを名前空間から使用して、暗黙的に作成できるチャネルを削除することにより、構成の可読性を向上させることができます。
<chain>
<filter ref="someFilter"/>
<bean class="SomeMessageHandlerImplementation"/>
<transformer ref="someTransformer"/>
<aggregator ... />
</chain>
- 作成者:
- Mark Fisher, Iwein Fuld, Gary Russell, Artem Bilan, Trung Pham, Christian Tzolov
ネストされたクラスの概要
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverridesフィールド概要
クラス org.springframework.integration.handler.AbstractMessageProducingHandler から継承されたフィールド
messagingTemplateクラス 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コンストラクター概要
コンストラクター方法の概要
修飾子と型メソッド説明ハンドラーの変更不可能なリストを返します。このコンポーネントが実装するパターン型を返します。protected voidhandleMessageInternal(Message<?> message) final booleanprotected voidonInit()サブクラスは、初期化ロジック用にこれを実装できます。voidsetHandlers(ListSE<MessageHandler> handlers) protected booleanサブクラスはこれをオーバーライドできます。final voidstart()final voidstop()final voidstop(RunnableSE callback) クラス org.springframework.integration.handler.AbstractMessageProducingHandler から継承されたメソッド
addNotPropagatedHeaders, createOutputMessage, getNotPropagatedHeaders, getOutputChannel, isAsync, messageBuilderForReply, produceOutput, resolveErrorChannel, sendErrorMessage, sendOutput, sendOutputs, setAsync, setNotPropagatedHeaders, setOutputChannel, setOutputChannelName, setSendTimeout, setupMessageProcessor, shouldSplitOutput, updateNotPropagatedHeadersクラス org.springframework.integration.handler.AbstractMessageHandler から継承されたメソッド
handleMessage, onComplete, onError, onNext, onSubscribe, setObservationConventionクラス org.springframework.integration.handler.MessageHandlerSupport から継承されたメソッド
buildSendTimer, destroy, 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インターフェース reactor.core.CoreSubscriber から継承されたメソッド
currentContextインターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたメソッド
getThisAsインターフェース org.springframework.messaging.MessageHandler から継承されたメソッド
handleMessageインターフェース org.springframework.integration.support.context.NamedComponent から継承されたメソッド
getBeanName, getComponentName
コンストラクターの詳細
MessageHandlerChain
public MessageHandlerChain()
メソッドの詳細
setHandlers
getHandlers
インターフェースからコピーされた説明:CompositeMessageHandlerハンドラーの変更不可能なリストを返します。- 次で指定:
- インターフェース
CompositeMessageHandlerのgetHandlers - 戻り値:
- ハンドラー。
getComponentType
- 次で指定:
- インターフェース
NamedComponentのgetComponentType - オーバーライド:
- クラス
MessageHandlerSupportのgetComponentType
getIntegrationPatternType
インターフェースからコピーされた説明:IntegrationPatternこのコンポーネントが実装するパターン型を返します。- 次で指定:
- インターフェース
IntegrationPatternのgetIntegrationPatternType - オーバーライド:
- クラス
MessageHandlerSupportのgetIntegrationPatternType - 戻り値:
- このコンポーネントが実装する
IntegrationPatternType
onInit
protected void onInit()クラスからコピーされた説明:IntegrationObjectSupportサブクラスは、初期化ロジック用にこれを実装できます。- オーバーライド:
- クラス
AbstractMessageProducingHandlerのonInit
handleMessageInternal
- 次で指定:
- クラス
AbstractMessageHandlerのhandleMessageInternal
shouldCopyRequestHeaders
protected boolean shouldCopyRequestHeaders()クラスからコピーされた説明:AbstractMessageProducingHandlerサブクラスはこれをオーバーライドできます。デフォルトでは true。- オーバーライド:
- クラス
AbstractMessageProducingHandlerのshouldCopyRequestHeaders - 戻り値:
- リクエストヘッダーをコピーする必要がある場合は true。
isRunning
public final boolean isRunning()- 次で指定:
- インターフェース
LifecycleのisRunning - 次で指定:
- インターフェース
ManageableLifecycleのisRunning
start
public final void start()- 次で指定:
- インターフェース
Lifecycleのstart - 次で指定:
- インターフェース
ManageableLifecycleのstart
stop
public final void stop()- 次で指定:
- インターフェース
Lifecycleのstop - 次で指定:
- インターフェース
ManageableLifecycleのstop
stop