public class

ScheduledTaskRegistrar

extends Object
implements DisposableBean InitializingBean
java.lang.Object
   ↳ org.springframework.scheduling.config.ScheduledTaskRegistrar

Class Overview

Helper bean for registering tasks with a TaskScheduler, typically using cron expressions.

Summary

Public Constructors
ScheduledTaskRegistrar()
Public Methods
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<RunnableString> cronTasks)
Specify triggered tasks as a Map of Runnables (the tasks) and cron expressions.
void setFixedDelayTasks(Map<RunnableLong> fixedDelayTasks)
Specify triggered tasks as a Map of Runnables (the tasks) and fixed-delay values.
void setFixedRateTasks(Map<RunnableLong> 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<RunnableTrigger> triggerTasks)
Specify triggered tasks as a Map of Runnables (the tasks) and Trigger objects (typically custom implementations of the Trigger interface).
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.beans.factory.DisposableBean
From interface org.springframework.beans.factory.InitializingBean

Public Constructors

public ScheduledTaskRegistrar ()

Public Methods

public void afterPropertiesSet ()

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.

public void destroy ()

Invoked by a BeanFactory on destruction of a singleton.

public void setCronTasks (Map<RunnableString> cronTasks)

Specify triggered tasks as a Map of Runnables (the tasks) and cron expressions.

See Also

public void setFixedDelayTasks (Map<RunnableLong> fixedDelayTasks)

Specify triggered tasks as a Map of Runnables (the tasks) and fixed-delay values.

public void setFixedRateTasks (Map<RunnableLong> fixedRateTasks)

Specify triggered tasks as a Map of Runnables (the tasks) and fixed-rate values.

public void setScheduler (Object scheduler)

Set the TaskScheduler to register scheduled tasks with, or a ScheduledExecutorService to be wrapped as a TaskScheduler.

public void setTaskScheduler (TaskScheduler taskScheduler)

Set the TaskScheduler to register scheduled tasks with.

public void setTriggerTasks (Map<RunnableTrigger> triggerTasks)

Specify triggered tasks as a Map of Runnables (the tasks) and Trigger objects (typically custom implementations of the Trigger interface).