Class ReactivePulsarListenerAnnotationBeanPostProcessor<V>
java.lang.Object
org.springframework.pulsar.annotation.AbstractPulsarAnnotationsBeanPostProcessor
org.springframework.pulsar.reactive.config.annotation.ReactivePulsarListenerAnnotationBeanPostProcessor<V>
- Type Parameters:
V- the payload type.
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.config.BeanPostProcessor,org.springframework.beans.factory.InitializingBean,org.springframework.beans.factory.SmartInitializingSingleton,org.springframework.context.ApplicationContextAware,org.springframework.core.Ordered
public class ReactivePulsarListenerAnnotationBeanPostProcessor<V>
extends org.springframework.pulsar.annotation.AbstractPulsarAnnotationsBeanPostProcessor
implements org.springframework.beans.factory.SmartInitializingSingleton
Bean post-processor that registers methods annotated with
ReactivePulsarListener to be invoked by a Pulsar message listener container
created under the covers by a ReactivePulsarListenerContainerFactory according
to the parameters of the annotation.
Annotated methods can use flexible arguments as defined by
ReactivePulsarListener.
This post-processor is automatically registered by the EnableReactivePulsar
annotation.
Auto-detect any PulsarListenerConfigurer 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 EnableReactivePulsar
Javadoc for complete usage details.
- See Also:
-
ReactivePulsarListenerEnableReactivePulsarPulsarListenerConfigurerPulsarListenerEndpointRegistrarReactivePulsarListenerEndpointRegistryReactivePulsarListenerEndpointMethodReactivePulsarListenerEndpoint
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.pulsar.annotation.AbstractPulsarAnnotationsBeanPostProcessor
org.springframework.pulsar.annotation.AbstractPulsarAnnotationsBeanPostProcessor.ListenerScope, org.springframework.pulsar.annotation.AbstractPulsarAnnotationsBeanPostProcessor.PulsarHandlerMethodFactoryAdapter -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe bean name of the defaultReactivePulsarListenerContainerFactory.Fields inherited from class org.springframework.pulsar.annotation.AbstractPulsarAnnotationsBeanPostProcessor
applicationContext, beanFactory, expressionContext, logger, messageHandlerMethodFactory, resolverFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidpostProcessAfterInitialization(Object bean, String beanName) postProcessBeforeInitialization(Object bean, String beanName) protected voidprocessListener(MethodReactivePulsarListenerEndpoint<?> endpoint, ReactivePulsarListener ReactivePulsarListener, Object bean, String beanName, String[] topics, String topicPattern) protected voidprocessReactivePulsarListener(ReactivePulsarListener reactivePulsarListener, Method method, Object bean, String beanName) voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) Methods inherited from class org.springframework.pulsar.annotation.AbstractPulsarAnnotationsBeanPostProcessor
afterPropertiesSet, assertBeanFactory, checkProxy, getOrder, loadProperty, noBeanFoundMessage, resolve, resolveAsString, resolveExpression, resolveExpressionAsBoolean, resolveExpressionAsInteger, resolveExpressionAsString, setBeanFactory
-
Field Details
-
DEFAULT_REACTIVE_PULSAR_LISTENER_CONTAINER_FACTORY_BEAN_NAME
The bean name of the defaultReactivePulsarListenerContainerFactory.- See Also:
-
-
Constructor Details
-
ReactivePulsarListenerAnnotationBeanPostProcessor
public ReactivePulsarListenerAnnotationBeanPostProcessor()
-
-
Method Details
-
afterSingletonsInstantiated
public void afterSingletonsInstantiated()- Specified by:
afterSingletonsInstantiatedin interfaceorg.springframework.beans.factory.SmartInitializingSingleton
-
postProcessBeforeInitialization
public Object postProcessBeforeInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException - Specified by:
postProcessBeforeInitializationin interfaceorg.springframework.beans.factory.config.BeanPostProcessor- Overrides:
postProcessBeforeInitializationin classorg.springframework.pulsar.annotation.AbstractPulsarAnnotationsBeanPostProcessor- Throws:
org.springframework.beans.BeansException
-
postProcessAfterInitialization
public Object postProcessAfterInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException - Specified by:
postProcessAfterInitializationin interfaceorg.springframework.beans.factory.config.BeanPostProcessor- Throws:
org.springframework.beans.BeansException
-
processReactivePulsarListener
protected void processReactivePulsarListener(ReactivePulsarListener reactivePulsarListener, Method method, Object bean, String beanName) -
processListener
protected void processListener(MethodReactivePulsarListenerEndpoint<?> endpoint, ReactivePulsarListener ReactivePulsarListener, Object bean, String beanName, String[] topics, String topicPattern) -
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Overrides:
setApplicationContextin classorg.springframework.pulsar.annotation.AbstractPulsarAnnotationsBeanPostProcessor- Throws:
org.springframework.beans.BeansException
-