View Javadoc

1   /*
2    * $Id: LaxAsyncInterceptingMessageProcessor.java 22597 2011-08-05 20:40:24Z dfeist $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.processor;
12  
13  import org.mule.api.MessagingException;
14  import org.mule.api.MuleEvent;
15  import org.mule.api.config.ThreadingProfile;
16  import org.mule.api.context.WorkManagerSource;
17  
18  public class LaxAsyncInterceptingMessageProcessor extends AsyncInterceptingMessageProcessor
19  {
20  
21      public LaxAsyncInterceptingMessageProcessor(WorkManagerSource workManagerSource)
22      {
23          super(workManagerSource);
24      }
25  
26      public LaxAsyncInterceptingMessageProcessor(ThreadingProfile threadingProfile,
27                                                   String name,
28                                                   int shutdownTimeout)
29      {
30          super(threadingProfile, name, shutdownTimeout);
31      }
32  
33      protected boolean isProcessAsync(MuleEvent event) throws MessagingException
34      {
35          return doThreading && !event.isSynchronous();
36      }
37  
38  }