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.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static final record
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
protected final org.apache.commons.logging.Log
protected static final String
Fields inherited from interface org.springframework.integration.config.annotation.MethodAnnotationPostProcessor
INPUT_CHANNEL_ATTRIBUTE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static org.springframework.beans.factory.config.BeanDefinition
buildLambdaMessageProcessor
(org.springframework.core.ResolvableType beanType, org.springframework.beans.factory.annotation.AnnotatedBeanDefinition beanDefinition) protected void
checkMessageHandlerAttributes
(String handlerBeanName, List<Annotation> annotations) protected void
configurePollingEndpoint
(AbstractPollingEndpoint pollingEndpoint, Poller poller) protected AbstractEndpoint
createEndpoint
(org.springframework.messaging.MessageHandler handler, Method method, List<Annotation> annotations) 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) protected abstract org.springframework.messaging.MessageHandler
createHandler
(Object bean, Method method, List<Annotation> annotations) Subclasses must implement this method to create the MessageHandler.protected AbstractEndpoint
doCreateEndpoint
(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 String
generateHandlerBeanName
(String originalBeanName, Method method) protected String
generateHandlerBeanName
(String originalBeanName, org.springframework.core.annotation.MergedAnnotations mergedAnnotations) protected String
generateHandlerBeanName
(String originalBeanName, org.springframework.core.annotation.MergedAnnotations mergedAnnotations, String methodName) protected org.springframework.beans.factory.config.ConfigurableListableBeanFactory
protected org.springframework.messaging.core.DestinationResolver<org.springframework.messaging.MessageChannel>
protected org.springframework.core.convert.ConversionService
protected org.springframework.beans.factory.support.BeanDefinitionRegistry
postProcess
(Object bean, String beanName, Method method, List<Annotation> annotations) void
processBeanDefinition
(String beanName, org.springframework.beans.factory.annotation.AnnotatedBeanDefinition beanDefinition, List<Annotation> annotations) protected boolean
resolveAttributeToBoolean
(String attribute) 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) void
setBeanFactory
(org.springframework.beans.factory.BeanFactory beanFactory) protected static void
setOutputChannelIfPresent
(List<Annotation> annotations, AbstractMessageProducingHandler handler) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
setBeanFactory
in 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:
processBeanDefinition
in 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:
postProcess
in 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.
-