org.mule.routing.outbound
Class AbstractMessageSequenceSplitter
java.lang.Object
org.mule.processor.AbstractInterceptingMessageProcessorBase
org.mule.processor.AbstractInterceptingMessageProcessor
org.mule.routing.outbound.AbstractMessageSequenceSplitter
- All Implemented Interfaces:
- AnnotatedObject, MuleContextAware, InterceptingMessageProcessor, MessageProcessor, MessageSource
- Direct Known Subclasses:
- AbstractSplitter, CollectionSplitter
public abstract class AbstractMessageSequenceSplitter
- extends AbstractInterceptingMessageProcessor
- implements MuleContextAware
Base implementation of a MuleMessage
splitter, that converts its payload
in a MessageSequence
, and process each element of it.
Implementations must implement splitMessageIntoSequence(MuleEvent)
and determine how
the message is split.
EIP Reference: http://www
.eaipatterns.com/Sequencer.html
- Author:
- flbulgarelli
- See Also:
AbstractSplitter
muleContext
protected MuleContext muleContext
resultsHandler
protected RouterResultsHandler resultsHandler
enableCorrelation
protected CorrelationMode enableCorrelation
messageInfoMapping
protected MessageInfoMapping messageInfoMapping
batchSize
protected int batchSize
counterVariableName
protected String counterVariableName
AbstractMessageSequenceSplitter
public AbstractMessageSequenceSplitter()
process
public final MuleEvent process(MuleEvent event)
throws MuleException
- Description copied from interface:
MessageProcessor
- Invokes the MessageProcessor.
- Specified by:
process
in interface MessageProcessor
- Parameters:
event
- MuleEvent to be processed
- Returns:
- optional response MuleEvent
- Throws:
MuleException
isSplitRequired
protected boolean isSplitRequired(MuleEvent event)
splitMessageIntoSequence
protected abstract MessageSequence<?> splitMessageIntoSequence(MuleEvent event)
throws MuleException
- Converts the event into a
MessageSequence
that will retrieve each of
the event elements
- Parameters:
event
- the event to split
- Returns:
- a sequence of elements
- Throws:
MuleException
processParts
protected List<MuleEvent> processParts(MessageSequence<?> seq,
MuleEvent originalEvent)
throws MuleException
- Throws:
MuleException
setEnableCorrelation
public void setEnableCorrelation(CorrelationMode enableCorrelation)
setMuleContext
public void setMuleContext(MuleContext context)
- Specified by:
setMuleContext
in interface MuleContextAware
- Overrides:
setMuleContext
in class AbstractInterceptingMessageProcessorBase
setMessageInfoMapping
public void setMessageInfoMapping(MessageInfoMapping messageInfoMapping)
setBatchSize
public void setBatchSize(int batchSize)
- Split the elements in groups of the specified size
setCounterVariableName
public void setCounterVariableName(String counterVariableName)
Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.