public class Flow extends AbstractPipeline implements MessageProcessor, StageNameSourceProvider, DynamicPipeline
AbstractPipeline
adds the following functionality:
ProcessingStrategy
that determines how message
processors are processed. The default ProcessingStrategy
is AsynchronousProcessingStrategy
.
With this strategy when messages are received from a one-way message source and there is no current
transactions message processing in another thread asynchronously.AbstractPipeline.ProcessIfPipelineStartedMessageProcessor
messageProcessors, messageSource, pipeline, 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 |
---|
Flow(String name,
MuleContext muleContext) |
Modifier and Type | Method and Description |
---|---|
protected void |
configureMessageProcessors(MessageProcessorChainBuilder builder) |
protected void |
configurePostProcessors(MessageProcessorChainBuilder builder) |
protected void |
configurePreProcessors(MessageProcessorChainBuilder builder) |
protected void |
configureStatistics() |
protected ProcessingStrategy |
createDefaultProcessingStrategy()
A fallback method for creating a
ProcessingStrategy to
be used in case the user hasn't specified one through either
AbstractPipeline.setProcessingStrategy(ProcessingStrategy) ,
through MuleConfiguration.getDefaultProcessingStrategy()
or the MuleProperties.MULE_DEFAULT_PROCESSING_STRATEGY
system property |
protected void |
doInitialise() |
protected void |
doStart() |
protected void |
doStop() |
DynamicPipelineBuilder |
dynamicPipeline(String id)
Provide access to a
DynamicPipelineBuilder that allows modifying
the dynamic pipeline injecting message processors and resetting the pipeline |
StageNameSource |
getAsyncStageNameSource()
Provides a
StageNameSource |
StageNameSource |
getAsyncStageNameSource(String asyncName)
Returns a
StageNameSource that
takes the given paramter into consideration when generating the name |
String |
getConstructType() |
WorkManager |
getWorkManager() |
MuleEvent |
process(MuleEvent event)
Invokes the MessageProcessor.
|
void |
setEndpoint(InboundEndpoint endpoint)
Deprecated.
use setMessageSource(MessageSource) instead
|
addMessageProcessorPathElements, createPipeline, doDispose, getMessageProcessors, getMessageSource, getProcessingStrategy, getProcessorPath, initialiseProcessingStrategy, isRedeliveryPolicyConfigured, isSynchronous, setMessageProcessors, setMessageSource, setProcessingStrategy, validateConstruct
dispose, disposeIfDisposable, 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
public Flow(String name, MuleContext muleContext)
protected void doInitialise() throws MuleException
doInitialise
in class AbstractPipeline
MuleException
protected void doStart() throws MuleException
doStart
in class AbstractPipeline
MuleException
protected void doStop() throws MuleException
doStop
in class AbstractPipeline
MuleException
public MuleEvent process(MuleEvent event) throws MuleException
MessageProcessor
process
in interface MessageProcessor
event
- MuleEvent to be processedMuleException
protected void configurePreProcessors(MessageProcessorChainBuilder builder) throws MuleException
configurePreProcessors
in class AbstractPipeline
MuleException
protected void configurePostProcessors(MessageProcessorChainBuilder builder) throws MuleException
configurePostProcessors
in class AbstractPipeline
MuleException
protected ProcessingStrategy createDefaultProcessingStrategy()
ProcessingStrategy
to
be used in case the user hasn't specified one through either
AbstractPipeline.setProcessingStrategy(ProcessingStrategy)
,
through MuleConfiguration.getDefaultProcessingStrategy()
or the MuleProperties.MULE_DEFAULT_PROCESSING_STRATEGY
system propertycreateDefaultProcessingStrategy
in class AbstractPipeline
DefaultFlowProcessingStrategy
@Deprecated public void setEndpoint(InboundEndpoint endpoint)
public String getConstructType()
getConstructType
in class AbstractFlowConstruct
protected void configureStatistics()
configureStatistics
in class AbstractFlowConstruct
protected void configureMessageProcessors(MessageProcessorChainBuilder builder) throws MuleException
configureMessageProcessors
in class AbstractPipeline
MuleException
public StageNameSource getAsyncStageNameSource()
StageNameSource
getAsyncStageNameSource
in interface StageNameSourceProvider
StageNameSource
public StageNameSource getAsyncStageNameSource(String asyncName)
StageNameSource
that
takes the given paramter into consideration when generating the namegetAsyncStageNameSource
in interface StageNameSourceProvider
asyncName
- a name to be consider when building the final nameStageNameSource
public DynamicPipelineBuilder dynamicPipeline(String id) throws DynamicPipelineException
DynamicPipeline
DynamicPipelineBuilder
that allows modifying
the dynamic pipeline injecting message processors and resetting the pipelinedynamicPipeline
in interface DynamicPipeline
id
- dynamic pipeline IDDynamicPipelineException
- if the pipeline ID is not validpublic WorkManager getWorkManager()
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.