public class AsyncDelegateMessageProcessor extends AbstractMessageProcessorOwner implements MessageProcessor, Initialisable, Startable, Stoppable
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.Modifier and Type | Field and Description |
---|---|
protected MessageProcessor |
delegate |
protected Log |
logger |
protected String |
name |
protected ProcessingStrategy |
processingStrategy |
protected List<MessageProcessor> |
processors |
flowConstruct, messagingExceptionHandler, muleContext
PHASE_NAME
PHASE_NAME
PHASE_NAME
PHASE_NAME
PROPERTY_NAME
Constructor and Description |
---|
AsyncDelegateMessageProcessor(MessageProcessor delegate,
ProcessingStrategy processingStrategy,
String name) |
Modifier and Type | Method and Description |
---|---|
void |
addMessageProcessorPathElements(MessageProcessorPathElement pathElement)
Add the child nodes to the path element tree.
|
protected List<MessageProcessor> |
getOwnedMessageProcessors() |
ProcessingStrategy |
getProcessingStrategy() |
void |
initialise()
Method used to perform any initialisation work.
|
MuleEvent |
process(MuleEvent event)
Invokes the MessageProcessor.
|
void |
setDelegate(MessageProcessor delegate) |
getAnnotation, getAnnotations, getOwnedObjects, setAnnotations
dispose, getFlowConstruct, getMessagingExceptionHandler, getMuleContext, setFlowConstruct, setMessagingExceptionHandler, setMuleContext, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dispose
setMuleContext
setFlowConstruct
protected Log logger
protected MessageProcessor delegate
protected List<MessageProcessor> processors
protected ProcessingStrategy processingStrategy
protected String name
public AsyncDelegateMessageProcessor(MessageProcessor delegate, ProcessingStrategy processingStrategy, String name)
public void initialise() throws InitialisationException
Initialisable
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.initialise
in interface Initialisable
initialise
in class AbstractMuleObjectOwner<MessageProcessor>
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdownRecoverableException
- if an error occurs that can be recovered frompublic MuleEvent process(MuleEvent event) throws MuleException
MessageProcessor
process
in interface MessageProcessor
event
- MuleEvent to be processedMuleException
public void setDelegate(MessageProcessor delegate)
protected List<MessageProcessor> getOwnedMessageProcessors()
getOwnedMessageProcessors
in class AbstractMessageProcessorOwner
public ProcessingStrategy getProcessingStrategy()
public void addMessageProcessorPathElements(MessageProcessorPathElement pathElement)
MessageProcessorContainer
addMessageProcessorPathElements
in interface MessageProcessorContainer
addMessageProcessorPathElements
in class AbstractMessageProcessorOwner
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.