public class NacosConfigListenerMethodProcessor extends AnnotationListenerMethodProcessor<com.alibaba.nacos.api.config.annotation.NacosConfigListener> implements org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationEventPublisherAware, org.springframework.context.EnvironmentAware
@NacosConfigListener method ProcessorNacosConfigListener,
AnnotationListenerMethodProcessor,
Method| Modifier and Type | Field and Description |
|---|---|
static String |
BEAN_NAME
The bean name of
NacosConfigListenerMethodProcessor |
static String |
NACOS_CONFIG_CONVERSION_SERVICE_BEAN_NAME
The bean name of
ConversionService for Nacos Configuration |
logger| Constructor and Description |
|---|
NacosConfigListenerMethodProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
isCandidateMethod(Object bean,
Class<?> beanClass,
com.alibaba.nacos.api.config.annotation.NacosConfigListener listener,
Method method,
org.springframework.context.ApplicationContext applicationContext)
Subclass could override this method to determine current method is candidate or not
|
protected void |
processListenerMethod(String beanName,
Object bean,
Class<?> beanClass,
com.alibaba.nacos.api.config.annotation.NacosConfigListener listener,
Method method,
org.springframework.context.ApplicationContext applicationContext)
Process Listener Method when
AnnotationListenerMethodProcessor.isCandidateMethod(Object, Class, Annotation, Method, ApplicationContext)
returns true |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher) |
void |
setEnvironment(org.springframework.core.env.Environment environment) |
onApplicationEventpublic static final String BEAN_NAME
NacosConfigListenerMethodProcessorpublic static final String NACOS_CONFIG_CONVERSION_SERVICE_BEAN_NAME
ConversionService for Nacos Configurationprotected void processListenerMethod(String beanName, Object bean, Class<?> beanClass, com.alibaba.nacos.api.config.annotation.NacosConfigListener listener, Method method, org.springframework.context.ApplicationContext applicationContext)
AnnotationListenerMethodProcessorAnnotationListenerMethodProcessor.isCandidateMethod(Object, Class, Annotation, Method, ApplicationContext)
returns trueprocessListenerMethod in class AnnotationListenerMethodProcessor<com.alibaba.nacos.api.config.annotation.NacosConfigListener>beanName - Bean namebean - Bean objectbeanClass - Bean Classlistener - Annotation objectmethod - MethodapplicationContext - ApplicationContextprotected boolean isCandidateMethod(Object bean, Class<?> beanClass, com.alibaba.nacos.api.config.annotation.NacosConfigListener listener, Method method, org.springframework.context.ApplicationContext applicationContext)
AnnotationListenerMethodProcessorisCandidateMethod in class AnnotationListenerMethodProcessor<com.alibaba.nacos.api.config.annotation.NacosConfigListener>bean - Bean objectbeanClass - Bean Classlistener - Annotation objectmethod - MethodapplicationContext - ApplicationContexttrue as defaultpublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
setApplicationEventPublisher in interface org.springframework.context.ApplicationEventPublisherAwarepublic void setEnvironment(org.springframework.core.env.Environment environment)
setEnvironment in interface org.springframework.context.EnvironmentAwareCopyright © 2020. All rights reserved.