1
2
3
4
5
6
7
8
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
19
20
21
22
23
24 public class OptionalAsyncInterceptingMessageProcessor extends AsyncInterceptingMessageProcessor
25 {
26 public OptionalAsyncInterceptingMessageProcessor(WorkManagerSource workManagerSource)
27 {
28 super(workManagerSource);
29 }
30
31 @Deprecated
32 public OptionalAsyncInterceptingMessageProcessor(WorkManagerSource workManagerSource, boolean doThreading)
33 {
34 super(workManagerSource, doThreading);
35 }
36
37 public OptionalAsyncInterceptingMessageProcessor(ThreadingProfile threadingProfile,
38 String name,
39 int shutdownTimeout)
40 {
41 super(threadingProfile, name, shutdownTimeout);
42 }
43
44 protected boolean isProcessAsync(MuleEvent event) throws MessagingException
45 {
46 return doThreading && !event.getEndpoint().getExchangePattern().hasResponse()
47 && !event.getEndpoint().getTransactionConfig().isTransacted();
48 }
49
50 }