Package org.apache.camel.support
Class DefaultScheduledPollConsumerScheduler
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultScheduledPollConsumerScheduler
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.CamelContextAware
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.spi.HasCamelContext
,org.apache.camel.spi.ScheduledPollConsumerScheduler
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
public class DefaultScheduledPollConsumerScheduler
extends org.apache.camel.support.service.ServiceSupport
implements org.apache.camel.spi.ScheduledPollConsumerScheduler
The default scheduler for
ScheduledPollConsumer
.-
Field Summary
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
-
Constructor Summary
ConstructorDescriptionDefaultScheduledPollConsumerScheduler
(ScheduledExecutorService scheduledExecutorService) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doStart()
protected void
doStop()
org.apache.camel.CamelContext
int
long
getDelay()
long
int
boolean
boolean
void
onInit
(org.apache.camel.Consumer consumer) void
scheduleTask
(Runnable task) void
setCamelContext
(org.apache.camel.CamelContext camelContext) void
setConcurrentConsumers
(int concurrentConsumers) void
setDelay
(long delay) void
setInitialDelay
(long initialDelay) void
setPoolSize
(int poolSize) void
setScheduledExecutorService
(ScheduledExecutorService scheduledExecutorService) void
setTimeUnit
(TimeUnit timeUnit) void
setUseFixedDelay
(boolean useFixedDelay) void
void
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, 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.Service
build, close, init, start, stop
Methods inherited from interface org.apache.camel.ShutdownableService
shutdown
Methods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
Methods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
DefaultScheduledPollConsumerScheduler
public DefaultScheduledPollConsumerScheduler() -
DefaultScheduledPollConsumerScheduler
-
-
Method Details
-
getCamelContext
public org.apache.camel.CamelContext getCamelContext()- Specified by:
getCamelContext
in interfaceorg.apache.camel.spi.HasCamelContext
-
setCamelContext
public void setCamelContext(org.apache.camel.CamelContext camelContext) - Specified by:
setCamelContext
in interfaceorg.apache.camel.CamelContextAware
-
getInitialDelay
public long getInitialDelay() -
setInitialDelay
public void setInitialDelay(long initialDelay) -
getDelay
public long getDelay() -
setDelay
public void setDelay(long delay) -
getTimeUnit
-
setTimeUnit
-
isUseFixedDelay
public boolean isUseFixedDelay() -
setUseFixedDelay
public void setUseFixedDelay(boolean useFixedDelay) -
getScheduledExecutorService
-
setScheduledExecutorService
-
getConcurrentConsumers
public int getConcurrentConsumers() -
setConcurrentConsumers
public void setConcurrentConsumers(int concurrentConsumers) -
getPoolSize
public int getPoolSize() -
setPoolSize
public void setPoolSize(int poolSize) -
onInit
public void onInit(org.apache.camel.Consumer consumer) - Specified by:
onInit
in interfaceorg.apache.camel.spi.ScheduledPollConsumerScheduler
-
scheduleTask
- Specified by:
scheduleTask
in interfaceorg.apache.camel.spi.ScheduledPollConsumerScheduler
-
unscheduleTask
public void unscheduleTask()- Specified by:
unscheduleTask
in interfaceorg.apache.camel.spi.ScheduledPollConsumerScheduler
-
startScheduler
public void startScheduler()- Specified by:
startScheduler
in interfaceorg.apache.camel.spi.ScheduledPollConsumerScheduler
-
isSchedulerStarted
public boolean isSchedulerStarted()- Specified by:
isSchedulerStarted
in interfaceorg.apache.camel.spi.ScheduledPollConsumerScheduler
-
doStart
- Overrides:
doStart
in classorg.apache.camel.support.service.BaseService
- Throws:
Exception
-
doStop
- Overrides:
doStop
in classorg.apache.camel.support.service.BaseService
- Throws:
Exception
-