Package org.apache.camel
Interface PollingConsumerPollingStrategy
-
public interface PollingConsumerPollingStrategyStrategy that allowsConsumers to influence thePollingConsumer. For example this is used by schedule based consumers to be able to suspend/resume upon polling using aPollingConsumer.- See Also:
org.apache.camel.support.EventDrivenPollingConsumer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidafterPoll()Callback 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 Detail
-
onInit
void onInit() throws ExceptionCallback invoked when the consumer is initialized such as when thePollingConsumerstarts.- Throws:
Exception- can be thrown if error initializing.
-
beforePoll
long beforePoll(long timeout) throws ExceptionCallback 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
-
-