public abstract class AbstractMethodAnnotationPostProcessor<T extends Annotation> extends Object implements MethodAnnotationPostProcessor<T>
Modifier and Type | Field and Description |
---|---|
protected 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 List<String> |
messageHandlerAttributes |
protected static 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(String handlerBeanName,
List<Annotation> annotations) |
protected void |
configurePollingEndpoint(AbstractPollingEndpoint pollingEndpoint,
List<Annotation> annotations) |
protected AbstractEndpoint |
createEndpoint(org.springframework.messaging.MessageHandler handler,
Method method,
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 <H> H |
extractTypeIfPossible(Object targetObject,
Class<H> expectedType) |
protected String |
generateHandlerBeanName(String originalBeanName,
Method method) |
protected String |
getInputChannelAttribute() |
Object |
postProcess(Object bean,
String beanName,
Method method,
List<Annotation> annotations) |
protected Object |
resolveTargetBeanFromMethodWithBeanAnnotation(Method method) |
protected String |
resolveTargetBeanName(Method method) |
protected void |
setOutputChannelIfPresent(List<Annotation> annotations,
AbstractReplyProducingMessageHandler handler) |
boolean |
shouldCreateEndpoint(Method method,
List<Annotation> annotations)
|
protected static final String SEND_TIMEOUT_ATTRIBUTE
protected final org.apache.commons.logging.Log logger
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 Class<T extends Annotation> annotationType
public AbstractMethodAnnotationPostProcessor(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
public Object postProcess(Object bean, String beanName, Method method, List<Annotation> annotations)
postProcess
in interface MethodAnnotationPostProcessor<T extends Annotation>
public boolean shouldCreateEndpoint(Method method, List<Annotation> annotations)
MethodAnnotationPostProcessor
shouldCreateEndpoint
in interface MethodAnnotationPostProcessor<T extends 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 String getInputChannelAttribute()
protected boolean beanAnnotationAware()
protected List<org.aopalliance.aop.Advice> extractAdviceChain(String beanName, List<Annotation> annotations)
protected AbstractEndpoint createEndpoint(org.springframework.messaging.MessageHandler handler, Method method, List<Annotation> annotations)
protected AbstractEndpoint doCreateEndpoint(org.springframework.messaging.MessageHandler handler, org.springframework.messaging.MessageChannel inputChannel, List<Annotation> annotations)
protected void configurePollingEndpoint(AbstractPollingEndpoint pollingEndpoint, List<Annotation> annotations)
protected String generateHandlerBeanName(String originalBeanName, Method method)
protected void setOutputChannelIfPresent(List<Annotation> annotations, AbstractReplyProducingMessageHandler handler)
protected Object resolveTargetBeanFromMethodWithBeanAnnotation(Method method)
protected <H> H extractTypeIfPossible(Object targetObject, Class<H> expectedType)
protected void checkMessageHandlerAttributes(String handlerBeanName, List<Annotation> annotations)
protected abstract org.springframework.messaging.MessageHandler createHandler(Object bean, Method method, List<Annotation> annotations)
bean
- The bean.method
- The method.annotations
- The messaging annotation (or meta-annotation hierarchy) on the method.