public class AzureListenerAnnotationBeanPostProcessor extends Object implements org.springframework.beans.factory.support.MergedBeanDefinitionPostProcessor, org.springframework.core.Ordered, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.SmartInitializingSingleton
AzureMessageListener
to be invoked by a Azure message listener container created under the cover
by a ListenerContainerFactory
according to the attributes of the annotation.
Annotated methods can use flexible arguments as defined by AzureMessageListener.
This post-processor is automatically registered by the EnableAzureMessaging annotation.
Autodetects any AzureListenerConfigurer instances in the container,
allowing for customization of the registry to be used, the default container
factory or for fine-grained control over endpoints registration. See the
EnableAzureMessaging javadocs for complete usage details.
AzureMessageListener,
EnableAzureMessaging,
AzureListenerConfigurer,
AzureListenerEndpointRegistrar,
AzureListenerEndpointRegistry,
MethodAzureListenerEndpoint| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_AZURE_LISTENER_CONTAINER_FACTORY_BEAN_NAME
The bean name of the default
ListenerContainerFactory. |
static String |
DEFAULT_AZURE_LISTENER_ENDPOINT_REGISTRY_BEAN_NAME |
| Constructor and Description |
|---|
AzureListenerAnnotationBeanPostProcessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterSingletonsInstantiated() |
protected MethodAzureListenerEndpoint |
createMethodAzureListenerEndpoint()
Instantiate an empty
MethodAzureListenerEndpoint for further
configuration with provided parameters in processAzureListener(com.microsoft.azure.spring.messaging.annotation.AzureMessageListener, java.lang.reflect.Method, java.lang.Object). |
int |
getOrder() |
Object |
postProcessAfterInitialization(Object bean,
String beanName) |
Object |
postProcessBeforeInitialization(Object bean,
String beanName) |
void |
postProcessMergedBeanDefinition(org.springframework.beans.factory.support.RootBeanDefinition beanDefinition,
Class<?> beanType,
String beanName) |
protected void |
processAzureListener(AzureMessageListener azureMessageListener,
Method mostSpecificMethod,
Object bean)
Process the given
AzureMessageListener annotation on the given method,
registering a corresponding endpoint for the given bean instance. |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
Making a
BeanFactory available is optional; if not set,
AzureListenerConfigurer beans won't get autodetected and an |
void |
setContainerFactoryBeanName(String containerFactoryBeanName) |
public static final String DEFAULT_AZURE_LISTENER_CONTAINER_FACTORY_BEAN_NAME
ListenerContainerFactory.public static final String DEFAULT_AZURE_LISTENER_ENDPOINT_REGISTRY_BEAN_NAME
public AzureListenerAnnotationBeanPostProcessor()
public void setContainerFactoryBeanName(String containerFactoryBeanName)
public int getOrder()
getOrder in interface org.springframework.core.Orderedpublic void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
BeanFactory available is optional; if not set,
AzureListenerConfigurer beans won't get autodetected and ansetBeanFactory in interface org.springframework.beans.factory.BeanFactoryAwarepublic void afterSingletonsInstantiated()
afterSingletonsInstantiated in interface org.springframework.beans.factory.SmartInitializingSingletonpublic void postProcessMergedBeanDefinition(org.springframework.beans.factory.support.RootBeanDefinition beanDefinition,
Class<?> beanType,
String beanName)
postProcessMergedBeanDefinition in interface org.springframework.beans.factory.support.MergedBeanDefinitionPostProcessorpublic Object postProcessBeforeInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
postProcessBeforeInitialization in interface org.springframework.beans.factory.config.BeanPostProcessororg.springframework.beans.BeansExceptionpublic Object postProcessAfterInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
postProcessAfterInitialization in interface org.springframework.beans.factory.config.BeanPostProcessororg.springframework.beans.BeansExceptionprotected void processAzureListener(AzureMessageListener azureMessageListener, Method mostSpecificMethod, Object bean)
AzureMessageListener annotation on the given method,
registering a corresponding endpoint for the given bean instance.azureMessageListener - the annotation to processmostSpecificMethod - the annotated methodbean - the instance to invoke the method oncreateMethodAzureListenerEndpoint(),
AzureListenerEndpointRegistrar.registerEndpoint(com.microsoft.azure.spring.messaging.endpoint.AzureListenerEndpoint, com.microsoft.azure.spring.messaging.container.ListenerContainerFactory<?>)protected MethodAzureListenerEndpoint createMethodAzureListenerEndpoint()
MethodAzureListenerEndpoint for further
configuration with provided parameters in processAzureListener(com.microsoft.azure.spring.messaging.annotation.AzureMessageListener, java.lang.reflect.Method, java.lang.Object).MethodAzureListenerEndpoint or subclass thereofCopyright © 2020 Microsoft. All rights reserved.