クラス 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
ネストされたクラスのサマリー
インターフェース 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 のコレクションを返す必要があります。サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。デフォルトの出力チャネルを取得します。このコンポーネントが実装するパターン型を返します。protected MessagingTemplate
サブクラスにMessagingTemplate
アクセスを提供します。protected ConversionService
protected void
handleMessageInternal
(Message<?> message) protected void
onInit()
サブクラスは、初期化ロジック用にこれを実装できます。void
setApplySequence
(boolean applySequence) 受信者チャネルに送信する前に、シーケンス番号とサイズのヘッダーをメッセージに適用するかどうかを指定します。void
setDefaultOutputChannel
(MessageChannel defaultOutputChannel) チャネル解決でチャネルが返されない場合にメッセージを送信するデフォルトのチャネルを設定します。void
setDefaultOutputChannelName
(StringSE defaultOutputChannelName) void
setIgnoreSendFailures
(boolean ignoreSendFailures) 1 人以上の受信者の送信エラーを無視するかどうかを指定します。void
setSendTimeout
(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
クラスからコピーされた説明:IntegrationObjectSupport
サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。- 次で指定:
- インターフェース
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