public class TimerBasedWebPoller extends WebPoller
| Modifier and Type | Class and Description |
|---|---|
static class |
TimerBasedWebPoller.Factory |
DEFAULT_ERROR_COUNT_THRESHOLD, DEFAULT_INTER_ERROR_DURATION, DEFAULT_INTER_REQUEST_DURATION| Constructor and Description |
|---|
TimerBasedWebPoller(java.util.concurrent.ScheduledExecutorService timer) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
incErrorCount() |
boolean |
inError() |
boolean |
isActive() |
protected boolean |
isInPoll() |
boolean |
isPaused() |
protected boolean |
isTimerActive()
Return true if the timer or the error timer is active.
|
void |
pause()
Pause the active poller.
|
protected void |
poll()
Orchestrate the polling.
|
protected void |
pollReturned()
This should be invoked when the poll has completed.
|
protected void |
resetErrorState()
Invoked after a successful poll, regardless of whether data was received or not.
|
void |
resume()
Resume an already paused poller.
|
void |
start()
Start polling.
|
protected void |
startErrorTimer() |
protected void |
startTimer()
Start the timer that triggers the polling.
|
void |
stop()
Stop polling.
|
protected void |
stopErrorTimer() |
protected void |
stopTimer()
Stop the timer that is triggering the polling if any exists.
|
deregister, doPoll, doStart, doStop, getErrorCountThreshold, getInterErrorDuration, getInterRequestDuration, getLogLevel, getRequestContext, getRequestFactory, newWebPoller, onEmptyPollResult, onError, onMessage, onStart, onStop, register, setErrorCountThreshold, setInterErrorDuration, setInterRequestDuration, setListener, setLogLevel, setRequestFactorypublic TimerBasedWebPoller(@Nonnull
java.util.concurrent.ScheduledExecutorService timer)
protected void startTimer()
WebPollerstartTimer in class WebPollerprotected boolean isTimerActive()
WebPollerisTimerActive in class WebPollerprotected void stopTimer()
WebPollerprotected void startErrorTimer()
startErrorTimer in class WebPollerprotected void stopErrorTimer()
stopErrorTimer in class WebPollerpublic void start()
WebPollerpublic void stop()
WebPollerpublic void pause()
WebPollerpublic void resume()
WebPollerpublic boolean isPaused()
public boolean isActive()
public boolean inError()
protected void resetErrorState()
WebPollerresetErrorState in class WebPollerprotected void incErrorCount()
incErrorCount in class WebPollerprotected boolean isInPoll()
protected void pollReturned()
WebPollerpollReturned in class WebPoller