public class DefaultScheduledPollConsumer extends ScheduledPollConsumer
Consumer
which uses the PollingConsumer
Constructor and Description |
---|
DefaultScheduledPollConsumer(DefaultEndpoint defaultEndpoint,
org.apache.camel.Processor processor) |
DefaultScheduledPollConsumer(org.apache.camel.Endpoint endpoint,
org.apache.camel.Processor processor,
ScheduledExecutorService executor) |
Modifier and Type | Method and Description |
---|---|
protected void |
doBuild() |
protected void |
doInit() |
protected void |
doStart() |
protected void |
doStop() |
int |
getTimeout() |
protected int |
poll()
The polling method which is invoked periodically to poll this consumer
|
void |
setTimeout(int timeout)
Sets a timeout to use with
PollingConsumer . |
afterPoll, beforePoll, doShutdown, doSuspend, getBackoffCounter, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getCounter, getDelay, getErrorCounter, getInitialDelay, getLastError, getPollStrategy, getRepeatCount, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getSuccessCounter, getTimeUnit, isGreedy, isPollAllowed, isPolling, isSchedulerStarted, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, onInit, processEmptyMessage, run, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRepeatCount, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay, startScheduler
createExchange, createUoW, defaultConsumerCallback, doneUoW, getAsyncProcessor, getEndpoint, getExceptionHandler, getHealthCheck, getProcessor, getRoute, getRouteId, handleException, handleException, releaseExchange, setExceptionHandler, setHealthCheck, setRoute, setRouteId, toString
build, doFail, doLifecycleChange, doResume, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getHealthCheck, setHealthCheck
public DefaultScheduledPollConsumer(DefaultEndpoint defaultEndpoint, org.apache.camel.Processor processor)
public DefaultScheduledPollConsumer(org.apache.camel.Endpoint endpoint, org.apache.camel.Processor processor, ScheduledExecutorService executor)
protected int poll() throws Exception
ScheduledPollConsumer
poll
in class ScheduledPollConsumer
Exception
- can be thrown if an exception occurred during pollingpublic int getTimeout()
public void setTimeout(int timeout)
PollingConsumer
. PollingConsumer.receive()
. PollingConsumer.receiveNoWait()
. PollingConsumer.receive(long)
}. timeout
- the timeout valueprotected void doBuild() throws Exception
doBuild
in class ScheduledPollConsumer
Exception
protected void doInit() throws Exception
doInit
in class ScheduledPollConsumer
Exception
protected void doStart() throws Exception
doStart
in class ScheduledPollConsumer
Exception
protected void doStop() throws Exception
doStop
in class ScheduledPollConsumer
Exception
Apache Camel