Class ContextLifecycleScheduledTaskRegistrar
java.lang.Object
org.springframework.scheduling.config.ScheduledTaskRegistrar
org.springframework.scheduling.config.ContextLifecycleScheduledTaskRegistrar
- All Implemented Interfaces:
- DisposableBean, InitializingBean, SmartInitializingSingleton, ScheduledTaskHolder
public class ContextLifecycleScheduledTaskRegistrar
extends ScheduledTaskRegistrar
implements SmartInitializingSingleton
ScheduledTaskRegistrar subclass which redirects the actual scheduling
of tasks to the afterSingletonsInstantiated() callback (as of 4.1.2).- Since:
- 3.2.1
- Author:
- Juergen Hoeller
- 
Field SummaryFields inherited from class ScheduledTaskRegistrarCRON_DISABLED
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidCallsScheduledTaskRegistrar.scheduleTasks()at bean construction time.voidInvoked right at the end of the singleton pre-instantiation phase, with a guarantee that all regular singleton beans have been created already.Methods inherited from class ScheduledTaskRegistraraddCronTask, addCronTask, addFixedDelayTask, addFixedDelayTask, addFixedDelayTask, addFixedRateTask, addFixedRateTask, addFixedRateTask, addOneTimeTask, addOneTimeTask, addTriggerTask, addTriggerTask, destroy, getCronTaskList, getFixedDelayTaskList, getFixedRateTaskList, getObservationRegistry, getScheduledTasks, getScheduler, getTriggerTaskList, hasTasks, scheduleCronTask, scheduleFixedDelayTask, scheduleFixedRateTask, scheduleOneTimeTask, scheduleTasks, scheduleTriggerTask, setCronTasks, setCronTasksList, setFixedDelayTasks, setFixedDelayTasksList, setFixedRateTasks, setFixedRateTasksList, setObservationRegistry, setScheduler, setTaskScheduler, setTriggerTasks, setTriggerTasksList
- 
Constructor Details- 
ContextLifecycleScheduledTaskRegistrarpublic ContextLifecycleScheduledTaskRegistrar()
 
- 
- 
Method Details- 
afterPropertiesSetpublic void afterPropertiesSet()Description copied from class:ScheduledTaskRegistrarCallsScheduledTaskRegistrar.scheduleTasks()at bean construction time.- Specified by:
- afterPropertiesSetin interface- InitializingBean
- Overrides:
- afterPropertiesSetin class- ScheduledTaskRegistrar
 
- 
afterSingletonsInstantiatedpublic void afterSingletonsInstantiated()Description copied from interface:SmartInitializingSingletonInvoked right at the end of the singleton pre-instantiation phase, with a guarantee that all regular singleton beans have been created already.ListableBeanFactory.getBeansOfType(Class)calls within this method won't trigger accidental side effects during bootstrap.NOTE: This callback won't be triggered for singleton beans lazily initialized on demand after BeanFactorybootstrap, and not for any other bean scope either. Carefully use it for beans with the intended bootstrap semantics only.- Specified by:
- afterSingletonsInstantiatedin interface- SmartInitializingSingleton
 
 
-