|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.support.ServiceSupport org.apache.camel.impl.DefaultScheduledPollConsumerScheduler
public class DefaultScheduledPollConsumerScheduler
Field Summary |
---|
Fields inherited from class org.apache.camel.support.ServiceSupport |
---|
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending |
Constructor Summary | |
---|---|
DefaultScheduledPollConsumerScheduler()
|
Method Summary | |
---|---|
protected void |
doShutdown()
Implementations override this method to perform customized shutdown. |
protected void |
doStart()
Implementations override this method to support customized start/stop. |
protected void |
doStop()
Implementations override this method to support customized start/stop. |
CamelContext |
getCamelContext()
Get the CamelContext |
long |
getDelay()
|
long |
getInitialDelay()
|
ScheduledExecutorService |
getScheduledExecutorService()
|
TimeUnit |
getTimeUnit()
|
boolean |
isSchedulerStarted()
Whether the scheduler has been started. |
boolean |
isUseFixedDelay()
|
void |
onInit(Consumer consumer)
Initializes this ScheduledPollConsumerScheduler with the associated Consumer . |
void |
scheduleTask(Runnable task)
Schedules the task to run. |
void |
setCamelContext(CamelContext camelContext)
Injects the CamelContext |
void |
setDelay(long delay)
|
void |
setInitialDelay(long initialDelay)
|
void |
setScheduledExecutorService(ScheduledExecutorService scheduledExecutorService)
|
void |
setTimeUnit(TimeUnit timeUnit)
|
void |
setUseFixedDelay(boolean useFixedDelay)
|
void |
startScheduler()
Starts the scheduler. |
void |
unscheduleTask()
Attempts to unschedules the last task which was scheduled. |
Methods inherited from class org.apache.camel.support.ServiceSupport |
---|
doResume, 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 |
Constructor Detail |
---|
public DefaultScheduledPollConsumerScheduler()
Method Detail |
---|
public CamelContext getCamelContext()
CamelContextAware
CamelContext
getCamelContext
in interface CamelContextAware
public void setCamelContext(CamelContext camelContext)
CamelContextAware
CamelContext
setCamelContext
in interface CamelContextAware
camelContext
- the Camel contextpublic long getInitialDelay()
public void setInitialDelay(long initialDelay)
public long getDelay()
public void setDelay(long delay)
public TimeUnit getTimeUnit()
public void setTimeUnit(TimeUnit timeUnit)
public boolean isUseFixedDelay()
public void setUseFixedDelay(boolean useFixedDelay)
public ScheduledExecutorService getScheduledExecutorService()
public void setScheduledExecutorService(ScheduledExecutorService scheduledExecutorService)
public void onInit(Consumer consumer)
ScheduledPollConsumerScheduler
ScheduledPollConsumerScheduler
with the associated Consumer
.
onInit
in interface ScheduledPollConsumerScheduler
consumer
- the consumer.public void scheduleTask(Runnable task)
ScheduledPollConsumerScheduler
scheduleTask
in interface ScheduledPollConsumerScheduler
task
- the task to run.public void unscheduleTask()
ScheduledPollConsumerScheduler
unscheduleTask
in interface ScheduledPollConsumerScheduler
public void startScheduler()
ScheduledPollConsumerScheduler
startScheduler
in interface ScheduledPollConsumerScheduler
public boolean isSchedulerStarted()
ScheduledPollConsumerScheduler
isSchedulerStarted
in interface ScheduledPollConsumerScheduler
protected void doStart() throws Exception
ServiceSupport
ServiceSupport.doStop()
for more details.
doStart
in class ServiceSupport
Exception
ServiceSupport.doStop()
protected void doStop() throws Exception
ServiceSupport
ServiceSupport.doStop()
method when
the service is being stopped. This method will also be invoked
if the service is still in uninitialized state (eg has not
been started). The method is always called to allow the service
to do custom logic when the service is being stopped, such as when
CamelContext
is shutting down.
doStop
in class ServiceSupport
Exception
ServiceSupport.doStart()
protected void doShutdown() throws Exception
ServiceSupport
doShutdown
in class ServiceSupport
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |