org.mule.construct
Class AbstractPipeline
java.lang.Object
org.mule.construct.AbstractFlowConstruct
org.mule.construct.AbstractPipeline
- All Implemented Interfaces:
- AnnotatedObject, FlowConstruct, Pipeline, Disposable, Initialisable, Lifecycle, LifecycleStateEnabled, Startable, Stoppable, NamedObject, MessageProcessorContainer
- Direct Known Subclasses:
- AbstractConfigurationPattern, Flow
public abstract class AbstractPipeline
- extends AbstractFlowConstruct
- implements Pipeline
Abstract implementation of AbstractFlowConstruct that allows a list of AbstractPipeline.ProcessIfPipelineStartedMessageProcessors
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.
| Methods inherited from class org.mule.construct.AbstractFlowConstruct |
configureStatistics, dispose, disposeIfDisposable, getAnnotation, getAnnotations, getConstructType, getExceptionListener, getInitialState, getLifecycleState, getMessageInfoMapping, getMuleContext, getName, getStatistics, initialise, initialiseIfInitialisable, injectFlowConstructMuleContext, isStarted, isStopped, isStopping, setAnnotations, setExceptionListener, setInitialState, setMessageInfoMapping, start, startIfStartable, stop, stopIfStoppable, toString |
messageSource
protected MessageSource messageSource
pipeline
protected MessageProcessor pipeline
messageProcessors
protected List<MessageProcessor> messageProcessors
processingStrategy
protected ProcessingStrategy processingStrategy
AbstractPipeline
public AbstractPipeline(String name,
MuleContext muleContext)
createPipeline
protected MessageProcessor createPipeline()
throws MuleException
- Creates a
AbstractPipeline.ProcessIfPipelineStartedMessageProcessor that will process messages from the configured MessageSource
.
The default implementation of this methods uses a DefaultMessageProcessorChainBuilder and
allows a chain of AbstractPipeline.ProcessIfPipelineStartedMessageProcessors to be configured using the
configureMessageProcessors(org.mule.api.processor.MessageProcessorChainBuilder) method but if
you wish to use another MessageProcessorBuilder or just a single AbstractPipeline.ProcessIfPipelineStartedMessageProcessor then
this method can be overridden and return a single AbstractPipeline.ProcessIfPipelineStartedMessageProcessor instead.
- Throws:
MuleException
configurePreProcessors
protected void configurePreProcessors(MessageProcessorChainBuilder builder)
throws MuleException
- Throws:
MuleException
configurePostProcessors
protected void configurePostProcessors(MessageProcessorChainBuilder builder)
throws MuleException
- Throws:
MuleException
setMessageProcessors
public void setMessageProcessors(List<MessageProcessor> messageProcessors)
- Specified by:
setMessageProcessors in interface Pipeline
getMessageProcessors
public List<MessageProcessor> getMessageProcessors()
- Specified by:
getMessageProcessors in interface Pipeline
getMessageSource
public MessageSource getMessageSource()
- Specified by:
getMessageSource in interface Pipeline
setMessageSource
public void setMessageSource(MessageSource messageSource)
- Specified by:
setMessageSource in interface Pipeline
getProcessingStrategy
public ProcessingStrategy getProcessingStrategy()
- Specified by:
getProcessingStrategy in interface Pipeline
setProcessingStrategy
public void setProcessingStrategy(ProcessingStrategy processingStrategy)
- Specified by:
setProcessingStrategy in interface Pipeline
doInitialise
protected void doInitialise()
throws MuleException
- Overrides:
doInitialise in class AbstractFlowConstruct
- Throws:
MuleException
configureMessageProcessors
protected void configureMessageProcessors(MessageProcessorChainBuilder builder)
throws MuleException
- Throws:
MuleException
validateConstruct
protected void validateConstruct()
throws FlowConstructInvalidException
- Description copied from class:
AbstractFlowConstruct
- Validates configured flow construct
- Overrides:
validateConstruct in class AbstractFlowConstruct
- Throws:
FlowConstructInvalidException - if the flow construct does not pass
validation
isRedeliveryPolicyConfigured
protected boolean isRedeliveryPolicyConfigured()
doStart
protected void doStart()
throws MuleException
- Overrides:
doStart in class AbstractFlowConstruct
- Throws:
MuleException
addMessageProcessorPathElements
public void addMessageProcessorPathElements(MessageProcessorPathElement pathElement)
- Description copied from interface:
MessageProcessorContainer
- Add the child nodes to the path element tree.
- Specified by:
addMessageProcessorPathElements in interface MessageProcessorContainer
getProcessorPath
public String getProcessorPath(MessageProcessor processor)
- Specified by:
getProcessorPath in interface Pipeline
doStop
protected void doStop()
throws MuleException
- Overrides:
doStop in class AbstractFlowConstruct
- Throws:
MuleException
doDispose
protected void doDispose()
- Overrides:
doDispose in class AbstractFlowConstruct
Copyright © 2003-2013 MuleSoft, Inc.. All Rights Reserved.