Class AbstractMethodAnnotationPostProcessor<T extends Annotation>

java.lang.Object
org.springframework.integration.config.AbstractMethodAnnotationPostProcessor<T>
Type Parameters:
T - the target annotation type.
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, MethodAnnotationPostProcessor<T>
Direct Known Subclasses:
AggregatorAnnotationPostProcessor, BridgeFromAnnotationPostProcessor, BridgeToAnnotationPostProcessor, FilterAnnotationPostProcessor, InboundChannelAdapterAnnotationPostProcessor, RouterAnnotationPostProcessor, ServiceActivatorAnnotationPostProcessor, SplitterAnnotationPostProcessor, TransformerAnnotationPostProcessor

public abstract class AbstractMethodAnnotationPostProcessor<T extends Annotation> extends Object implements MethodAnnotationPostProcessor<T>, org.springframework.beans.factory.BeanFactoryAware
Base class for Method-level annotation post-processors.
  • Field Details

    • logger

      protected final org.apache.commons.logging.Log logger
    • ADVICE_CHAIN_ATTRIBUTE

      protected static final String ADVICE_CHAIN_ATTRIBUTE
      See Also:
    • SEND_TIMEOUT_ATTRIBUTE

      protected static final String SEND_TIMEOUT_ATTRIBUTE
      See Also:
    • messageHandlerAttributes

      protected final List<String> messageHandlerAttributes
    • annotationType

      protected final Class<T extends Annotation> annotationType
  • Constructor Details

    • AbstractMethodAnnotationPostProcessor

      public AbstractMethodAnnotationPostProcessor()
  • Method Details

    • setBeanFactory

      public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException
      Specified by:
      setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
      Throws:
      org.springframework.beans.BeansException
    • getBeanFactory

      protected org.springframework.beans.factory.config.ConfigurableListableBeanFactory getBeanFactory()
    • getDefinitionRegistry

      protected org.springframework.beans.factory.support.BeanDefinitionRegistry getDefinitionRegistry()
    • getConversionService

      protected org.springframework.core.convert.ConversionService getConversionService()
    • getChannelResolver

      protected org.springframework.messaging.core.DestinationResolver<org.springframework.messaging.MessageChannel> getChannelResolver()
    • processBeanDefinition

      public void processBeanDefinition(String beanName, org.springframework.beans.factory.annotation.AnnotatedBeanDefinition beanDefinition, List<Annotation> annotations)
      Specified by:
      processBeanDefinition in interface MethodAnnotationPostProcessor<T extends Annotation>
    • createEndpointBeanDefinition

      protected org.springframework.beans.factory.config.BeanDefinition createEndpointBeanDefinition(org.springframework.beans.factory.parsing.ComponentDefinition handlerBeanDefinition, org.springframework.beans.factory.parsing.ComponentDefinition beanDefinition, List<Annotation> annotations)
    • resolveHandlerBeanDefinition

      @Nullable protected org.springframework.beans.factory.config.BeanDefinition resolveHandlerBeanDefinition(String beanName, org.springframework.beans.factory.annotation.AnnotatedBeanDefinition beanDefinition, org.springframework.core.ResolvableType handlerBeanType, List<Annotation> annotations)
    • postProcess

      public Object postProcess(Object bean, String beanName, Method method, List<Annotation> annotations)
      Specified by:
      postProcess in interface MethodAnnotationPostProcessor<T extends Annotation>
    • extractAdviceChain

      protected List<org.aopalliance.aop.Advice> extractAdviceChain(String beanName, List<Annotation> annotations)
    • createEndpoint

      protected AbstractEndpoint createEndpoint(org.springframework.messaging.MessageHandler handler, Method method, List<Annotation> annotations)
    • doCreateEndpoint

      protected AbstractEndpoint doCreateEndpoint(org.springframework.messaging.MessageHandler handler, org.springframework.messaging.MessageChannel inputChannel, List<Annotation> annotations)
    • configurePollingEndpoint

      protected void configurePollingEndpoint(AbstractPollingEndpoint pollingEndpoint, Poller poller)
    • generateHandlerBeanName

      protected String generateHandlerBeanName(String originalBeanName, Method method)
    • generateHandlerBeanName

      protected String generateHandlerBeanName(String originalBeanName, org.springframework.core.annotation.MergedAnnotations mergedAnnotations)
    • generateHandlerBeanName

      protected String generateHandlerBeanName(String originalBeanName, org.springframework.core.annotation.MergedAnnotations mergedAnnotations, @Nullable String methodName)
    • setOutputChannelIfPresent

      protected static void setOutputChannelIfPresent(List<Annotation> annotations, AbstractMessageProducingHandler handler)
    • checkMessageHandlerAttributes

      protected void checkMessageHandlerAttributes(String handlerBeanName, List<Annotation> annotations)
    • resolveAttributeToBoolean

      protected boolean resolveAttributeToBoolean(String attribute)
    • buildLambdaMessageProcessor

      protected static org.springframework.beans.factory.config.BeanDefinition buildLambdaMessageProcessor(org.springframework.core.ResolvableType beanType, org.springframework.beans.factory.annotation.AnnotatedBeanDefinition beanDefinition)
    • createHandler

      protected abstract org.springframework.messaging.MessageHandler createHandler(Object bean, Method method, List<Annotation> annotations)
      Subclasses must implement this method to create the MessageHandler.
      Parameters:
      bean - The bean.
      method - The method.
      annotations - The messaging annotation (or meta-annotation hierarchy) on the method.
      Returns:
      The MessageHandler.