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 |
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, doInit, doShutdown, doSuspend, getBackoffCounter, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDelay, getInitialDelay, getPollStrategy, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, isGreedy, isPollAllowed, isPolling, isSchedulerStarted, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, onInit, processEmptyMessage, run, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay, startScheduler
createUoW, doneUoW, getAsyncProcessor, getEndpoint, getExceptionHandler, getProcessor, getRoute, handleException, handleException, setExceptionHandler, setRoute, toString
doResume, getStatus, init, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
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 doStart() throws Exception
doStart
in class ScheduledPollConsumer
Exception
protected void doStop() throws Exception
doStop
in class ScheduledPollConsumer
Exception
Apache Camel