public abstract class AbstractMethodAnnotationPostProcessor<T extends java.lang.annotation.Annotation> extends java.lang.Object implements MethodAnnotationPostProcessor<T>
Modifier and Type | Field and Description |
---|---|
protected java.lang.Class<T> |
annotationType |
protected org.springframework.beans.factory.config.ConfigurableListableBeanFactory |
beanFactory |
protected org.springframework.messaging.core.DestinationResolver<org.springframework.messaging.MessageChannel> |
channelResolver |
protected org.springframework.core.convert.ConversionService |
conversionService |
protected org.apache.commons.logging.Log |
logger |
protected java.util.List<java.lang.String> |
messageHandlerAttributes |
protected static java.lang.String |
SEND_TIMEOUT_ATTRIBUTE |
Constructor and Description |
---|
AbstractMethodAnnotationPostProcessor(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
beanAnnotationAware() |
protected void |
checkMessageHandlerAttributes(java.lang.String handlerBeanName,
java.util.List<java.lang.annotation.Annotation> annotations) |
protected void |
configurePollingEndpoint(AbstractPollingEndpoint pollingEndpoint,
java.util.List<java.lang.annotation.Annotation> annotations) |
protected AbstractEndpoint |
createEndpoint(org.springframework.messaging.MessageHandler handler,
java.lang.reflect.Method method,
java.util.List<java.lang.annotation.Annotation> annotations) |
protected abstract org.springframework.messaging.MessageHandler |
createHandler(java.lang.Object bean,
java.lang.reflect.Method method,
java.util.List<java.lang.annotation.Annotation> annotations)
Subclasses must implement this method to create the MessageHandler.
|
protected AbstractEndpoint |
doCreateEndpoint(org.springframework.messaging.MessageHandler handler,
org.springframework.messaging.MessageChannel inputChannel,
java.util.List<java.lang.annotation.Annotation> annotations) |
protected java.util.List<org.aopalliance.aop.Advice> |
extractAdviceChain(java.lang.String beanName,
java.util.List<java.lang.annotation.Annotation> annotations) |
protected <H> H |
extractTypeIfPossible(java.lang.Object targetObject,
java.lang.Class<H> expectedType) |
protected java.lang.String |
generateHandlerBeanName(java.lang.String originalBeanName,
java.lang.reflect.Method method) |
protected java.lang.String |
getInputChannelAttribute() |
java.lang.Object |
postProcess(java.lang.Object bean,
java.lang.String beanName,
java.lang.reflect.Method method,
java.util.List<java.lang.annotation.Annotation> annotations) |
protected java.lang.Object |
resolveTargetBeanFromMethodWithBeanAnnotation(java.lang.reflect.Method method) |
protected java.lang.String |
resolveTargetBeanName(java.lang.reflect.Method method) |
protected void |
setOutputChannelIfPresent(java.util.List<java.lang.annotation.Annotation> annotations,
AbstractReplyProducingMessageHandler handler) |
boolean |
shouldCreateEndpoint(java.lang.reflect.Method method,
java.util.List<java.lang.annotation.Annotation> annotations)
|
protected static final java.lang.String SEND_TIMEOUT_ATTRIBUTE
protected final org.apache.commons.logging.Log logger
protected final java.util.List<java.lang.String> messageHandlerAttributes
protected final org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory
protected final org.springframework.core.convert.ConversionService conversionService
protected final org.springframework.messaging.core.DestinationResolver<org.springframework.messaging.MessageChannel> channelResolver
protected final java.lang.Class<T extends java.lang.annotation.Annotation> annotationType
public AbstractMethodAnnotationPostProcessor(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
public java.lang.Object postProcess(java.lang.Object bean, java.lang.String beanName, java.lang.reflect.Method method, java.util.List<java.lang.annotation.Annotation> annotations)
postProcess
in interface MethodAnnotationPostProcessor<T extends java.lang.annotation.Annotation>
public boolean shouldCreateEndpoint(java.lang.reflect.Method method, java.util.List<java.lang.annotation.Annotation> annotations)
MethodAnnotationPostProcessor
shouldCreateEndpoint
in interface MethodAnnotationPostProcessor<T extends java.lang.annotation.Annotation>
method
- the method to check if it is eligible to create an Endpointannotations
- the List of annotations to processboolean
flag to determine whether or not to create an
AbstractEndpoint
protected java.lang.String getInputChannelAttribute()
protected boolean beanAnnotationAware()
protected java.util.List<org.aopalliance.aop.Advice> extractAdviceChain(java.lang.String beanName, java.util.List<java.lang.annotation.Annotation> annotations)
protected AbstractEndpoint createEndpoint(org.springframework.messaging.MessageHandler handler, java.lang.reflect.Method method, java.util.List<java.lang.annotation.Annotation> annotations)
protected AbstractEndpoint doCreateEndpoint(org.springframework.messaging.MessageHandler handler, org.springframework.messaging.MessageChannel inputChannel, java.util.List<java.lang.annotation.Annotation> annotations)
protected void configurePollingEndpoint(AbstractPollingEndpoint pollingEndpoint, java.util.List<java.lang.annotation.Annotation> annotations)
protected java.lang.String generateHandlerBeanName(java.lang.String originalBeanName, java.lang.reflect.Method method)
protected void setOutputChannelIfPresent(java.util.List<java.lang.annotation.Annotation> annotations, AbstractReplyProducingMessageHandler handler)
protected java.lang.Object resolveTargetBeanFromMethodWithBeanAnnotation(java.lang.reflect.Method method)
protected java.lang.String resolveTargetBeanName(java.lang.reflect.Method method)
protected <H> H extractTypeIfPossible(java.lang.Object targetObject, java.lang.Class<H> expectedType)
protected void checkMessageHandlerAttributes(java.lang.String handlerBeanName, java.util.List<java.lang.annotation.Annotation> annotations)
protected abstract org.springframework.messaging.MessageHandler createHandler(java.lang.Object bean, java.lang.reflect.Method method, java.util.List<java.lang.annotation.Annotation> annotations)
bean
- The bean.method
- The method.annotations
- The messaging annotation (or meta-annotation hierarchy) on the method.