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:
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>
Base class for Method-level annotation post-processors.
- Author:
- Mark Fisher, Artem Bilan, Gary Russell, Chris Bono
-
Field Summary
Modifier and TypeFieldDescriptionprotected final ConfigurableListableBeanFactory
protected final DestinationResolver<MessageChannel>
protected final ConversionService
protected final BeanDefinitionRegistry
protected final Log
protected static final String
-
Constructor Summary
ConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
protected MessageProcessor<?>
buildLambdaMessageProcessorForBeanMethod
(Method method, Object target) protected void
checkMessageHandlerAttributes
(String handlerBeanName, List<Annotation> annotations) protected void
configurePollingEndpoint
(AbstractPollingEndpoint pollingEndpoint, Poller poller) protected AbstractEndpoint
createEndpoint
(MessageHandler handler, Method method, List<Annotation> annotations) protected abstract MessageHandler
createHandler
(Object bean, Method method, List<Annotation> annotations) Subclasses must implement this method to create the MessageHandler.protected AbstractEndpoint
doCreateEndpoint
(MessageHandler handler, MessageChannel inputChannel, List<Annotation> annotations) extractAdviceChain
(String beanName, List<Annotation> annotations) protected <H> H
extractTypeIfPossible
(Object targetObject, Class<H> expectedType) protected String
generateHandlerBeanName
(String originalBeanName, Method method) protected String
postProcess
(Object bean, String beanName, Method method, List<Annotation> annotations) protected boolean
resolveAttributeToBoolean
(String attribute) protected Object
protected String
resolveTargetBeanName
(Method method) protected void
setOutputChannelIfPresent
(List<Annotation> annotations, AbstractReplyProducingMessageHandler handler) boolean
shouldCreateEndpoint
(Method method, List<Annotation> annotations)
-
Field Details
-
SEND_TIMEOUT_ATTRIBUTE
- See Also:
-
logger
-
messageHandlerAttributes
-
beanFactory
-
definitionRegistry
-
conversionService
-
channelResolver
-
annotationType
-
-
Constructor Details
-
AbstractMethodAnnotationPostProcessor
-
-
Method Details
-
postProcess
public Object postProcess(Object bean, String beanName, Method method, List<Annotation> annotations) - Specified by:
postProcess
in interfaceMethodAnnotationPostProcessor<T extends Annotation>
-
shouldCreateEndpoint
Description copied from interface:MethodAnnotationPostProcessor
- Specified by:
shouldCreateEndpoint
in interfaceMethodAnnotationPostProcessor<T extends Annotation>
- Parameters:
method
- the method to check if it is eligible to create an Endpointannotations
- the List of annotations to process- Returns:
- the
boolean
flag to determine whether to create anAbstractEndpoint
-
getInputChannelAttribute
-
beanAnnotationAware
protected boolean beanAnnotationAware() -
extractAdviceChain
-
createEndpoint
protected AbstractEndpoint createEndpoint(MessageHandler handler, Method method, List<Annotation> annotations) -
doCreateEndpoint
protected AbstractEndpoint doCreateEndpoint(MessageHandler handler, MessageChannel inputChannel, List<Annotation> annotations) -
configurePollingEndpoint
-
generateHandlerBeanName
-
setOutputChannelIfPresent
protected void setOutputChannelIfPresent(List<Annotation> annotations, AbstractReplyProducingMessageHandler handler) -
resolveTargetBeanFromMethodWithBeanAnnotation
-
resolveTargetBeanName
-
extractTypeIfPossible
-
checkMessageHandlerAttributes
-
resolveAttributeToBoolean
-
buildLambdaMessageProcessorForBeanMethod
@Nullable protected MessageProcessor<?> buildLambdaMessageProcessorForBeanMethod(Method method, Object target) -
createHandler
protected 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.
-