Class InterceptingApplicationEventMulticasterProxy
- java.lang.Object
-
- io.microsphere.spring.beans.factory.config.GenericBeanPostProcessorAdapter<org.springframework.context.ApplicationListener>
-
- io.microsphere.spring.context.event.InterceptingApplicationEventMulticasterProxy
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.config.BeanPostProcessor,org.springframework.context.event.ApplicationEventMulticaster
public class InterceptingApplicationEventMulticasterProxy extends GenericBeanPostProcessorAdapter<org.springframework.context.ApplicationListener> implements org.springframework.context.event.ApplicationEventMulticaster, org.springframework.beans.factory.BeanFactoryAware
InterceptingApplicationEventMulticasterProxy- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
ApplicationEventMulticaster
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_RESET_BEAN_NAMEThe default reset bean name ofApplicationEventMulticaster.static java.lang.StringRESET_BEAN_NAME_PROPERTY_NAMEThe property name of the reset bean name ofApplicationEventMulticaster
-
Constructor Summary
Constructors Constructor Description InterceptingApplicationEventMulticasterProxy(org.springframework.core.env.Environment environment)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddApplicationListener(org.springframework.context.ApplicationListener<?> listener)voidaddApplicationListenerBean(java.lang.String listenerBeanName)protected org.springframework.context.ApplicationListenerdoPostProcessAfterInitialization(org.springframework.context.ApplicationListener bean, java.lang.String beanName)Adapter BeanPostProcessor#postProcessAfterInitialization(Object, String) method , sub-type could override this method.static java.lang.StringgetResetBeanName(org.springframework.core.env.Environment environment)protected java.util.concurrent.ExecutorgetTaskExecutor()voidmulticastEvent(org.springframework.context.ApplicationEvent event)voidmulticastEvent(org.springframework.context.ApplicationEvent event, org.springframework.core.ResolvableType eventType)voidremoveAllListeners()voidremoveApplicationListener(org.springframework.context.ApplicationListener<?> listener)voidremoveApplicationListenerBean(java.lang.String listenerBeanName)voidremoveApplicationListenerBeans(java.util.function.Predicate<java.lang.String> predicate)voidremoveApplicationListeners(java.util.function.Predicate<org.springframework.context.ApplicationListener<?>> predicate)voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)voidsetTaskExecutor(java.util.concurrent.Executor taskExecutor)-
Methods inherited from class io.microsphere.spring.beans.factory.config.GenericBeanPostProcessorAdapter
doPostProcessBeforeInitialization, getBeanType, postProcessAfterInitialization, postProcessBeforeInitialization, processAfterInitialization, processBeforeInitialization
-
-
-
-
Field Detail
-
DEFAULT_RESET_BEAN_NAME
public static final java.lang.String DEFAULT_RESET_BEAN_NAME
The default reset bean name ofApplicationEventMulticaster.The original bean name of
ApplicationEventMulticasteris"applicationEventMulticaster"- See Also:
AbstractApplicationContext.APPLICATION_EVENT_MULTICASTER_BEAN_NAME, Constant Field Values
-
RESET_BEAN_NAME_PROPERTY_NAME
@ConfigurationProperty(defaultValue="applicationEventMulticaster_ORIGINAL", description="The property name of the reset bean name of ApplicationEventMulticaster") public static final java.lang.String RESET_BEAN_NAME_PROPERTY_NAMEThe property name of the reset bean name ofApplicationEventMulticaster- See Also:
- Constant Field Values
-
-
Method Detail
-
getResetBeanName
public static java.lang.String getResetBeanName(org.springframework.core.env.Environment environment)
-
addApplicationListener
public void addApplicationListener(org.springframework.context.ApplicationListener<?> listener)
- Specified by:
addApplicationListenerin interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
addApplicationListenerBean
public void addApplicationListenerBean(java.lang.String listenerBeanName)
- Specified by:
addApplicationListenerBeanin interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
removeApplicationListener
public void removeApplicationListener(org.springframework.context.ApplicationListener<?> listener)
- Specified by:
removeApplicationListenerin interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
removeApplicationListenerBean
public void removeApplicationListenerBean(java.lang.String listenerBeanName)
- Specified by:
removeApplicationListenerBeanin interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
removeApplicationListeners
public void removeApplicationListeners(java.util.function.Predicate<org.springframework.context.ApplicationListener<?>> predicate)
- Specified by:
removeApplicationListenersin interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
removeApplicationListenerBeans
public void removeApplicationListenerBeans(java.util.function.Predicate<java.lang.String> predicate)
- Specified by:
removeApplicationListenerBeansin interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
removeAllListeners
public void removeAllListeners()
- Specified by:
removeAllListenersin interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
multicastEvent
public void multicastEvent(org.springframework.context.ApplicationEvent event)
- Specified by:
multicastEventin interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
multicastEvent
public void multicastEvent(org.springframework.context.ApplicationEvent event, org.springframework.core.ResolvableType eventType)- Specified by:
multicastEventin interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
doPostProcessAfterInitialization
protected org.springframework.context.ApplicationListener doPostProcessAfterInitialization(org.springframework.context.ApplicationListener bean, java.lang.String beanName) throws org.springframework.beans.BeansExceptionDescription copied from class:GenericBeanPostProcessorAdapterAdapter BeanPostProcessor#postProcessAfterInitialization(Object, String) method , sub-type could override this method.- Overrides:
doPostProcessAfterInitializationin classGenericBeanPostProcessorAdapter<org.springframework.context.ApplicationListener>- Parameters:
bean- Bean ObjectbeanName- Bean Name- Returns:
- Bean Object
- Throws:
org.springframework.beans.BeansException- See Also:
BeanPostProcessor.postProcessAfterInitialization(Object, String)
-
setTaskExecutor
public void setTaskExecutor(@Nullable java.util.concurrent.Executor taskExecutor)
-
getTaskExecutor
protected java.util.concurrent.Executor getTaskExecutor()
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException- Specified by:
setBeanFactoryin interfaceorg.springframework.beans.factory.BeanFactoryAware- Throws:
org.springframework.beans.BeansException
-
-