类 OnceApplicationContextEventListener
java.lang.Object
org.dromara.dynamictp.common.spring.OnceApplicationContextEventListener
- 所有已实现的接口:
EventListener,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
public abstract class OnceApplicationContextEventListener
extends Object
implements org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
The abstract class
ApplicationListener for ApplicationEvent guarantees just one-time execution
and prevents the event propagation in the hierarchical ApplicationContexts- 从以下版本开始:
- 1.1.4
- 作者:
- yanhom
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidonApplicationEvent(org.springframework.context.ApplicationEvent event) protected voidonContextClosedEvent(org.springframework.context.event.ContextClosedEvent event) The subclass overrides this method to handleContextClosedEventprotected voidonContextRefreshedEvent(org.springframework.context.event.ContextRefreshedEvent event) The subclass overrides this method to handleContextRefreshedEventprotected voidonContextStartedEvent(org.springframework.context.event.ContextStartedEvent event) The subclass overrides this method to handleContextStartedEventprotected voidonContextStoppedEvent(org.springframework.context.event.ContextStoppedEvent event) The subclass overrides this method to handleContextStoppedEventfinal voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)
-
构造器详细资料
-
OnceApplicationContextEventListener
protected OnceApplicationContextEventListener()
-
-
方法详细资料
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.ApplicationEvent event) - 指定者:
onApplicationEvent在接口中org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
-
onContextRefreshedEvent
protected void onContextRefreshedEvent(org.springframework.context.event.ContextRefreshedEvent event) The subclass overrides this method to handleContextRefreshedEvent- 参数:
event-ContextRefreshedEvent
-
onContextStartedEvent
protected void onContextStartedEvent(org.springframework.context.event.ContextStartedEvent event) The subclass overrides this method to handleContextStartedEvent- 参数:
event-ContextStartedEvent
-
onContextStoppedEvent
protected void onContextStoppedEvent(org.springframework.context.event.ContextStoppedEvent event) The subclass overrides this method to handleContextStoppedEvent- 参数:
event-ContextStoppedEvent
-
onContextClosedEvent
protected void onContextClosedEvent(org.springframework.context.event.ContextClosedEvent event) The subclass overrides this method to handleContextClosedEvent- 参数:
event-ContextClosedEvent
-
setApplicationContext
public final void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - 指定者:
setApplicationContext在接口中org.springframework.context.ApplicationContextAware
-