org.mule.construct
Class Flow
java.lang.Object
org.mule.construct.AbstractFlowConstruct
org.mule.construct.AbstractPipeline
org.mule.construct.Flow
- All Implemented Interfaces:
- AnnotatedObject, FlowConstruct, Pipeline, Disposable, Initialisable, Lifecycle, LifecycleStateEnabled, Startable, Stoppable, NamedObject, MessageProcessor
- Direct Known Subclasses:
- IBeanFlowConstruct
public class Flow
- extends AbstractPipeline
- implements MessageProcessor
This implementation of AbstractPipeline
adds the following functionality:
- Rejects inbound events when Flow is not started
- Gathers statistics and processing time data
- Implements MessagePorcessor allowing direct invocation of the pipeline
- Supports the optional configuration of a
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.
Methods inherited from class org.mule.construct.AbstractPipeline |
createPipeline, doDispose, doInitialise, doStart, doStop, getMessageProcessors, getMessageSource, getProcessingStrategy, isRedeliveryPolicyConfigured, setMessageProcessors, setMessageSource, setProcessingStrategy, validateConstruct |
Methods inherited from class org.mule.construct.AbstractFlowConstruct |
dispose, disposeIfDisposable, getAnnotation, getAnnotations, getExceptionListener, getInitialState, getLifecycleState, getMessageInfoMapping, getMuleContext, getName, getStatistics, initialise, initialiseIfInitialisable, injectFlowConstructMuleContext, isStarted, isStopped, isStopping, setAnnotations, setExceptionListener, setInitialState, setMessageInfoMapping, start, startIfStartable, stop, stopIfStoppable, toString |
Flow
public Flow(String name,
MuleContext muleContext)
process
public 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
configurePreProcessors
protected void configurePreProcessors(MessageProcessorChainBuilder builder)
throws MuleException
- Overrides:
configurePreProcessors
in class AbstractPipeline
- Throws:
MuleException
configurePostProcessors
protected void configurePostProcessors(MessageProcessorChainBuilder builder)
throws MuleException
- Overrides:
configurePostProcessors
in class AbstractPipeline
- Throws:
MuleException
setEndpoint
@Deprecated
public void setEndpoint(InboundEndpoint endpoint)
- Deprecated. use setMessageSource(MessageSource) instead
getConstructType
public String getConstructType()
- Specified by:
getConstructType
in class AbstractFlowConstruct
- Returns:
- the type of construct being created, e.g. "Flow"
configureStatistics
protected void configureStatistics()
- Overrides:
configureStatistics
in class AbstractFlowConstruct
configureMessageProcessors
protected void configureMessageProcessors(MessageProcessorChainBuilder builder)
throws MuleException
- Overrides:
configureMessageProcessors
in class AbstractPipeline
- Throws:
MuleException
getAsyncStageNameSource
public ProcessingStrategy.StageNameSource getAsyncStageNameSource()
getAsyncStageNameSource
public ProcessingStrategy.StageNameSource getAsyncStageNameSource(String asyncName)
Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.