org.apache.camel.spring.pollingconsumer
Class SpringScheduledPollConsumerScheduler
java.lang.Object
org.apache.camel.support.ServiceSupport
org.apache.camel.spring.pollingconsumer.SpringScheduledPollConsumerScheduler
- All Implemented Interfaces:
- org.apache.camel.CamelContextAware, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.ScheduledPollConsumerScheduler, org.apache.camel.StatefulService, org.apache.camel.SuspendableService
public class SpringScheduledPollConsumerScheduler
- extends org.apache.camel.support.ServiceSupport
- implements org.apache.camel.spi.ScheduledPollConsumerScheduler
A Spring based ScheduledPollConsumerScheduler
which uses a CronTrigger
to define when the
poll should be triggered.
Fields inherited from class org.apache.camel.support.ServiceSupport |
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending |
Methods inherited from class org.apache.camel.support.ServiceSupport |
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.camel.ShutdownableService |
shutdown |
Methods inherited from interface org.apache.camel.Service |
start, stop |
SpringScheduledPollConsumerScheduler
public SpringScheduledPollConsumerScheduler()
onInit
public void onInit(org.apache.camel.Consumer consumer)
- Specified by:
onInit
in interface org.apache.camel.spi.ScheduledPollConsumerScheduler
scheduleTask
public void scheduleTask(Runnable runnable)
- Specified by:
scheduleTask
in interface org.apache.camel.spi.ScheduledPollConsumerScheduler
unscheduleTask
public void unscheduleTask()
- Specified by:
unscheduleTask
in interface org.apache.camel.spi.ScheduledPollConsumerScheduler
startScheduler
public void startScheduler()
- Specified by:
startScheduler
in interface org.apache.camel.spi.ScheduledPollConsumerScheduler
isSchedulerStarted
public boolean isSchedulerStarted()
- Specified by:
isSchedulerStarted
in interface org.apache.camel.spi.ScheduledPollConsumerScheduler
setCamelContext
public void setCamelContext(org.apache.camel.CamelContext camelContext)
- Specified by:
setCamelContext
in interface org.apache.camel.CamelContextAware
getCamelContext
public org.apache.camel.CamelContext getCamelContext()
- Specified by:
getCamelContext
in interface org.apache.camel.CamelContextAware
getCron
public String getCron()
setCron
public void setCron(String cron)
getTimeZone
public TimeZone getTimeZone()
setTimeZone
public void setTimeZone(TimeZone timeZone)
getTaskScheduler
public org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler getTaskScheduler()
setTaskScheduler
public void setTaskScheduler(org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler taskScheduler)
doStart
protected void doStart()
throws Exception
- Specified by:
doStart
in class org.apache.camel.support.ServiceSupport
- Throws:
Exception
doStop
protected void doStop()
throws Exception
- Specified by:
doStop
in class org.apache.camel.support.ServiceSupport
- Throws:
Exception
Apache Camel