T - the return type of poll taskpublic abstract class PollingTaskSupport<T> extends Object
TaskScheduler and TaskExecutor.| Constructor and Description | 
|---|
| PollingTaskSupport(TaskScheduler taskScheduler,
                  TaskExecutor taskExecutor)Instantiates a new polling task support. | 
| PollingTaskSupport(TaskScheduler taskScheduler,
                  TaskExecutor taskExecutor,
                  TimeUnit unit,
                  long duration)Instantiates a new polling task support. | 
| PollingTaskSupport(TaskScheduler taskScheduler,
                  TaskExecutor taskExecutor,
                  Trigger trigger)Instantiates a new polling task support. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected abstract T | doPoll()Do poll. | 
| void | init()Inits the poller. | 
| protected void | onPollResult(T result)Callback on poll result. | 
| void | setTrigger(Trigger trigger)Sets the trigger. | 
| void | start()Starts the poller. | 
| void | stop()Stops the poller. | 
public PollingTaskSupport(TaskScheduler taskScheduler, TaskExecutor taskExecutor)
PeriodicTrigger is used.taskScheduler - the task schedulertaskExecutor - the task executorpublic PollingTaskSupport(TaskScheduler taskScheduler, TaskExecutor taskExecutor, TimeUnit unit, long duration)
PeriodicTrigger is used.taskScheduler - the task schedulertaskExecutor - the task executorunit - the unitduration - the durationpublic PollingTaskSupport(TaskScheduler taskScheduler, TaskExecutor taskExecutor, Trigger trigger)
taskScheduler - the task schedulertaskExecutor - the task executortrigger - the triggerpublic void init()
public void start()
public void stop()
public void setTrigger(Trigger trigger)
trigger - the new triggerprotected abstract T doPoll()
protected void onPollResult(T result)
result - the result