org.mule.construct
Class SimpleFlowConstruct

java.lang.Object
  extended by org.mule.construct.AbstractFlowConstruct
      extended by org.mule.construct.SimpleFlowConstruct
All Implemented Interfaces:
FlowConstruct, Disposable, Initialisable, Lifecycle, LifecycleStateEnabled, Startable, Stoppable, MessageProcessor
Direct Known Subclasses:
IBeanFlowConstruct

public class SimpleFlowConstruct
extends AbstractFlowConstruct
implements MessageProcessor

Simple implementation of 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 not message processors are configured then the source message is simply returned.


Field Summary
protected  List<MessageProcessor> messageProcessors
           
protected  WorkManager workManager
           
 
Fields inherited from class org.mule.construct.AbstractFlowConstruct
exceptionListener, lifecycleManager, logger, messageInfoMapping, messageProcessorChain, messageSource, muleContext, name, statistics, threadingProfile
 
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
 
Constructor Summary
SimpleFlowConstruct(String name, MuleContext muleContext)
           
 
Method Summary
protected  void configureMessageProcessors(MessageProcessorChainBuilder builder)
          Used to configure the processing chain for this FlowConstuctMessageProcessors to the chain using the builder provided.
 String getConstructType()
           
 List<MessageProcessor> getMessageProcessors()
           
 MuleEvent process(MuleEvent event)
          Invokes the MessageProcessor.
 void setEndpoint(InboundEndpoint endpoint)
          Deprecated. 
 void setMessageProcessors(List<MessageProcessor> messageProcessors)
           
 void setThreadingProfile(ThreadingProfile threadingProfile)
           
 
Methods inherited from class org.mule.construct.AbstractFlowConstruct
createMessageProcessor, dispose, disposeIfDisposable, doDispose, doInitialise, doStart, doStop, getExceptionListener, getLifecycleState, getMessageInfoMapping, getMessageProcessorChain, getMessageSource, getMuleContext, getName, getStatistics, getThreadingProfile, initialise, initialiseIfInitialisable, injectFlowConstructMuleContext, isStarted, isStopped, isStopping, setExceptionListener, setMessageInfoMapping, setMessageSource, start, startIfStartable, stop, stopIfStoppable, toString, validateConstruct
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

messageProcessors

protected List<MessageProcessor> messageProcessors

workManager

protected WorkManager workManager
Constructor Detail

SimpleFlowConstruct

public SimpleFlowConstruct(String name,
                           MuleContext muleContext)
Method Detail

configureMessageProcessors

protected void configureMessageProcessors(MessageProcessorChainBuilder builder)
Description copied from class: AbstractFlowConstruct
Used to configure the processing chain for this FlowConstuctMessageProcessors to the chain using the builder provided.

To use a different builder of to construct a composite MessageProcessor manually override AbstractFlowConstruct.createMessageProcessor() instead.

Specified by:
configureMessageProcessors in class AbstractFlowConstruct
Parameters:
builder - instance of DefaultMessageProcessorChainBuilder

setThreadingProfile

public void setThreadingProfile(ThreadingProfile threadingProfile)

setMessageProcessors

public void setMessageProcessors(List<MessageProcessor> messageProcessors)

getMessageProcessors

public List<MessageProcessor> getMessageProcessors()

setEndpoint

@Deprecated
public void setEndpoint(InboundEndpoint endpoint)
Deprecated. 


getConstructType

public String getConstructType()
Specified by:
getConstructType in class AbstractFlowConstruct
Returns:
the type of construct being created, e.g. "Flow"

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


Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.