use of org.apache.camel.spring.util.CamelThreadPoolTaskScheduler in project camel by apache.
the class SpringScheduledPollConsumerScheduler method doStart.
@Override
protected void doStart() throws Exception {
ObjectHelper.notEmpty(cron, "cron", this);
trigger = new CronTrigger(getCron(), getTimeZone());
if (taskScheduler == null) {
taskScheduler = new CamelThreadPoolTaskScheduler(getCamelContext(), consumer, consumer.getEndpoint().getEndpointUri());
taskScheduler.afterPropertiesSet();
destroyTaskScheduler = true;
}
LOG.debug("Scheduling cron trigger {}", getCron());
future = taskScheduler.schedule(runnable, trigger);
}
Aggregations