public class EventListenerMethodProcessor extends Object implements SmartInitializingSingleton, ApplicationContextAware
EventListener annotated method as individual ApplicationListener
instances.| Constructor and Description |
|---|
EventListenerMethodProcessor() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected List<EventListenerFactory> |
getEventListenerFactories()
Return the
EventListenerFactory instances to use to handle
EventListener annotated methods. |
protected void |
processBean(List<EventListenerFactory> factories,
String beanName,
Class<?> targetType) |
void |
setApplicationContext(ApplicationContext applicationContext)
Set the ApplicationContext that this object runs in.
|
protected final Log logger
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
ApplicationContextAwareInvoked 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 ApplicationContextAwareapplicationContext - the ApplicationContext object to be used by this objectApplicationContextException - in case of context initialization errorsBeansException - if thrown by application context methodsBeanInitializationExceptionpublic void afterSingletonsInstantiated()
SmartInitializingSingletonListableBeanFactory.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.
afterSingletonsInstantiated in interface SmartInitializingSingletonprotected List<EventListenerFactory> getEventListenerFactories()
EventListenerFactory instances to use to handle
EventListener annotated methods.protected void processBean(List<EventListenerFactory> factories, String beanName, Class<?> targetType)