类 EventListenerMethodProcessor
- java.lang.Object
- org.springframework.context.event.EventListenerMethodProcessor
public class EventListenerMethodProcessor extends Object implements SmartInitializingSingleton, ApplicationContextAware, BeanFactoryPostProcessor
RegistersEventListener
methods as individualApplicationListener
instances. ImplementsBeanFactoryPostProcessor
(as of 5.1) primarily for early retrieval, avoiding AOP checks for this processor bean and itsEventListenerFactory
delegates.- 从以下版本开始:
- 4.2
- 作者:
- Stephane Nicoll, Juergen Hoeller
- 另请参阅:
EventListenerFactory
,DefaultEventListenerFactory
构造器概要
构造器 构造器 说明 EventListenerMethodProcessor()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
afterSingletonsInstantiated()
Invoked right at the end of the singleton pre-instantiation phase, with a guarantee that all regular singleton beans have been created already.void
postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
Modify the application context's internal bean factory after its standard initialization.void
setApplicationContext(ApplicationContext applicationContext)
Set the ApplicationContext that this object runs in.
构造器详细资料
EventListenerMethodProcessor
public EventListenerMethodProcessor()
方法详细资料
setApplicationContext
public void setApplicationContext(ApplicationContext applicationContext)
从接口复制的说明:ApplicationContextAware
Set the ApplicationContext that this object runs in. Normally this call will be used to initialize the object.Invoked after population of normal bean properties but before an init callback such as
InitializingBean.afterPropertiesSet()
or a custom init-method. Invoked afterResourceLoaderAware.setResourceLoader(org.springframework.core.io.ResourceLoader)
,ApplicationEventPublisherAware.setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher)
andMessageSourceAware
, if applicable.- 指定者:
setApplicationContext
在接口中ApplicationContextAware
- 参数:
applicationContext
- the ApplicationContext object to be used by this object- 另请参阅:
BeanInitializationException
postProcessBeanFactory
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
从接口复制的说明:BeanFactoryPostProcessor
Modify the application context's internal bean factory after its standard initialization. All bean definitions will have been loaded, but no beans will have been instantiated yet. This allows for overriding or adding properties even to eager-initializing beans.- 指定者:
postProcessBeanFactory
在接口中BeanFactoryPostProcessor
- 参数:
beanFactory
- the bean factory used by the application context
afterSingletonsInstantiated
public void afterSingletonsInstantiated()
从接口复制的说明:SmartInitializingSingleton
Invoked right at the end of the singleton pre-instantiation phase, with a guarantee that all regular singleton beans have been created already.ListableBeanFactory.getBeansOfType(java.lang.Class<T>)
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
BeanFactory
bootstrap, and not for any other bean scope either. Carefully use it for beans with the intended bootstrap semantics only.