Class MessagingAnnotationPostProcessor
java.lang.Object
org.springframework.integration.config.annotation.MessagingAnnotationPostProcessor
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.beans.factory.config.BeanPostProcessor
,org.springframework.beans.factory.InitializingBean
,org.springframework.beans.factory.SmartInitializingSingleton
public class MessagingAnnotationPostProcessor
extends java.lang.Object
implements org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.SmartInitializingSingleton
A
BeanPostProcessor
implementation that processes method-level
messaging annotations such as @Transformer, @Splitter, @Router, and @Filter.-
Field Summary
Fields Modifier and Type Field Description protected org.apache.commons.logging.Log
logger
-
Constructor Summary
Constructors Constructor Description MessagingAnnotationPostProcessor()
-
Method Summary
Modifier and Type Method Description <A extends java.lang.annotation.Annotation>
voidaddMessagingAnnotationPostProcessor(java.lang.Class<A> annotation, MethodAnnotationPostProcessor<A> postProcessor)
void
afterPropertiesSet()
void
afterSingletonsInstantiated()
protected java.lang.String
generateBeanName(java.lang.String originalBeanName, java.lang.reflect.Method method, java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
protected java.util.List<java.lang.annotation.Annotation>
getAnnotationChain(java.lang.reflect.Method method, java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
protected org.springframework.beans.factory.config.ConfigurableListableBeanFactory
getBeanFactory()
protected java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,MethodAnnotationPostProcessor<?>>
getPostProcessors()
java.lang.Object
postProcessAfterInitialization(java.lang.Object bean, java.lang.String beanName)
java.lang.Object
postProcessBeforeInitialization(java.lang.Object bean, java.lang.String beanName)
protected void
processAnnotationTypeOnMethod(java.lang.Object bean, java.lang.String beanName, java.lang.reflect.Method method, java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, java.util.List<java.lang.annotation.Annotation> annotations)
protected boolean
recursiveFindAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, java.lang.annotation.Annotation ann, java.util.List<java.lang.annotation.Annotation> annotationChain, java.util.Set<java.lang.annotation.Annotation> visited)
void
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
protected java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,MethodAnnotationPostProcessor<?>>
setupCustomPostProcessors()
-
Field Details
-
logger
protected final org.apache.commons.logging.Log logger
-
-
Constructor Details
-
MessagingAnnotationPostProcessor
public MessagingAnnotationPostProcessor()
-
-
Method Details
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)- Specified by:
setBeanFactory
in interfaceorg.springframework.beans.factory.BeanFactoryAware
-
getBeanFactory
protected org.springframework.beans.factory.config.ConfigurableListableBeanFactory getBeanFactory() -
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
setupCustomPostProcessors
protected java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,MethodAnnotationPostProcessor<?>> setupCustomPostProcessors() -
addMessagingAnnotationPostProcessor
public <A extends java.lang.annotation.Annotation> void addMessagingAnnotationPostProcessor(java.lang.Class<A> annotation, MethodAnnotationPostProcessor<A> postProcessor) -
afterSingletonsInstantiated
public void afterSingletonsInstantiated()- Specified by:
afterSingletonsInstantiated
in interfaceorg.springframework.beans.factory.SmartInitializingSingleton
-
postProcessBeforeInitialization
public java.lang.Object postProcessBeforeInitialization(java.lang.Object bean, java.lang.String beanName) throws org.springframework.beans.BeansException- Specified by:
postProcessBeforeInitialization
in interfaceorg.springframework.beans.factory.config.BeanPostProcessor
- Throws:
org.springframework.beans.BeansException
-
postProcessAfterInitialization
public java.lang.Object postProcessAfterInitialization(java.lang.Object bean, java.lang.String beanName) throws org.springframework.beans.BeansException- Specified by:
postProcessAfterInitialization
in interfaceorg.springframework.beans.factory.config.BeanPostProcessor
- Throws:
org.springframework.beans.BeansException
-
processAnnotationTypeOnMethod
protected void processAnnotationTypeOnMethod(java.lang.Object bean, java.lang.String beanName, java.lang.reflect.Method method, java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, java.util.List<java.lang.annotation.Annotation> annotations) -
getAnnotationChain
protected java.util.List<java.lang.annotation.Annotation> getAnnotationChain(java.lang.reflect.Method method, java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)- Parameters:
method
- the method.annotationType
- the annotation type.- Returns:
- the hierarchical list of annotations in top-bottom order.
-
recursiveFindAnnotation
protected boolean recursiveFindAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, java.lang.annotation.Annotation ann, java.util.List<java.lang.annotation.Annotation> annotationChain, java.util.Set<java.lang.annotation.Annotation> visited) -
generateBeanName
protected java.lang.String generateBeanName(java.lang.String originalBeanName, java.lang.reflect.Method method, java.lang.Class<? extends java.lang.annotation.Annotation> annotationType) -
getPostProcessors
protected java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,MethodAnnotationPostProcessor<?>> getPostProcessors()
-