|
spring-context | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor
public class ScheduledAnnotationBeanPostProcessor
Bean post-processor that registers methods annotated with @Scheduled
to be invoked by a TaskScheduler
according
to the "fixedRate", "fixedDelay", or "cron" expression provided via the annotation.
This post-processor is automatically registered by Spring's
<task:annotation-driven>
XML element, and also by the @EnableScheduling
annotation.
Auto-detects any SchedulingConfigurer
instances in the container,
allowing for customization of the scheduler to be used or for fine-grained control
over task registration (e.g. registration of Trigger
tasks.
See @EnableScheduling
Javadoc for complete usage details.
Scheduled
,
EnableScheduling
,
SchedulingConfigurer
,
TaskScheduler
,
ScheduledTaskRegistrar
Field Summary |
---|
Fields inherited from interface org.springframework.core.Ordered |
---|
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
Constructor Summary | |
---|---|
ScheduledAnnotationBeanPostProcessor()
|
Method Summary | |
---|---|
void |
destroy()
|
int |
getOrder()
|
void |
onApplicationEvent(ContextRefreshedEvent event)
Handle an application event. |
java.lang.Object |
postProcessAfterInitialization(java.lang.Object bean,
java.lang.String beanName)
|
java.lang.Object |
postProcessBeforeInitialization(java.lang.Object bean,
java.lang.String beanName)
|
void |
setApplicationContext(ApplicationContext applicationContext)
Set the ApplicationContext that this object runs in. |
void |
setEmbeddedValueResolver(org.springframework.util.StringValueResolver resolver)
Set the StringValueResolver to use for resolving embedded definition values. |
void |
setScheduler(java.lang.Object scheduler)
Set the TaskScheduler that will invoke
the scheduled methods, or a ScheduledExecutorService
to be wrapped as a TaskScheduler. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScheduledAnnotationBeanPostProcessor()
Method Detail |
---|
public void setScheduler(java.lang.Object scheduler)
TaskScheduler
that will invoke
the scheduled methods, or a ScheduledExecutorService
to be wrapped as a TaskScheduler.
public void setEmbeddedValueResolver(org.springframework.util.StringValueResolver resolver)
EmbeddedValueResolverAware
setEmbeddedValueResolver
in interface EmbeddedValueResolverAware
public void setApplicationContext(ApplicationContext applicationContext)
ApplicationContextAware
Invoked after population of normal bean properties but before an init callback such
as InitializingBean.afterPropertiesSet()
or a custom init-method. Invoked after ResourceLoaderAware.setResourceLoader(org.springframework.core.io.ResourceLoader)
,
ApplicationEventPublisherAware.setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher)
and
MessageSourceAware
, if applicable.
setApplicationContext
in interface ApplicationContextAware
applicationContext
- the ApplicationContext object to be used by this objectBeanInitializationException
public int getOrder()
getOrder
in interface org.springframework.core.Ordered
public java.lang.Object postProcessBeforeInitialization(java.lang.Object bean, java.lang.String beanName)
postProcessBeforeInitialization
in interface org.springframework.beans.factory.config.BeanPostProcessor
public java.lang.Object postProcessAfterInitialization(java.lang.Object bean, java.lang.String beanName)
postProcessAfterInitialization
in interface org.springframework.beans.factory.config.BeanPostProcessor
public void onApplicationEvent(ContextRefreshedEvent event)
ApplicationListener
onApplicationEvent
in interface ApplicationListener<ContextRefreshedEvent>
event
- the event to respond topublic void destroy() throws java.lang.Exception
destroy
in interface org.springframework.beans.factory.DisposableBean
java.lang.Exception
|
spring-context | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |