Class AbstractMethodAnnotationPostProcessor<T extends Annotation>
java.lang.Object
org.springframework.integration.config.annotation.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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected final org.apache.commons.logging.Logprotected static final StringFields inherited from interface org.springframework.integration.config.annotation.MethodAnnotationPostProcessor
INPUT_CHANNEL_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static org.springframework.beans.factory.config.BeanDefinitionbuildLambdaMessageProcessor(org.springframework.core.ResolvableType beanType, org.springframework.beans.factory.annotation.AnnotatedBeanDefinition beanDefinition) protected voidcheckMessageHandlerAttributes(String handlerBeanName, List<Annotation> annotations) protected voidconfigurePollingEndpoint(AbstractPollingEndpoint pollingEndpoint, Poller poller) protected AbstractEndpointcreateEndpoint(org.springframework.messaging.MessageHandler handler, Method method, List<Annotation> annotations) protected org.springframework.beans.factory.config.BeanDefinitioncreateEndpointBeanDefinition(org.springframework.beans.factory.parsing.ComponentDefinition handlerBeanDefinition, org.springframework.beans.factory.parsing.ComponentDefinition beanDefinition, List<Annotation> annotations) protected abstract org.springframework.messaging.MessageHandlercreateHandler(Object bean, Method method, List<Annotation> annotations) Subclasses must implement this method to create the MessageHandler.protected AbstractEndpointdoCreateEndpoint(org.springframework.messaging.MessageHandler handler, org.springframework.messaging.MessageChannel inputChannel, List<Annotation> annotations) protected List<org.aopalliance.aop.Advice>extractAdviceChain(String beanName, List<Annotation> annotations) protected StringgenerateHandlerBeanName(String originalBeanName, Method method) protected StringgenerateHandlerBeanName(String originalBeanName, org.springframework.core.annotation.MergedAnnotations mergedAnnotations) protected StringgenerateHandlerBeanName(String originalBeanName, org.springframework.core.annotation.MergedAnnotations mergedAnnotations, String methodName) protected org.springframework.beans.factory.config.ConfigurableListableBeanFactoryprotected org.springframework.messaging.core.DestinationResolver<org.springframework.messaging.MessageChannel>protected org.springframework.core.convert.ConversionServiceprotected org.springframework.beans.factory.support.BeanDefinitionRegistrypostProcess(Object bean, String beanName, Method method, List<Annotation> annotations) voidprocessBeanDefinition(String beanName, org.springframework.beans.factory.annotation.AnnotatedBeanDefinition beanDefinition, List<Annotation> annotations) protected booleanresolveAttributeToBoolean(String attribute) protected org.springframework.beans.factory.config.BeanDefinitionresolveHandlerBeanDefinition(String beanName, org.springframework.beans.factory.annotation.AnnotatedBeanDefinition beanDefinition, org.springframework.core.ResolvableType handlerBeanType, List<Annotation> annotations) voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) protected static voidsetOutputChannelIfPresent(List<Annotation> annotations, AbstractMessageProducingHandler handler) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.integration.config.annotation.MethodAnnotationPostProcessor
beanAnnotationAware, getInputChannelAttribute, shouldCreateEndpoint, shouldCreateEndpoint, supportsPojoMethod
-
Field Details
-
logger
protected final org.apache.commons.logging.Log logger -
ADVICE_CHAIN_ATTRIBUTE
- See Also:
-
SEND_TIMEOUT_ATTRIBUTE
- See Also:
-
messageHandlerAttributes
-
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:
setBeanFactoryin interfaceorg.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:
processBeanDefinitionin interfaceMethodAnnotationPostProcessor<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:
postProcessin interfaceMethodAnnotationPostProcessor<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
-
generateHandlerBeanName
-
generateHandlerBeanName
-
generateHandlerBeanName
-
setOutputChannelIfPresent
protected static void setOutputChannelIfPresent(List<Annotation> annotations, AbstractMessageProducingHandler handler) -
checkMessageHandlerAttributes
-
resolveAttributeToBoolean
-
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.
-