Search in sources :

Example 1 with CamelThreadPoolTaskScheduler

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);
}
Also used : CamelThreadPoolTaskScheduler(org.apache.camel.spring.util.CamelThreadPoolTaskScheduler) CronTrigger(org.springframework.scheduling.support.CronTrigger)

Aggregations

CamelThreadPoolTaskScheduler (org.apache.camel.spring.util.CamelThreadPoolTaskScheduler)1 CronTrigger (org.springframework.scheduling.support.CronTrigger)1