クラス MockMessageHandler
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.test.mock.MockMessageHandler
- 実装されたすべてのインターフェース:
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<?>>
テストでのモック用の
AbstractMessageProducingHandler
拡張。 提供された Consumer
SE および Function
SE は、最後のメッセージまで一度に 1 つずつ受信メッセージに適用され、後続のすべてのメッセージに適用されます。同様の動作が Mockito.doReturn(Object toBeReturned, Object... toBeReturnedNext)
に存在します。
通常、スタブアクションのチェーンとして使用されます。
MockIntegration.mockMessageHandler()
.handleNext(...)
.handleNext(...)
.handleNextAndReply(...)
.handleNextAndReply(...)
.handleNext(...)
.handleNextAndReply(...);
- 導入:
- 5.0
- 作成者:
- Artem Bilan, Christian Tzolov
ネストされたクラスのサマリー
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverrides
フィールドのサマリー
フィールド修飾子と型フィールド説明protected boolean
protected FunctionSE<Message<?>,
?> protected final ListSE<FunctionSE<Message<?>,
?>> クラス 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
MockMessageHandler
(org.mockito.ArgumentCaptor<Message<?>> messageArgumentCaptor) メソッドのサマリー
修飾子と型メソッド説明protected void
handleMessageInternal
(Message<?> message) handleNext
(ConsumerSE<Message<?>> nextMessageConsumer) Consumer
SE をスタックに追加して、次の受信メッセージを処理します。handleNextAndReply
(FunctionSE<Message<?>, ?> nextMessageFunction) Function
SE をスタックに追加して、次の受信メッセージを処理し、それに対する応答を生成します。クラス org.springframework.integration.handler.AbstractMessageProducingHandler から継承されたメソッド
addNotPropagatedHeaders, createOutputMessage, getNotPropagatedHeaders, getOutputChannel, isAsync, messageBuilderForReply, onInit, produceOutput, resolveErrorChannel, sendErrorMessage, sendOutput, sendOutputs, setAsync, setNotPropagatedHeaders, setOutputChannel, setOutputChannelName, setSendTimeout, setupMessageProcessor, shouldCopyRequestHeaders, shouldSplitOutput, updateNotPropagatedHeaders
クラス org.springframework.integration.handler.AbstractMessageHandler から継承されたメソッド
handleMessage, 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
フィールドの詳細
messageFunctions
lastFunction
hasReplies
protected boolean hasReplies
コンストラクターの詳細
MockMessageHandler
メソッドの詳細
handleNext
Consumer
SE をスタックに追加して、次の受信メッセージを処理します。- パラメーター:
nextMessageConsumer
- 次の受信メッセージを処理するコンシューマー。- 戻り値:
- this
handleNextAndReply
Function
SE をスタックに追加して、次の受信メッセージを処理し、それに対する応答を生成します。- パラメーター:
nextMessageFunction
- 次の受信メッセージを処理する関数。- 戻り値:
- this
handleMessageInternal
- 次で指定:
- クラス
AbstractMessageHandler
のhandleMessageInternal