1
2
3
4
5
6
7
8
9
10
11 package org.mule.construct.flow;
12
13 import org.mule.api.MuleContext;
14 import org.mule.api.config.ThreadingProfile;
15 import org.mule.config.QueueProfile;
16 import org.mule.processor.AsyncInterceptingMessageProcessor;
17 import org.mule.processor.LaxSedaStageInterceptingMessageProcessor;
18 import org.mule.processor.strategy.QueuedAsynchronousProcessingStrategy;
19
20
21
22
23
24 public class DefaultFlowProcessingStrategy extends QueuedAsynchronousProcessingStrategy
25 {
26
27 @Override
28 protected AsyncInterceptingMessageProcessor createAsyncMessageProcessor(StageNameSource nameSource,
29 MuleContext muleContext)
30 {
31 Integer timeout = queueTimeout != null ? queueTimeout : muleContext.getConfiguration()
32 .getDefaultQueueTimeout();
33
34 initQueueStore(muleContext);
35
36 QueueProfile queueProfile = new QueueProfile(maxQueueSize, queueStore);
37 ThreadingProfile threadingProfile = createThreadingProfile(muleContext);
38 String stageName = nameSource.getName();
39 return new LaxSedaStageInterceptingMessageProcessor(getThreadPoolName(stageName, muleContext),
40 stageName, queueProfile, timeout, threadingProfile, queueStatistics, muleContext);
41 }
42
43 }