org.springframework.batch.poller.scheduling
Class TaskSchedulerPoller<T>
java.lang.Object
org.springframework.batch.poller.scheduling.TaskSchedulerPoller<T>
- All Implemented Interfaces:
- org.springframework.batch.poller.Poller<T>, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean
public class TaskSchedulerPoller<T>
- extends Object
- implements org.springframework.batch.poller.Poller<T>, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.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(org.springframework.scheduling.Trigger trigger)
setTaskScheduler
public void setTaskScheduler(org.springframework.scheduling.TaskScheduler taskScheduler)
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
throws org.springframework.beans.BeansException
- Specified by:
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
- Throws:
org.springframework.beans.BeansException
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
- Throws:
Exception
poll
public Future<T> poll(Callable<T> callback)
throws Exception
- Specified by:
poll in interface org.springframework.batch.poller.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 © 2013. All Rights Reserved.