public abstract class AbstractPipeline extends AbstractFlowConstruct implements Pipeline
AbstractFlowConstruct
that allows a list of MessageProcessor
s
that will be used to process messages to be configured. These MessageProcessors are chained together using
the DefaultMessageProcessorChainBuilder
.
If no message processors are configured then the source message is simply returned.Modifier and Type | Class and Description |
---|---|
class |
AbstractPipeline.ProcessIfPipelineStartedMessageProcessor |
Modifier and Type | Field and Description |
---|---|
protected List<MessageProcessor> |
messageProcessors |
protected MessageSource |
messageSource |
protected MessageProcessor |
pipeline |
protected ProcessingStrategy |
processingStrategy |
exceptionListener, INITIAL_STATE_STARTED, INITIAL_STATE_STOPPED, initialState, lifecycleManager, logger, messageInfoMapping, muleContext, name, statistics
PHASE_NAME
PHASE_NAME
PHASE_NAME
PHASE_NAME
PROPERTY_NAME
Constructor and Description |
---|
AbstractPipeline(String name,
MuleContext muleContext) |
configureStatistics, dispose, disposeIfDisposable, getConstructType, getExceptionListener, getInitialState, getLifecycleState, getMessageInfoMapping, getMuleContext, getName, getStatistics, initialise, initialiseIfInitialisable, injectExceptionHandler, injectFlowConstructMuleContext, isStarted, isStopped, isStopping, setExceptionListener, setInitialState, setMessageInfoMapping, start, startIfStartable, stop, stopIfStoppable, toString
getAnnotation, getAnnotations, setAnnotations
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getExceptionListener, getMessageInfoMapping, getMuleContext, getStatistics
getName
getLifecycleState
protected MessageSource messageSource
protected MessageProcessor pipeline
protected List<MessageProcessor> messageProcessors
protected ProcessingStrategy processingStrategy
public AbstractPipeline(String name, MuleContext muleContext)
protected MessageProcessor createPipeline() throws MuleException
MessageProcessor
that will process messages from the configured MessageSource
.
The default implementation of this methods uses a DefaultMessageProcessorChainBuilder
and
allows a chain of MessageProcessor
s to be configured using the
configureMessageProcessors(org.mule.api.processor.MessageProcessorChainBuilder)
method but if
you wish to use another MessageProcessorBuilder
or just a single MessageProcessor
then
this method can be overridden and return a single MessageProcessor
instead.
MuleException
protected ProcessingStrategy createDefaultProcessingStrategy()
ProcessingStrategy
to
be used in case the user hasn't specified one through either
setProcessingStrategy(ProcessingStrategy)
,
through MuleConfiguration.getDefaultProcessingStrategy()
or the MuleProperties.MULE_DEFAULT_PROCESSING_STRATEGY
system propertySynchronousProcessingStrategy
protected void initialiseProcessingStrategy()
protected void configurePreProcessors(MessageProcessorChainBuilder builder) throws MuleException
MuleException
protected void configurePostProcessors(MessageProcessorChainBuilder builder) throws MuleException
MuleException
public void setMessageProcessors(List<MessageProcessor> messageProcessors)
setMessageProcessors
in interface Pipeline
public List<MessageProcessor> getMessageProcessors()
getMessageProcessors
in interface Pipeline
public MessageSource getMessageSource()
getMessageSource
in interface Pipeline
public void setMessageSource(MessageSource messageSource)
setMessageSource
in interface Pipeline
public boolean isSynchronous()
ProcessingDescriptor
isSynchronous
in interface ProcessingDescriptor
public ProcessingStrategy getProcessingStrategy()
getProcessingStrategy
in interface Pipeline
public void setProcessingStrategy(ProcessingStrategy processingStrategy)
setProcessingStrategy
in interface Pipeline
protected void doInitialise() throws MuleException
doInitialise
in class AbstractFlowConstruct
MuleException
protected void configureMessageProcessors(MessageProcessorChainBuilder builder) throws MuleException
MuleException
protected void validateConstruct() throws FlowConstructInvalidException
AbstractFlowConstruct
validateConstruct
in class AbstractFlowConstruct
FlowConstructInvalidException
- if the flow construct does not pass
validationprotected boolean isRedeliveryPolicyConfigured()
protected void doStart() throws MuleException
doStart
in class AbstractFlowConstruct
MuleException
public void addMessageProcessorPathElements(MessageProcessorPathElement pathElement)
MessageProcessorContainer
addMessageProcessorPathElements
in interface MessageProcessorContainer
public String getProcessorPath(MessageProcessor processor)
getProcessorPath
in interface MessageProcessorPathResolver
protected void doStop() throws MuleException
doStop
in class AbstractFlowConstruct
MuleException
protected void doDispose()
doDispose
in class AbstractFlowConstruct
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.