org.mule.processor
Class AsyncInterceptingMessageProcessor

java.lang.Object
  extended by org.mule.processor.AbstractInterceptingMessageProcessorBase
      extended by org.mule.processor.AbstractInterceptingMessageProcessor
          extended by org.mule.processor.AsyncInterceptingMessageProcessor
All Implemented Interfaces:
AnnotatedObject, MuleContextAware, Startable, Stoppable, InterceptingMessageProcessor, MessageProcessor, MessageProcessorContainer, MessageSource
Direct Known Subclasses:
LaxAsyncInterceptingMessageProcessor, SedaStageInterceptingMessageProcessor

public class AsyncInterceptingMessageProcessor
extends AbstractInterceptingMessageProcessor
implements Startable, Stoppable

Processes MuleEvent's asynchronously using a MuleWorkManager to schedule asynchronous processing of 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  boolean doThreading
           
static String SYNCHRONOUS_EVENT_ERROR_MESSAGE
           
protected  WorkManager workManager
           
protected  WorkManagerSource workManagerSource
           
 
Fields inherited from class org.mule.processor.AbstractInterceptingMessageProcessorBase
logger, muleContext, next, notificationHandler
 
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.AnnotatedObject
PROPERTY_NAME
 
Constructor Summary
AsyncInterceptingMessageProcessor(ThreadingProfile threadingProfile, String name, int shutdownTimeout)
           
AsyncInterceptingMessageProcessor(WorkManagerSource workManagerSource)
           
 
Method Summary
protected  void fireAsyncScheduledNotification(MuleEvent event)
           
protected  void firePipelineNotification(MuleEvent event, MessagingException exception)
           
protected  boolean isProcessAsync(MuleEvent event)
           
 MuleEvent process(MuleEvent event)
          Invokes the MessageProcessor.
protected  void processNextAsync(MuleEvent event)
           
protected  MuleEvent processNextTimed(MuleEvent event)
           
 void start()
           
 void stop()
           
 
Methods inherited from class org.mule.processor.AbstractInterceptingMessageProcessorBase
addMessageProcessorPathElements, getAnnotation, getAnnotations, getListener, getMuleContext, isEventValid, processNext, setAnnotations, setListener, setMuleContext, 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.source.MessageSource
setListener
 

Field Detail

SYNCHRONOUS_EVENT_ERROR_MESSAGE

public static final String SYNCHRONOUS_EVENT_ERROR_MESSAGE
See Also:
Constant Field Values

workManagerSource

protected WorkManagerSource workManagerSource

doThreading

protected boolean doThreading

workManager

protected WorkManager workManager
Constructor Detail

AsyncInterceptingMessageProcessor

public AsyncInterceptingMessageProcessor(WorkManagerSource workManagerSource)

AsyncInterceptingMessageProcessor

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

start

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

stop

public void stop()
          throws MuleException
Specified by:
stop in interface Stoppable
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

processNextTimed

protected MuleEvent processNextTimed(MuleEvent event)
                              throws MuleException
Throws:
MuleException

isProcessAsync

protected boolean isProcessAsync(MuleEvent event)
                          throws MessagingException
Throws:
MessagingException

processNextAsync

protected void processNextAsync(MuleEvent event)
                         throws MuleException
Throws:
MuleException

fireAsyncScheduledNotification

protected void fireAsyncScheduledNotification(MuleEvent event)

firePipelineNotification

protected void firePipelineNotification(MuleEvent event,
                                        MessagingException exception)


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