public abstract class AbstractPipeline extends AbstractFlowConstruct implements Pipeline
AbstractFlowConstruct that allows a list of MessageProcessors
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, statisticsPHASE_NAMEPHASE_NAMEPHASE_NAMEPHASE_NAMEPROPERTY_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, toStringgetAnnotation, getAnnotations, setAnnotationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetExceptionListener, getMessageInfoMapping, getMuleContext, getStatisticsgetNamegetLifecycleStateprotected 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 MessageProcessors 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.
MuleExceptionprotected 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 propertySynchronousProcessingStrategyprotected void initialiseProcessingStrategy()
protected void configurePreProcessors(MessageProcessorChainBuilder builder) throws MuleException
MuleExceptionprotected void configurePostProcessors(MessageProcessorChainBuilder builder) throws MuleException
MuleExceptionpublic void setMessageProcessors(List<MessageProcessor> messageProcessors)
setMessageProcessors in interface Pipelinepublic List<MessageProcessor> getMessageProcessors()
getMessageProcessors in interface Pipelinepublic MessageSource getMessageSource()
getMessageSource in interface Pipelinepublic void setMessageSource(MessageSource messageSource)
setMessageSource in interface Pipelinepublic boolean isSynchronous()
ProcessingDescriptorisSynchronous in interface ProcessingDescriptorpublic ProcessingStrategy getProcessingStrategy()
getProcessingStrategy in interface Pipelinepublic void setProcessingStrategy(ProcessingStrategy processingStrategy)
setProcessingStrategy in interface Pipelineprotected void doInitialise()
throws MuleException
doInitialise in class AbstractFlowConstructMuleExceptionprotected void configureMessageProcessors(MessageProcessorChainBuilder builder) throws MuleException
MuleExceptionprotected void validateConstruct()
throws FlowConstructInvalidException
AbstractFlowConstructvalidateConstruct in class AbstractFlowConstructFlowConstructInvalidException - if the flow construct does not pass
validationprotected boolean isRedeliveryPolicyConfigured()
protected void doStart()
throws MuleException
doStart in class AbstractFlowConstructMuleExceptionpublic void addMessageProcessorPathElements(MessageProcessorPathElement pathElement)
MessageProcessorContaineraddMessageProcessorPathElements in interface MessageProcessorContainerpublic String getProcessorPath(MessageProcessor processor)
getProcessorPath in interface MessageProcessorPathResolverprotected void doStop()
throws MuleException
doStop in class AbstractFlowConstructMuleExceptionprotected void doDispose()
doDispose in class AbstractFlowConstructCopyright © 2003–2015 MuleSoft, Inc.. All rights reserved.