|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.scheduling.config.ScheduledTaskRegistrar
public class ScheduledTaskRegistrar
Helper bean for registering tasks with a TaskScheduler
,
typically using cron expressions.
Constructor Summary | |
---|---|
ScheduledTaskRegistrar()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware). |
void |
destroy()
Invoked by a BeanFactory on destruction of a singleton. |
void |
setCronTasks(Map<Runnable,String> cronTasks)
Specify triggered tasks as a Map of Runnables (the tasks) and cron expressions. |
void |
setFixedDelayTasks(Map<Runnable,Long> fixedDelayTasks)
Specify triggered tasks as a Map of Runnables (the tasks) and fixed-delay values. |
void |
setFixedRateTasks(Map<Runnable,Long> fixedRateTasks)
Specify triggered tasks as a Map of Runnables (the tasks) and fixed-rate values. |
void |
setScheduler(Object scheduler)
Set the TaskScheduler to register scheduled
tasks with, or a ScheduledExecutorService to be
wrapped as a TaskScheduler. |
void |
setTaskScheduler(TaskScheduler taskScheduler)
Set the TaskScheduler to register scheduled tasks with. |
void |
setTriggerTasks(Map<Runnable,Trigger> triggerTasks)
Specify triggered tasks as a Map of Runnables (the tasks) and Trigger objects (typically custom implementations of the Trigger interface). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScheduledTaskRegistrar()
Method Detail |
---|
public void setTaskScheduler(TaskScheduler taskScheduler)
public void setScheduler(Object scheduler)
TaskScheduler
to register scheduled
tasks with, or a ScheduledExecutorService
to be
wrapped as a TaskScheduler.
public void setTriggerTasks(Map<Runnable,Trigger> triggerTasks)
Trigger
interface).
public void setCronTasks(Map<Runnable,String> cronTasks)
CronTrigger
public void setFixedRateTasks(Map<Runnable,Long> fixedRateTasks)
TaskScheduler.scheduleAtFixedRate(Runnable, long)
public void setFixedDelayTasks(Map<Runnable,Long> fixedDelayTasks)
TaskScheduler.scheduleWithFixedDelay(Runnable, long)
public void afterPropertiesSet()
InitializingBean
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.
afterPropertiesSet
in interface InitializingBean
public void destroy()
DisposableBean
destroy
in interface DisposableBean
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |