org.springframework.integration.config.annotation
Class MessagingAnnotationPostProcessor

java.lang.Object
  extended by org.springframework.integration.config.annotation.MessagingAnnotationPostProcessor
All Implemented Interfaces:
org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.beans.factory.InitializingBean

public class MessagingAnnotationPostProcessor
extends java.lang.Object
implements org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.BeanClassLoaderAware

A BeanPostProcessor implementation that processes method-level messaging annotations such as @Handler, @MessageSource, and @MessageTarget. It also generates endpoints for classes annotated with the class-level @MessageEndpoint annotation.

Author:
Mark Fisher, Marius Bogoevici

Field Summary
private  java.lang.ClassLoader beanClassLoader
           
private  MessageBus messageBus
           
private  java.util.Map<java.lang.Class<?>,AnnotationMethodPostProcessor> postProcessors
           
 
Constructor Summary
MessagingAnnotationPostProcessor(MessageBus messageBus)
           
 
Method Summary
 void afterPropertiesSet()
           
private  java.lang.Class<?> getBeanClass(java.lang.Object bean)
           
 java.lang.Object postProcessAfterInitialization(java.lang.Object bean, java.lang.String beanName)
           
 java.lang.Object postProcessBeforeInitialization(java.lang.Object bean, java.lang.String beanName)
           
 void setBeanClassLoader(java.lang.ClassLoader beanClassLoader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

messageBus

private final MessageBus messageBus

beanClassLoader

private volatile java.lang.ClassLoader beanClassLoader

postProcessors

private final java.util.Map<java.lang.Class<?>,AnnotationMethodPostProcessor> postProcessors
Constructor Detail

MessagingAnnotationPostProcessor

public MessagingAnnotationPostProcessor(MessageBus messageBus)
Method Detail

setBeanClassLoader

public void setBeanClassLoader(java.lang.ClassLoader beanClassLoader)
Specified by:
setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAware

afterPropertiesSet

public void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean

postProcessBeforeInitialization

public java.lang.Object postProcessBeforeInitialization(java.lang.Object bean,
                                                        java.lang.String beanName)
                                                 throws org.springframework.beans.BeansException
Specified by:
postProcessBeforeInitialization in interface org.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 interface org.springframework.beans.factory.config.BeanPostProcessor
Throws:
org.springframework.beans.BeansException

getBeanClass

private java.lang.Class<?> getBeanClass(java.lang.Object bean)