org.springframework.batch.poller.scheduling
Class TaskSchedulerPoller<T>
java.lang.Object
org.springframework.batch.poller.scheduling.TaskSchedulerPoller<T>
- All Implemented Interfaces:
- Poller<T>, BeanFactoryAware, InitializingBean
public class TaskSchedulerPoller<T>
- extends Object
- implements Poller<T>, BeanFactoryAware, InitializingBean
A Poller implementation that uses a TaskScheduler to poll in
a background thread.
- Author:
- Dave Syer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TaskSchedulerPoller
public TaskSchedulerPoller()
setTrigger
public void setTrigger(Trigger trigger)
setTaskScheduler
public void setTaskScheduler(TaskScheduler taskScheduler)
setBeanFactory
public void setBeanFactory(BeanFactory beanFactory)
throws BeansException
- Specified by:
setBeanFactory in interface BeanFactoryAware
- Throws:
BeansException
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet in interface InitializingBean
- Throws:
Exception
poll
public Future<T> poll(Callable<T> callback)
throws Exception
- Specified by:
poll in interface Poller<T>
- Parameters:
callback - a Callable to use to retrieve a result
- Returns:
- the result, or null if the operation times out
- Throws:
Exception- See Also:
Poller.poll(Callable)
Copyright © 2011. All Rights Reserved.