クラス AbstractMessageRouter
java.lang.ObjectSE
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.handler.MessageHandlerSupport
org.springframework.integration.handler.AbstractMessageHandler
org.springframework.integration.router.AbstractMessageRouter
- 実装されているすべてのインターフェース:
org.reactivestreams.Subscriber<Message<?>>、Aware、BeanFactoryAware、BeanNameAware、DisposableBean、InitializingBean、ApplicationContextAware、Ordered、ComponentSourceAware、ExpressionCapable、Orderable、IntegrationPattern、MessageRouter、NamedComponent、IntegrationManagement、TrackableComponent、MessageHandler、reactor.core.CoreSubscriber<Message<?>>
- 既知の直属サブクラス
AbstractMappingMessageRouter,RecipientListRouter
@ManagedResource
@IntegrationManagedResource
public abstract class AbstractMessageRouter
extends AbstractMessageHandler
implements MessageRouter
すべてのメッセージルーターの基本クラス。
- 作成者:
- Mark Fisher, Oleg Zhurakousky, Gunnar Hillert, Soby Chacko, Stefan Ferstl, Artem Bilan, Christian Tzolov, Glenn Renfro
ネストされたクラスの要約
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverridesフィールドのサマリー
クラス 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 abstract CollectionSE<MessageChannel> determineTargetChannels(Message<?> message) サブクラスはこのメソッドを実装して、指定されたメッセージのルーティング先となる 0 個以上の MessageChannels のコレクションを返す必要があります。@Nullable MessageChannelデフォルトの出力チャネルを取得します。このコンポーネントが実装するパターン型を返します。protected MessagingTemplateサブクラスにMessagingTemplateアクセスを提供します。protected ConversionServiceprotected voidhandleMessageInternal(Message<?> message) protected voidonInit()サブクラスは、初期化ロジック用にこれを実装できます。voidsetApplySequence(boolean applySequence) 受信者チャネルに送信する前に、シーケンス番号とサイズのヘッダーをメッセージに適用するかどうかを指定します。voidsetDefaultOutputChannel(MessageChannel defaultOutputChannel) チャネル解決でチャネルが返されない場合にメッセージを送信するデフォルトのチャネルを設定します。voidsetDefaultOutputChannelName(StringSE defaultOutputChannelName) voidsetIgnoreSendFailures(boolean ignoreSendFailures) 1 人以上の受信者の送信エラーを無視するかどうかを指定します。voidsetSendTimeout(long timeout) 解決されたチャネルにメッセージを送信するためのタイムアウトを設定します。クラス 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.integration.support.context.NamedComponent から継承されたメソッド
getBeanName, getComponentName
コンストラクターの詳細
AbstractMessageRouter
public AbstractMessageRouter()
メソッドの詳細
setDefaultOutputChannel
チャネル解決がチャネルを返さない場合にメッセージを送信するデフォルトのチャネルを設定します。デフォルトのチャネルが提供されておらず、チャネル解決がチャネルを返さない場合、ルータはMessageDeliveryExceptionをスローします。代わりにメッセージを無視(ドロップ)する必要がある場合は、
NullChannelを指定してください。- パラメーター:
defaultOutputChannel- デフォルトの出力チャネル。
getDefaultOutputChannel
デフォルトの出力チャネルを取得します。- 次で指定:
- インターフェース
MessageRouterのgetDefaultOutputChannel - 戻り値:
- チャンネル。
- 導入:
- 4.3
setDefaultOutputChannelName
setSendTimeout
public void setSendTimeout(long timeout) 解決されたチャネルにメッセージを送信するためのタイムアウトを設定します。デフォルトでは、30 秒のタイムアウトになります。- パラメーター:
timeout- タイムアウト。- 導入:
- 4.3
setIgnoreSendFailures
public void setIgnoreSendFailures(boolean ignoreSendFailures) 1 人以上の受信者の送信失敗を無視するかどうかを指定します。デフォルトでは、これはfalseで、送信が失敗するたびに例外がスローされることを意味します。これをオーバーライドして例外を抑制するには、値をtrueに設定します。- パラメーター:
ignoreSendFailures- 送信エラーを無視する場合は true。
setApplySequence
public void setApplySequence(boolean applySequence) 受信者チャネルに送信する前に、シーケンス番号とサイズのヘッダーをメッセージに適用するかどうかを指定します。デフォルトでは、この値はfalseであり、シーケンスヘッダーは適用されません。Aggregator ダウンストリームをデフォルトの相関および完了戦略で使用することを計画している場合は、このフラグをtrueに設定する必要があります。- パラメーター:
applySequence- シーケンス情報を適用する場合は true。
getComponentType
- 次で指定:
- インターフェース
NamedComponentのgetComponentType - オーバーライド:
- クラス
MessageHandlerSupportのgetComponentType
getIntegrationPatternType
インターフェースからコピーされた説明:IntegrationPatternこのコンポーネントが実装するパターン型を返します。- 次で指定:
- インターフェース
IntegrationPatternのgetIntegrationPatternType - オーバーライド:
- クラス
MessageHandlerSupportのgetIntegrationPatternType - 戻り値:
- このコンポーネントが実装する
IntegrationPatternType
getMessagingTemplate
サブクラスにMessagingTemplateアクセスを提供します。- 戻り値:
- メッセージングテンプレート。
getRequiredConversionService
onInit
protected void onInit()クラスからコピーされた説明:IntegrationObjectSupportサブクラスは、初期化ロジック用にこれを実装できます。- オーバーライド:
- クラス
IntegrationObjectSupportのonInit
determineTargetChannels
サブクラスはこのメソッドを実装して、指定されたメッセージのルーティング先となる 0 個以上の MessageChannels のコレクションを返す必要があります。- パラメーター:
message- メッセージ。- 戻り値:
- メッセージチャネルのコレクション。
handleMessageInternal
- 次で指定:
- クラス
AbstractMessageHandlerのhandleMessageInternal