クラス AbstractMessageProducingHandler
java.lang.ObjectSE
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.handler.MessageHandlerSupport
org.springframework.integration.handler.AbstractMessageHandler
org.springframework.integration.handler.AbstractMessageProducingHandler
- 実装されているすべてのインターフェース:
org.reactivestreams.Subscriber<Message<?>>、Aware、BeanFactoryAware、BeanNameAware、DisposableBean、InitializingBean、ApplicationContextAware、Ordered、ComponentSourceAware、ExpressionCapable、Orderable、MessageProducer、HeaderPropagationAware、IntegrationPattern、NamedComponent、IntegrationManagement、TrackableComponent、MessageHandler、reactor.core.CoreSubscriber<Message<?>>
- 既知の直属サブクラス
AbstractCorrelatingMessageHandler、AbstractReplyProducingMessageHandler、FluxAggregatorMessageHandler、MessageHandlerChain、MockMessageHandler
public abstract class AbstractMessageProducingHandler
extends AbstractMessageHandler
implements MessageProducer, HeaderPropagationAware
- 導入:
- 4.1
- 作成者:
- David Liu, Artem Bilan, Gary Russell, Marius Bogoevici, Ngoc Nhan
ネストされたクラスの要約
インターフェース 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コンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明voidaddNotPropagatedHeaders(StringSE... headers) 既存のセットを上書きする代わりに、shouldCopyRequestHeaders()が true の場合に受信メッセージからコピーされないヘッダーパターン("xxx*"、"*xxx"、"*xxx*" または "xxx* yyy")を追加します。protected Message<?> createOutputMessage(ObjectSE output, MessageHeaders requestHeaders) このハンドラーが伝播しないヘッダーパターンを取得します。出力チャネルを返します。protected booleanisAsync()protected AbstractIntegrationMessageBuilder<?> messageBuilderForReply(ObjectSE reply) protected voidonInit()サブクラスは、初期化ロジック用にこれを実装できます。protected voidproduceOutput(ObjectSE replyArg, Message<?> requestMessage) protected ObjectSEresolveErrorChannel(MessageHeaders requestHeaders) protected voidsendErrorMessage(Message<?> requestMessage, ThrowableSE ex) protected voidsendOutput(ObjectSE output, ObjectSE replyChannelArg, boolean useArgChannel) 出力メッセージを送信します。protected voidsendOutputs(ObjectSE result, Message<?> requestMessage) final voidsetAsync(boolean async) 非同期返信を許可します。voidsetNotPropagatedHeaders(StringSE... headers) shouldCopyRequestHeaadersが true の場合に受信メッセージからコピーされないヘッダーパターン("xxx*"、"*xxx"、"*xxx*" または "xxx* yyy")を設定します。voidsetOutputChannel(MessageChannel outputChannel) 生成されたメッセージの送信先となるMessageChannelを指定します。voidsetOutputChannelName(StringSE outputChannelName) 生成されたメッセージの送信先となるMessageChannelの Bean 名を指定します。voidsetSendTimeout(long sendTimeout) 返信メッセージ送信のタイムアウトを設定します。protected voidsetupMessageProcessor(MessageProcessor<?> processor) protected booleanサブクラスはこれをオーバーライドできます。protected booleanshouldSplitOutput(IterableSE<?> reply) protected final voidupdateNotPropagatedHeaders(StringSE[] headers, boolean merge) 伝播されていないヘッダーを設定または置換します。クラス org.springframework.integration.handler.AbstractMessageHandler から継承されたメソッド
handleMessage, handleMessageInternal, onComplete, onError, onNext, onSubscribe, setObservationConventionクラス org.springframework.integration.handler.MessageHandlerSupport から継承されたメソッド
buildSendTimer, destroy, getComponentType, getIntegrationPatternType, 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
フィールドの詳細
messagingTemplate
コンストラクターの詳細
AbstractMessageProducingHandler
public AbstractMessageProducingHandler()
メソッドの詳細
setSendTimeout
public void setSendTimeout(long sendTimeout) 返信メッセージ送信のタイムアウトを設定します。- パラメーター:
sendTimeout- 送信タイムアウト。
setOutputChannel
インターフェースからコピーされた説明:MessageProducer生成されたメッセージの送信先となるMessageChannelを指定します。- 次で指定:
- インターフェース
MessageProducerのsetOutputChannel - パラメーター:
outputChannel- 出力チャネル。
setOutputChannelName
インターフェースからコピーされた説明:MessageProducer生成されたメッセージの送信先となるMessageChannelの Bean 名を指定します。- 次で指定:
- インターフェース
MessageProducerのsetOutputChannelName - パラメーター:
outputChannelName- 出力チャネル Bean 名。
setAsync
public final void setAsync(boolean async) 非同期返信を許可します。ハンドラーの応答がCompletableFutureSE またはPublisherの場合、結果として将来を送信するのではなく、満足したときに出力を送信します。CompletableFutureSE またはPublisher以外の戻り型では無視されます。- パラメーター:
async- 許可する場合は true。- 導入:
- 4.3
isAsync
protected boolean isAsync()- 戻り値:
- このハンドラーが非同期応答をサポートしている場合は true。
- 導入:
- 4.3
- 関連事項:
setNotPropagatedHeaders
shouldCopyRequestHeaadersが true の場合に受信メッセージからコピーされないヘッダーパターン("xxx*"、"*xxx"、"*xxx*" または "xxx* yyy")を設定します。"*" として少なくとも 1 つのパターンは、ヘッダーをまったくコピーしないことを意味します。- 次で指定:
- インターフェース
HeaderPropagationAwareのsetNotPropagatedHeaders - パラメーター:
headers- 受信メッセージから伝播しないヘッダー。- 導入:
- 4.3.10
- 関連事項:
updateNotPropagatedHeaders
伝播されていないヘッダーを設定または置換します。setNotPropagatedHeaders(String...)は final ではないため、サブクラスがコンストラクターで特定のヘッダーを設定できるように公開されます。- パラメーター:
headers- 伝播しないヘッダーパターン。merge- 既存のパターンとマージする場合は true。置き換える場合は false。- 導入:
- 5.0.2
getNotPropagatedHeaders
このハンドラーが伝播しないヘッダーパターンを取得します。- 次で指定:
- インターフェース
HeaderPropagationAwareのgetNotPropagatedHeaders - 戻り値:
shouldCopyRequestHeaders()が true の場合に受信メッセージからコピーされないヘッダーの不変のCollectionSE。- 導入:
- 4.3.10
- 関連事項:
addNotPropagatedHeaders
既存のセットを上書きする代わりに、shouldCopyRequestHeaders()が true の場合に受信メッセージからコピーされないヘッダーパターン("xxx*"、"*xxx"、"*xxx*" または "xxx* yyy")を追加します。- 次で指定:
- インターフェース
HeaderPropagationAwareのaddNotPropagatedHeaders - パラメーター:
headers- 受信メッセージから伝播しないヘッダー。- 導入:
- 4.3.10
- 関連事項:
onInit
protected void onInit()クラスからコピーされた説明:IntegrationObjectSupportサブクラスは、初期化ロジック用にこれを実装できます。- オーバーライド:
- クラス
IntegrationObjectSupportのonInit
getOutputChannel
インターフェースからコピーされた説明:MessageProducer出力チャネルを返します。- 次で指定:
- インターフェース
MessageProducerのgetOutputChannel - 戻り値:
- チャンネル。
sendOutputs
shouldSplitOutput
produceOutput
messageBuilderForReply
createOutputMessage
sendOutput
protected void sendOutput(ObjectSE output, @Nullable ObjectSE replyChannelArg, boolean useArgChannel) 出力メッセージを送信します。このハンドラーの 'outputChannel' がnullである場合にのみ 'replyChannel' が考慮されます。その場合、'replyChannel' の値はnullであってはならず、String またはMessageChannelのいずれかのインスタンスである必要があります。- パラメーター:
output- 送信する出力オブジェクトreplyChannelArg- 元のリクエストの "replyChannel" 値useArgChannel- 構成された出力チャネルではなく、replyChannel 引数 (null であってはなりません) を使用します。
shouldCopyRequestHeaders
protected boolean shouldCopyRequestHeaders()サブクラスはこれをオーバーライドできます。デフォルトでは true。- 戻り値:
- リクエストヘッダーをコピーする必要がある場合は true。
sendErrorMessage
resolveErrorChannel
setupMessageProcessor