Package org.apache.camel
Interface PollingConsumerPollingStrategy
public interface PollingConsumerPollingStrategy
Strategy that allows
Consumers to influence the PollingConsumer.
For example this is used by schedule based consumers to be able to suspend/resume upon polling using a
PollingConsumer.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidCallback invoked after the poll.longbeforePoll(long timeout) Callback invoked before the poll.voidonInit()Callback invoked when the consumer is initialized such as when thePollingConsumerstarts.
-
Method Details
-
onInit
Callback invoked when the consumer is initialized such as when thePollingConsumerstarts.- Throws:
Exception- can be thrown if error initializing.
-
beforePoll
Callback invoked before the poll.- Parameters:
timeout- the timeout- Returns:
- timeout to be used, this allows returning a higher timeout value to ensure at least one poll is being performed
- Throws:
Exception- can be thrown if error occurred
-
afterPoll
Callback invoked after the poll.- Throws:
Exception- can be thrown if error occurred
-