org.springframework.integration.config.annotation
Class PublisherAnnotationPostProcessor

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

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

A BeanPostProcessor that adds a message publishing interceptor when it discovers annotated methods.

Author:
Mark Fisher

Field Summary
private  org.springframework.aop.Advisor advisor
           
private  java.lang.ClassLoader beanClassLoader
           
private  java.lang.String channelNameAttribute
           
private  ChannelRegistry channelRegistry
           
private  java.lang.Class<? extends java.lang.annotation.Annotation> publisherAnnotationType
           
 
Constructor Summary
PublisherAnnotationPostProcessor()
           
 
Method Summary
private  void createAdvisor()
           
 java.lang.Object postProcessAfterInitialization(java.lang.Object bean, java.lang.String beanName)
           
 java.lang.Object postProcessBeforeInitialization(java.lang.Object bean, java.lang.String beanName)
           
private  boolean requiresClassProxying(java.lang.Class<?> targetClass)
           
 void setBeanClassLoader(java.lang.ClassLoader beanClassLoader)
           
 void setChannelNameAttribute(java.lang.String channelNameAttribute)
           
 void setChannelRegistry(ChannelRegistry channelRegistry)
           
 void setPublisherAnnotationType(java.lang.Class<? extends java.lang.annotation.Annotation> publisherAnnotationType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

publisherAnnotationType

private volatile java.lang.Class<? extends java.lang.annotation.Annotation> publisherAnnotationType

channelNameAttribute

private volatile java.lang.String channelNameAttribute

channelRegistry

private ChannelRegistry channelRegistry

advisor

private org.springframework.aop.Advisor advisor

beanClassLoader

private java.lang.ClassLoader beanClassLoader
Constructor Detail

PublisherAnnotationPostProcessor

public PublisherAnnotationPostProcessor()
Method Detail

setBeanClassLoader

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

setPublisherAnnotationType

public void setPublisherAnnotationType(java.lang.Class<? extends java.lang.annotation.Annotation> publisherAnnotationType)

setChannelNameAttribute

public void setChannelNameAttribute(java.lang.String channelNameAttribute)

setChannelRegistry

public void setChannelRegistry(ChannelRegistry channelRegistry)

createAdvisor

private void createAdvisor()

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

requiresClassProxying

private boolean requiresClassProxying(java.lang.Class<?> targetClass)