org.mule.processor
Class AsyncDelegateMessageProcessor

java.lang.Object
  extended by org.mule.processor.AbstractMessageProcessorOwner
      extended by org.mule.processor.AsyncDelegateMessageProcessor
All Implemented Interfaces:
FlowConstructAware, MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, MessageProcessor

public class AsyncDelegateMessageProcessor
extends AbstractMessageProcessorOwner
implements MessageProcessor, Startable, Stoppable

Processes MuleEvent's asynchronously using a MuleWorkManager to schedule asynchronous processing of MessageProcessor delegate configured the next MessageProcessor. The next MessageProcessor is therefore be executed in a different thread regardless of the exchange-pattern configured on the inbound endpoint. If a transaction is present then an exception is thrown.


Field Summary
protected  MessageProcessor delegate
           
protected  boolean doThreading
           
protected  Log logger
           
protected  WorkManager workManager
           
protected  WorkManagerSource workManagerSource
           
 
Fields inherited from class org.mule.processor.AbstractMessageProcessorOwner
flowConstruct, muleContext
 
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.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Constructor Summary
AsyncDelegateMessageProcessor(ThreadingProfile threadingProfile, String name, int shutdownTimeout)
           
 
Method Summary
protected  List<MessageProcessor> getOwnedMessageProcessors()
           
 MuleEvent process(MuleEvent event)
          Invokes the MessageProcessor.
 void setDelegate(MessageProcessor delegate)
           
 void start()
           
 void stop()
           
 
Methods inherited from class org.mule.processor.AbstractMessageProcessorOwner
dispose, initialise, setFlowConstruct, setMuleContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected Log logger

workManagerSource

protected WorkManagerSource workManagerSource

doThreading

protected boolean doThreading

workManager

protected WorkManager workManager

delegate

protected MessageProcessor delegate
Constructor Detail

AsyncDelegateMessageProcessor

public AsyncDelegateMessageProcessor(ThreadingProfile threadingProfile,
                                     String name,
                                     int shutdownTimeout)
Method Detail

start

public void start()
           throws MuleException
Specified by:
start in interface Startable
Overrides:
start in class AbstractMessageProcessorOwner
Throws:
MuleException

stop

public void stop()
          throws MuleException
Specified by:
stop in interface Stoppable
Overrides:
stop in class AbstractMessageProcessorOwner
Throws:
MuleException

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

setDelegate

public void setDelegate(MessageProcessor delegate)

getOwnedMessageProcessors

protected List<MessageProcessor> getOwnedMessageProcessors()
Specified by:
getOwnedMessageProcessors in class AbstractMessageProcessorOwner


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