Exposed setter for messagingTaskScheduler.

This commit is contained in:
Mark Fisher
2008-01-16 01:34:31 +00:00
parent cc2bd24b8a
commit 6d23f6a64c

View File

@@ -92,6 +92,14 @@ public class MessageBus implements ChannelRegistry, ApplicationContextAware, Lif
this.registerSourceAdapters(applicationContext);
}
public void setMessagingTaskScheduler(MessagingTaskScheduler taskScheduler) {
Assert.notNull(taskScheduler, "task scheduler must not be null");
if (taskScheduler instanceof SimpleMessagingTaskScheduler) {
((SimpleMessagingTaskScheduler) this.taskScheduler).setCorePoolSize(dispatcherPoolSize);
}
this.taskScheduler = taskScheduler;
}
/**
* Set the size for the dispatcher thread pool.
*/