org.mule.processor
Class AsyncDelegateMessageProcessor
java.lang.Object
org.mule.processor.AbstractMuleObjectOwner<MessageProcessor>
org.mule.processor.AbstractMessageProcessorOwner
org.mule.processor.AsyncDelegateMessageProcessor
- All Implemented Interfaces:
- AnnotatedObject, FlowConstructAware, MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, MessageProcessor
public class AsyncDelegateMessageProcessor
- extends AbstractMessageProcessorOwner
- implements MessageProcessor, Initialisable, 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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.mule.api.lifecycle.Startable |
start |
Methods inherited from interface org.mule.api.lifecycle.Stoppable |
stop |
logger
protected Log logger
delegate
protected MessageProcessor delegate
processors
protected List<MessageProcessor> processors
processingStrategy
protected ProcessingStrategy processingStrategy
name
protected String name
AsyncDelegateMessageProcessor
public AsyncDelegateMessageProcessor(MessageProcessor delegate,
ProcessingStrategy processingStrategy,
String name)
initialise
public void initialise()
throws InitialisationException
- Description copied from interface:
Initialisable
- Method used to perform any initialisation work. If a fatal error occurs during
initialisation an
InitialisationException
should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException
should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.
- Specified by:
initialise
in interface Initialisable
- Overrides:
initialise
in class AbstractMuleObjectOwner<MessageProcessor>
- Throws:
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdown
RecoverableException
- if an error occurs that can be recovered from
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
getProcessingStrategy
public ProcessingStrategy getProcessingStrategy()
Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.