org.springframework.scheduling.config
Class ScheduledTaskRegistrar
java.lang.Object
org.springframework.scheduling.config.ScheduledTaskRegistrar
- All Implemented Interfaces:
- DisposableBean, InitializingBean
public class ScheduledTaskRegistrar
- extends Object
- implements InitializingBean, DisposableBean
Helper bean for registering tasks with a TaskScheduler
,
typically using cron expressions.
- Since:
- 3.0
- Author:
- Juergen Hoeller
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ScheduledTaskRegistrar
public ScheduledTaskRegistrar()
setTaskScheduler
public void setTaskScheduler(TaskScheduler taskScheduler)
setScheduler
public void setScheduler(Object scheduler)
setTriggerTasks
public void setTriggerTasks(Map<Runnable,Trigger> triggerTasks)
setCronTasks
public void setCronTasks(Map<Runnable,String> cronTasks)
setFixedRateTasks
public void setFixedRateTasks(Map<Runnable,Long> fixedRateTasks)
setFixedDelayTasks
public void setFixedDelayTasks(Map<Runnable,Long> fixedDelayTasks)
afterPropertiesSet
public void afterPropertiesSet()
- Description copied from interface:
InitializingBean
- Invoked by a BeanFactory after it has set all bean properties supplied
(and satisfied BeanFactoryAware and ApplicationContextAware).
This method allows the bean instance to perform initialization only
possible when all bean properties have been set and to throw an
exception in the event of misconfiguration.
- Specified by:
afterPropertiesSet
in interface InitializingBean
destroy
public void destroy()
- Description copied from interface:
DisposableBean
- Invoked by a BeanFactory on destruction of a singleton.
- Specified by:
destroy
in interface DisposableBean