org.mule.construct
Class Flow

java.lang.Object
  extended by org.mule.construct.AbstractFlowConstruct
      extended by org.mule.construct.AbstractPipeline
          extended by org.mule.construct.Flow
All Implemented Interfaces:
AnnotatedObject, FlowConstruct, MessageProcessorPathResolver, Pipeline, Disposable, Initialisable, Lifecycle, LifecycleStateEnabled, Startable, Stoppable, NamedObject, DynamicPipeline, MessageProcessor, MessageProcessorContainer, ProcessingDescriptor, StageNameSourceProvider

public class Flow
extends AbstractPipeline
implements MessageProcessor, StageNameSourceProvider, DynamicPipeline

This implementation of AbstractPipeline adds the following functionality:


Nested Class Summary
 
Nested classes/interfaces inherited from class org.mule.construct.AbstractPipeline
AbstractPipeline.ProcessIfPipelineStartedMessageProcessor
 
Field Summary
 
Fields inherited from class org.mule.construct.AbstractPipeline
messageProcessors, messageSource, pipeline, processingStrategy
 
Fields inherited from class org.mule.construct.AbstractFlowConstruct
exceptionListener, INITIAL_STATE_STARTED, INITIAL_STATE_STOPPED, initialState, lifecycleManager, logger, messageInfoMapping, muleContext, name, statistics
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Startable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Stoppable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Fields inherited from interface org.mule.api.AnnotatedObject
PROPERTY_NAME
 
Constructor Summary
Flow(String name, MuleContext muleContext)
           
 
Method Summary
protected  void configureMessageProcessors(MessageProcessorChainBuilder builder)
           
protected  void configurePostProcessors(MessageProcessorChainBuilder builder)
           
protected  void configurePreProcessors(MessageProcessorChainBuilder builder)
           
protected  void configureStatistics()
           
 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()
           
 MuleEvent process(MuleEvent event)
          Invokes the MessageProcessor.
 void setEndpoint(InboundEndpoint endpoint)
          Deprecated. use setMessageSource(MessageSource) instead
 
Methods inherited from class org.mule.construct.AbstractPipeline
addMessageProcessorPathElements, createPipeline, doDispose, doInitialise, doStart, doStop, getMessageProcessors, getMessageSource, getProcessingStrategy, getProcessorPath, isRedeliveryPolicyConfigured, isSynchronous, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mule.api.construct.FlowConstruct
getExceptionListener, getMessageInfoMapping, getMuleContext, getStatistics
 
Methods inherited from interface org.mule.api.NamedObject
getName
 
Methods inherited from interface org.mule.api.lifecycle.LifecycleStateEnabled
getLifecycleState
 

Constructor Detail

Flow

public Flow(String name,
            MuleContext muleContext)
Method Detail

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 StageNameSource getAsyncStageNameSource()
Provides a StageNameSource

Specified by:
getAsyncStageNameSource in interface StageNameSourceProvider
Returns:
a StageNameSource

getAsyncStageNameSource

public StageNameSource getAsyncStageNameSource(String asyncName)
Returns a StageNameSource that takes the given paramter into consideration when generating the name

Specified by:
getAsyncStageNameSource in interface StageNameSourceProvider
Parameters:
asyncName - a name to be consider when building the final name
Returns:
a StageNameSource

dynamicPipeline

public DynamicPipelineBuilder dynamicPipeline(String id)
                                       throws DynamicPipelineException
Description copied from interface: DynamicPipeline
Provide access to a DynamicPipelineBuilder that allows modifying the dynamic pipeline injecting message processors and resetting the pipeline

Specified by:
dynamicPipeline in interface DynamicPipeline
Parameters:
id - dynamic pipeline ID
Returns:
a DynamicPipelineBuilder that allows modifying the dynamic pipeline
Throws:
DynamicPipelineException - if the pipeline ID is not valid


Copyright © 2003–2014 MuleSoft, Inc.. All rights reserved.