クラス 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
コンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明void
addNotPropagatedHeaders
(StringSE... headers) 既存のセットを上書きする代わりに、shouldCopyRequestHeaders()
が true の場合に受信メッセージからコピーされないヘッダーパターン("xxx*"、"*xxx"、"*xxx*" または "xxx* yyy")を追加します。protected Message
<?> createOutputMessage
(ObjectSE output, MessageHeaders requestHeaders) このハンドラーが伝播しないヘッダーパターンを取得します。出力チャネルを返します。protected boolean
isAsync()
protected AbstractIntegrationMessageBuilder
<?> messageBuilderForReply
(ObjectSE reply) protected void
onInit()
サブクラスは、初期化ロジック用にこれを実装できます。protected void
produceOutput
(ObjectSE replyArg, Message<?> requestMessage) protected ObjectSE
resolveErrorChannel
(MessageHeaders requestHeaders) protected void
sendErrorMessage
(Message<?> requestMessage, ThrowableSE ex) protected void
sendOutput
(ObjectSE output, ObjectSE replyChannelArg, boolean useArgChannel) 出力メッセージを送信します。protected void
sendOutputs
(ObjectSE result, Message<?> requestMessage) final void
setAsync
(boolean async) 非同期返信を許可します。void
setNotPropagatedHeaders
(StringSE... headers) shouldCopyRequestHeaaders
が true の場合に受信メッセージからコピーされないヘッダーパターン("xxx*"、"*xxx"、"*xxx*" または "xxx* yyy")を設定します。void
setOutputChannel
(MessageChannel outputChannel) 生成されたメッセージの送信先となるMessageChannel
を指定します。void
setOutputChannelName
(StringSE outputChannelName) 生成されたメッセージの送信先となるMessageChannel
の Bean 名を指定します。void
setSendTimeout
(long sendTimeout) 返信メッセージ送信のタイムアウトを設定します。protected void
setupMessageProcessor
(MessageProcessor<?> processor) protected boolean
サブクラスはこれをオーバーライドできます。protected boolean
shouldSplitOutput
(IterableSE<?> reply) protected final void
updateNotPropagatedHeaders
(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) 非同期返信を許可します。ハンドラーの応答がCompletableFuture
SE またはPublisher
の場合、結果として将来を送信するのではなく、満足したときに出力を送信します。CompletableFuture
SE または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 の場合に受信メッセージからコピーされないヘッダーの不変のCollection
SE。- 導入:
- 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