public AsyncInterceptingMessageProcessor(ThreadingProfile threadingProfile, String name, int shutdownTimeout) { this.doThreading = threadingProfile.isDoThreading(); this.threadTimeout = threadingProfile.getThreadWaitTimeout(); workManager = threadingProfile.createWorkManager(name, shutdownTimeout); workManagerSource = new WorkManagerSource() { @Override public WorkManager getWorkManager() throws MuleException { return workManager; } }; }
private WorkManager createWorkManager() { final WorkManager workManager = workerThreadingProfile.createWorkManager(format("%s%s.%s", ThreadNameHelper.getPrefix(muleContext), name, "worker"), muleContext.getConfiguration().getShutdownTimeout()); if (workManager instanceof MuleContextAware) { ((MuleContextAware) workManager).setMuleContext(muleContext); } return workManager; }
WorkManager newWorkManager = this.getReceiverThreadingProfile().createWorkManager( threadPrefix, muleContext.getConfiguration().getShutdownTimeout()); WorkManager newWorkManager = dispatcherThreadingProfile.createWorkManager( threadPrefix, muleContext.getConfiguration().getShutdownTimeout()); WorkManager newWorkManager = this.getRequesterThreadingProfile().createWorkManager( threadPrefix, muleContext.getConfiguration().getShutdownTimeout());
public WorkManager createWorkManager(FlowConstruct flowConstruct) { MuleContext muleContext = flowConstruct.getMuleContext(); ThreadingProfile threadingProfile = createThreadingProfile(muleContext); if (poolExhaustedAction == null) { threadingProfile.setPoolExhaustedAction(WHEN_EXHAUSTED_WAIT); } MuleWorkManager workManager = (MuleWorkManager) threadingProfile.createWorkManager (getThreadPoolName(flowConstruct.getName(), muleContext), muleContext.getConfiguration() .getShutdownTimeout()); return workManager; }
workManager = threadingProfile.createWorkManager( ThreadNameHelper.getPrefix(muleContext) + "ScatterGatherWorkManager", muleContext.getConfiguration().getShutdownTimeout());