public class EventListenerRegistrarBeanProcessor extends Object implements org.springframework.beans.factory.config.DestructionAwareBeanPostProcessor, org.springframework.beans.factory.BeanFactoryAware, org.springframework.core.Ordered, org.springframework.context.ApplicationListener
EventListener interfaces, or has
method(s) annotated with the EventListener annotation with the EventListenerRegistrar on bean
creation and bean destruction.
EventListenerRegistrarBeanProcessor is implemented as a Spring BeanPostProcessor, which means that it
gets called whenever a bean is created or destroyed in the application context. Because we need to get callbacks for
all beans that get created, it is important to inject the minimum of dependencies through CI, as the
EventListenerRegistrarBeanProcessor can only be created AFTER all of its dependencies have been created.
For this reason, the name of the EventListenerRegistrar bean is injected, not the
EventListenerRegistrar instance itself. While the EventListenerRegistrarBeanProcessor does not have
the EventListenerRegistrar yet, all beans that should be registered are stored in the
listenersToBeRegistered map. When the EventListenerRegistrarBeanProcessor gets hold of the
EventListenerRegistrar, all beans in listenersToBeRegistered are registered and the map is cleared.
| Constructor and Description |
|---|
EventListenerRegistrarBeanProcessor(String eventListenerRegistrarBeanName,
ListenerHandlersConfiguration listenerHandlersConfiguration)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getOrder()
Deprecated.
|
void |
onApplicationEvent(org.springframework.context.ApplicationEvent applicationEvent)
Deprecated.
|
void |
onPluginDisabled(com.atlassian.plugin.event.events.PluginDisabledEvent event)
Deprecated.
|
void |
onPluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event)
Deprecated.
|
void |
onPluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event)
Deprecated.
|
Object |
postProcessAfterInitialization(Object bean,
String beanName)
Deprecated.
|
void |
postProcessBeforeDestruction(Object bean,
String beanName)
Deprecated.
|
Object |
postProcessBeforeInitialization(Object bean,
String beanName)
Deprecated.
|
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
Deprecated.
|
public EventListenerRegistrarBeanProcessor(String eventListenerRegistrarBeanName, ListenerHandlersConfiguration listenerHandlersConfiguration)
public int getOrder()
getOrder in interface org.springframework.core.Orderedpublic void onPluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event)
public void onPluginDisabled(com.atlassian.plugin.event.events.PluginDisabledEvent event)
public void onPluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event)
public void onApplicationEvent(org.springframework.context.ApplicationEvent applicationEvent)
onApplicationEvent in interface org.springframework.context.ApplicationListenerpublic Object postProcessAfterInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
postProcessAfterInitialization in interface org.springframework.beans.factory.config.BeanPostProcessororg.springframework.beans.BeansExceptionpublic void postProcessBeforeDestruction(Object bean, String beanName) throws org.springframework.beans.BeansException
postProcessBeforeDestruction in interface org.springframework.beans.factory.config.DestructionAwareBeanPostProcessororg.springframework.beans.BeansExceptionpublic Object postProcessBeforeInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
postProcessBeforeInitialization in interface org.springframework.beans.factory.config.BeanPostProcessororg.springframework.beans.BeansExceptionpublic void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
throws org.springframework.beans.BeansException
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAwareorg.springframework.beans.BeansExceptionCopyright © 2006-2018 Atlassian. All Rights Reserved.