Class AbstractMethodAnnotationPostProcessor<T extends Annotation>
java.lang.Object
org.springframework.integration.config.AbstractMethodAnnotationPostProcessor<T>
- Type Parameters:
- T- the target annotation type.
- All Implemented Interfaces:
- Aware,- 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>, BeanFactoryAware
Base class for Method-level annotation post-processors.
- Author:
- Mark Fisher, Artem Bilan, Gary Russell, Chris Bono, Ngoc Nhan
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected static final record
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected static final Stringprotected final Logprotected static final StringFields inherited from interface org.springframework.integration.config.annotation.MethodAnnotationPostProcessorINPUT_CHANNEL_ATTRIBUTE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected static BeanDefinitionbuildLambdaMessageProcessor(ResolvableType beanType, AnnotatedBeanDefinition beanDefinition) protected voidcheckMessageHandlerAttributes(String handlerBeanName, List<Annotation> annotations) protected voidconfigurePollingEndpoint(AbstractPollingEndpoint pollingEndpoint, Poller poller) protected AbstractEndpointcreateEndpoint(MessageHandler handler, Method method, List<Annotation> annotations) protected BeanDefinitioncreateEndpointBeanDefinition(ComponentDefinition handlerBeanDefinition, ComponentDefinition beanDefinition, List<Annotation> annotations) protected abstract MessageHandlercreateHandler(Object bean, Method method, List<Annotation> annotations) Subclasses must implement this method to create the MessageHandler.protected AbstractEndpointdoCreateEndpoint(MessageHandler handler, MessageChannel inputChannel, List<Annotation> annotations) extractAdviceChain(String beanName, List<Annotation> annotations) protected StringgenerateHandlerBeanName(String originalBeanName, Method method) protected StringgenerateHandlerBeanName(String originalBeanName, MergedAnnotations mergedAnnotations) protected StringgenerateHandlerBeanName(String originalBeanName, MergedAnnotations mergedAnnotations, String methodName) protected ConfigurableListableBeanFactoryprotected DestinationResolver<MessageChannel> protected ConversionServiceprotected BeanDefinitionRegistrypostProcess(Object bean, String beanName, Method method, List<Annotation> annotations) voidprocessBeanDefinition(String beanName, AnnotatedBeanDefinition beanDefinition, List<Annotation> annotations) protected booleanresolveAttributeToBoolean(String attribute) protected BeanDefinitionresolveHandlerBeanDefinition(String beanName, AnnotatedBeanDefinition beanDefinition, ResolvableType handlerBeanType, List<Annotation> annotations) voidsetBeanFactory(BeanFactory beanFactory) protected static voidsetOutputChannelIfPresent(List<Annotation> annotations, AbstractMessageProducingHandler handler) Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.integration.config.annotation.MethodAnnotationPostProcessorbeanAnnotationAware, getInputChannelAttribute, shouldCreateEndpoint, shouldCreateEndpoint, supportsPojoMethod
- 
Field Details- 
logger
- 
ADVICE_CHAIN_ATTRIBUTE- See Also:
 
- 
SEND_TIMEOUT_ATTRIBUTE- See Also:
 
- 
messageHandlerAttributes
- 
annotationType
 
- 
- 
Constructor Details- 
AbstractMethodAnnotationPostProcessorpublic AbstractMethodAnnotationPostProcessor()
 
- 
- 
Method Details- 
setBeanFactory- Specified by:
- setBeanFactoryin interface- BeanFactoryAware
- Throws:
- BeansException
 
- 
getBeanFactory
- 
getDefinitionRegistry
- 
getConversionService
- 
getChannelResolver
- 
processBeanDefinitionpublic void processBeanDefinition(String beanName, AnnotatedBeanDefinition beanDefinition, List<Annotation> annotations) - Specified by:
- processBeanDefinitionin interface- MethodAnnotationPostProcessor<T extends Annotation>
 
- 
createEndpointBeanDefinitionprotected BeanDefinition createEndpointBeanDefinition(ComponentDefinition handlerBeanDefinition, ComponentDefinition beanDefinition, List<Annotation> annotations) 
- 
resolveHandlerBeanDefinition@Nullable protected BeanDefinition resolveHandlerBeanDefinition(String beanName, AnnotatedBeanDefinition beanDefinition, ResolvableType handlerBeanType, List<Annotation> annotations) 
- 
postProcesspublic Object postProcess(Object bean, String beanName, Method method, List<Annotation> annotations) - Specified by:
- postProcessin interface- MethodAnnotationPostProcessor<T extends Annotation>
 
- 
extractAdviceChain
- 
createEndpointprotected AbstractEndpoint createEndpoint(MessageHandler handler, Method method, List<Annotation> annotations) 
- 
doCreateEndpointprotected AbstractEndpoint doCreateEndpoint(MessageHandler handler, MessageChannel inputChannel, List<Annotation> annotations) 
- 
configurePollingEndpoint
- 
generateHandlerBeanName
- 
generateHandlerBeanNameprotected String generateHandlerBeanName(String originalBeanName, MergedAnnotations mergedAnnotations) 
- 
generateHandlerBeanNameprotected String generateHandlerBeanName(String originalBeanName, MergedAnnotations mergedAnnotations, @Nullable String methodName) 
- 
setOutputChannelIfPresentprotected static void setOutputChannelIfPresent(List<Annotation> annotations, AbstractMessageProducingHandler handler) 
- 
checkMessageHandlerAttributes
- 
resolveAttributeToBoolean
- 
buildLambdaMessageProcessorprotected static BeanDefinition buildLambdaMessageProcessor(ResolvableType beanType, AnnotatedBeanDefinition beanDefinition) 
- 
createHandlerprotected abstract 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.
 
 
-