public class MessagingAnnotationPostProcessor extends Object implements org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.SmartInitializingSingleton
BeanPostProcessor
implementation that processes method-level
messaging annotations such as @Transformer, @Splitter, @Router, and @Filter.Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
logger |
Constructor and Description |
---|
MessagingAnnotationPostProcessor() |
Modifier and Type | Method and Description |
---|---|
<A extends Annotation> |
addMessagingAnnotationPostProcessor(Class<A> annotation,
MethodAnnotationPostProcessor<A> postProcessor) |
void |
afterPropertiesSet() |
void |
afterSingletonsInstantiated() |
protected String |
generateBeanName(String originalBeanName,
Method method,
Class<? extends Annotation> annotationType) |
protected List<Annotation> |
getAnnotationChain(Method method,
Class<? extends Annotation> annotationType) |
protected Class<?> |
getBeanClass(Object bean) |
protected org.springframework.beans.factory.config.ConfigurableListableBeanFactory |
getBeanFactory() |
protected org.springframework.util.MultiValueMap<String,String> |
getLazyLifecycleRoles() |
protected Map<Class<? extends Annotation>,MethodAnnotationPostProcessor<?>> |
getPostProcessors() |
Object |
postProcessAfterInitialization(Object bean,
String beanName) |
Object |
postProcessBeforeInitialization(Object bean,
String beanName) |
protected void |
processAnnotationTypeOnMethod(Object bean,
String beanName,
Method method,
Class<? extends Annotation> annotationType,
List<Annotation> annotations) |
protected boolean |
recursiveFindAnnotation(Class<? extends Annotation> annotationType,
Annotation ann,
List<Annotation> annotationChain,
Set<Annotation> visited) |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) |
void |
setRequireComponentAnnotation(boolean requireComponentAnnotation) |
protected Map<Class<? extends Annotation>,MethodAnnotationPostProcessor<?>> |
setupCustomPostProcessors() |
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
setBeanFactory
in interface org.springframework.beans.factory.BeanFactoryAware
public void setRequireComponentAnnotation(boolean requireComponentAnnotation)
requireComponentAnnotation
- the boolean
flag to indicate requirements for the
Component
annotation presentation for the messaging annotations.IntegrationProperties.REQUIRE_COMPONENT_ANNOTATION
protected org.springframework.beans.factory.config.ConfigurableListableBeanFactory getBeanFactory()
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
protected Map<Class<? extends Annotation>,MethodAnnotationPostProcessor<?>> setupCustomPostProcessors()
public <A extends Annotation> void addMessagingAnnotationPostProcessor(Class<A> annotation, MethodAnnotationPostProcessor<A> postProcessor)
public Object postProcessBeforeInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
postProcessBeforeInitialization
in interface org.springframework.beans.factory.config.BeanPostProcessor
org.springframework.beans.BeansException
public void afterSingletonsInstantiated()
afterSingletonsInstantiated
in interface org.springframework.beans.factory.SmartInitializingSingleton
public Object postProcessAfterInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
postProcessAfterInitialization
in interface org.springframework.beans.factory.config.BeanPostProcessor
org.springframework.beans.BeansException
protected void processAnnotationTypeOnMethod(Object bean, String beanName, Method method, Class<? extends Annotation> annotationType, List<Annotation> annotations)
protected List<Annotation> getAnnotationChain(Method method, Class<? extends Annotation> annotationType)
method
- the method.annotationType
- the annotation type.protected boolean recursiveFindAnnotation(Class<? extends Annotation> annotationType, Annotation ann, List<Annotation> annotationChain, Set<Annotation> visited)
protected String generateBeanName(String originalBeanName, Method method, Class<? extends Annotation> annotationType)
protected Map<Class<? extends Annotation>,MethodAnnotationPostProcessor<?>> getPostProcessors()