org.apache.camel.impl
Class DefaultScheduledPollConsumer
java.lang.Object
org.apache.camel.impl.ServiceSupport
org.apache.camel.impl.DefaultConsumer
org.apache.camel.impl.ScheduledPollConsumer
org.apache.camel.impl.DefaultScheduledPollConsumer
- All Implemented Interfaces:
- java.lang.Runnable, Consumer, PollingConsumerPollingStrategy, Service, ShutdownableService, SuspendableService
public class DefaultScheduledPollConsumer
- extends ScheduledPollConsumer
A default implementation of an event driven Consumer
which uses the
PollingConsumer
- Version:
Method Summary |
protected void |
doStart()
|
protected void |
doStop()
|
protected int |
poll()
The polling method which is invoked periodically to poll this consumer |
Methods inherited from class org.apache.camel.impl.ScheduledPollConsumer |
afterPoll, beforePoll, doSuspend, getDelay, getInitialDelay, getPollStrategy, getRunLoggingLevel, getTimeUnit, isPollAllowed, isPolling, isStartScheduler, isUseFixedDelay, onInit, run, setDelay, setInitialDelay, setPollStrategy, setRunLoggingLevel, setStartScheduler, setTimeUnit, setUseFixedDelay, startScheduler |
Methods inherited from class org.apache.camel.impl.ServiceSupport |
addChildService, doResume, doShutdown, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, removeChildService, resume, shutdown, start, start, stop, suspend |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DefaultScheduledPollConsumer
public DefaultScheduledPollConsumer(DefaultEndpoint defaultEndpoint,
Processor processor)
DefaultScheduledPollConsumer
public DefaultScheduledPollConsumer(Endpoint endpoint,
Processor processor,
java.util.concurrent.ScheduledExecutorService executor)
poll
protected int poll()
throws java.lang.Exception
- Description copied from class:
ScheduledPollConsumer
- The polling method which is invoked periodically to poll this consumer
- Specified by:
poll
in class ScheduledPollConsumer
- Returns:
- number of messages polled, will be 0 if no message was polled at all.
- Throws:
java.lang.Exception
- can be thrown if an exception occurred during polling
doStart
protected void doStart()
throws java.lang.Exception
- Overrides:
doStart
in class ScheduledPollConsumer
- Throws:
java.lang.Exception
doStop
protected void doStop()
throws java.lang.Exception
- Overrides:
doStop
in class ScheduledPollConsumer
- Throws:
java.lang.Exception
Apache CAMEL