public interface ScheduledPollConsumerScheduler extends ShutdownableService, CamelContextAware
ScheduledPollConsumer
consumers.
The default implementation DefaultScheduledPollConsumerScheduler
is
using the ScheduledExecutorService
from the JDK to schedule and run the poll task.
An alternative implementation is in camel-quartz2 component that allows to use CRON expression
to define when the scheduler should run.Modifier and Type | Method and Description |
---|---|
boolean |
isSchedulerStarted()
Whether the scheduler has been started.
|
void |
onInit(Consumer consumer)
Initializes this
ScheduledPollConsumerScheduler with the associated Consumer . |
void |
scheduleTask(Runnable task)
Schedules the task to run.
|
void |
startScheduler()
Starts the scheduler.
|
void |
unscheduleTask()
Attempts to unschedules the last task which was scheduled.
|
shutdown
getCamelContext, setCamelContext
void onInit(Consumer consumer)
ScheduledPollConsumerScheduler
with the associated Consumer
.consumer
- the consumer.void scheduleTask(Runnable task)
task
- the task to run.void unscheduleTask()
void startScheduler()
boolean isSchedulerStarted()
Apache Camel