public abstract class AbstractMessageSplitter extends AbstractReplyProducingMessageHandler
AbstractReplyProducingMessageHandler.RequestHandlerIntegrationManagement.ManagementOverridesmessagingTemplateEXPRESSION_PARSER, loggerMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME| Constructor and Description |
|---|
AbstractMessageSplitter() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addHeaders(org.springframework.messaging.Message<?> message,
java.util.Map<java.lang.String,java.lang.Object> headers)
Allows subclasses to add extra headers to the output messages.
|
java.lang.String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
protected java.lang.Object |
handleRequestMessage(org.springframework.messaging.Message<?> message)
Subclasses must implement this method to handle the request Message.
|
protected int |
obtainSizeIfPossible(java.lang.Iterable<?> iterable)
Obtain a size of the provided
Iterable. |
protected int |
obtainSizeIfPossible(java.util.Iterator<?> iterator)
Obtain a size of the provided
Iterator. |
protected void |
produceOutput(java.lang.Object result,
org.springframework.messaging.Message<?> requestMessage) |
void |
setApplySequence(boolean applySequence)
Set the applySequence flag to the specified value.
|
protected boolean |
shouldCopyRequestHeaders()
Subclasses may override this.
|
protected abstract java.lang.Object |
splitMessage(org.springframework.messaging.Message<?> message)
Subclasses must override this method to split the received Message.
|
protected boolean |
willAddHeaders(org.springframework.messaging.Message<?> message)
Return true if the subclass needs to add headers in the resulting splits.
|
doInit, doInvokeAdvisedRequestHandler, getRequiresReply, handleMessageInternal, hasAdviceChain, onInit, setAdviceChain, setBeanClassLoader, setRequiresReplyaddNotPropagatedHeaders, createOutputMessage, getNotPropagatedHeaders, getOutputChannel, isAsync, resolveErrorChannel, sendErrorMessage, sendOutput, sendOutputs, setAsync, setNotPropagatedHeaders, setOutputChannel, setOutputChannelName, setSendTimeout, shouldSplitOutput, updateNotPropagatedHeadersconfigureMetrics, getActiveCount, getActiveCountLong, getDuration, getErrorCount, getErrorCountLong, getHandleCount, getHandleCountLong, getManagedName, getManagedType, getMaxDuration, getMeanDuration, getMinDuration, getOrder, getOverrides, getStandardDeviationDuration, handleMessage, isCountsEnabled, isLoggingEnabled, isStatsEnabled, onComplete, onError, onNext, onSubscribe, registerMetricsCaptor, reset, setCountsEnabled, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, setStatsEnabledafterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetComponentNamepublic void setApplySequence(boolean applySequence)
applySequence - true to apply sequence information.protected final java.lang.Object handleRequestMessage(org.springframework.messaging.Message<?> message)
AbstractReplyProducingMessageHandlerhandleRequestMessage in class AbstractReplyProducingMessageHandlermessage - The request message.null.protected int obtainSizeIfPossible(java.lang.Iterable<?> iterable)
Iterable. Default implementation returns
Collection.size() if the iterable is a collection, or 0 otherwise.iterable - the Iterable to obtain the sizeIterableprotected int obtainSizeIfPossible(java.util.Iterator<?> iterator)
Iterator.
Default implementation returns 0.iterator - the Iterator to obtain the sizeIteratorprotected boolean willAddHeaders(org.springframework.messaging.Message<?> message)
addHeaders(org.springframework.messaging.Message<?>, java.util.Map<java.lang.String, java.lang.Object>) will be called.message - the message.protected void addHeaders(org.springframework.messaging.Message<?> message,
java.util.Map<java.lang.String,java.lang.Object> headers)
message - the inbound message.headers - the headers to add messages to.protected boolean shouldCopyRequestHeaders()
AbstractMessageProducingHandlershouldCopyRequestHeaders in class AbstractMessageProducingHandlerprotected void produceOutput(java.lang.Object result,
org.springframework.messaging.Message<?> requestMessage)
produceOutput in class AbstractMessageProducingHandlerpublic java.lang.String getComponentType()
IntegrationObjectSupportgetComponentType in interface NamedComponentgetComponentType in class AbstractMessageHandlerprotected abstract java.lang.Object splitMessage(org.springframework.messaging.Message<?> message)
message - The message.