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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ConfigurableListableBeanFactoryprotected final ConversionServiceprotected final BeanDefinitionRegistryprotected final Logprotected static final String -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected MessageProcessor<?>buildLambdaMessageProcessorForBeanMethod(Method method, Object target) protected voidcheckMessageHandlerAttributes(String handlerBeanName, List<Annotation> annotations) protected voidconfigurePollingEndpoint(AbstractPollingEndpoint pollingEndpoint, Poller[] pollers) protected AbstractEndpointcreateEndpoint(MessageHandler handler, Method method, 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 <H> HextractTypeIfPossible(Object targetObject, Class<H> expectedType) protected StringgenerateHandlerBeanName(String originalBeanName, Method method) protected DestinationResolver<MessageChannel>protected StringpostProcess(Object bean, String beanName, Method method, List<Annotation> annotations) protected booleanresolveAttributeToBoolean(String attribute) protected Objectprotected StringresolveTargetBeanName(Method method) protected voidsetOutputChannelIfPresent(List<Annotation> annotations, AbstractReplyProducingMessageHandler handler) booleanshouldCreateEndpoint(Method method, List<Annotation> annotations)
-
Field Details
-
SEND_TIMEOUT_ATTRIBUTE
- See Also:
-
logger
-
messageHandlerAttributes
-
beanFactory
-
definitionRegistry
-
conversionService
-
annotationType
-
-
Constructor Details
-
AbstractMethodAnnotationPostProcessor
-
-
Method Details
-
getChannelResolver
-
postProcess
public Object postProcess(Object bean, String beanName, Method method, List<Annotation> annotations) - Specified by:
postProcessin interfaceMethodAnnotationPostProcessor<T extends Annotation>
-
shouldCreateEndpoint
Description copied from interface:MethodAnnotationPostProcessor- Specified by:
shouldCreateEndpointin 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
booleanflag 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.
-