public abstract class AbstractMessageSplitter extends AbstractReplyProducingMessageHandler
AbstractReplyProducingMessageHandler.RequestHandler
IntegrationManagement.ManagementOverrides
messagingTemplate
EXPRESSION_PARSER, logger
METER_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, setRequiresReply
addNotPropagatedHeaders, createOutputMessage, getNotPropagatedHeaders, getOutputChannel, isAsync, resolveErrorChannel, sendErrorMessage, sendOutput, sendOutputs, setAsync, setNotPropagatedHeaders, setOutputChannel, setOutputChannelName, setSendTimeout, shouldSplitOutput, updateNotPropagatedHeaders
configureMetrics, 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, setStatsEnabled
afterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getComponentName
public void setApplySequence(boolean applySequence)
applySequence
- true to apply sequence information.protected final java.lang.Object handleRequestMessage(org.springframework.messaging.Message<?> message)
AbstractReplyProducingMessageHandler
handleRequestMessage
in class AbstractReplyProducingMessageHandler
message
- 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 sizeIterable
protected int obtainSizeIfPossible(java.util.Iterator<?> iterator)
Iterator
.
Default implementation returns 0
.iterator
- the Iterator
to obtain the sizeIterator
protected 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()
AbstractMessageProducingHandler
shouldCopyRequestHeaders
in class AbstractMessageProducingHandler
protected void produceOutput(java.lang.Object result, org.springframework.messaging.Message<?> requestMessage)
produceOutput
in class AbstractMessageProducingHandler
public java.lang.String getComponentType()
IntegrationObjectSupport
getComponentType
in interface NamedComponent
getComponentType
in class AbstractMessageHandler
protected abstract java.lang.Object splitMessage(org.springframework.messaging.Message<?> message)
message
- The message.