Class ReactivePulsarListenerAnnotationBeanPostProcessor<V>
java.lang.Object
org.springframework.pulsar.reactive.config.annotation.ReactivePulsarListenerAnnotationBeanPostProcessor<V>
- Type Parameters:
V
- the payload type.
- All Implemented Interfaces:
Aware
,BeanPostProcessor
,InitializingBean
,SmartInitializingSingleton
,ApplicationContextAware
,Ordered
public class ReactivePulsarListenerAnnotationBeanPostProcessor<V>
extends Object
implements BeanPostProcessor, Ordered, ApplicationContextAware, InitializingBean, 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.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The bean name of the defaultReactivePulsarListenerContainerFactory
.Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
protected void
int
getOrder()
protected String
noBeanFoundMessage
(Object target, String listenerBeanName, String requestedBeanName, Class<?> expectedClass) postProcessAfterInitialization
(Object bean, String beanName) postProcessBeforeInitialization
(Object bean, String beanName) protected void
processListener
(MethodReactivePulsarListenerEndpoint<?> endpoint, ReactivePulsarListener ReactivePulsarListener, Object bean, String beanName, String[] topics, String topicPattern) protected void
processReactivePulsarListener
(ReactivePulsarListener reactivePulsarListener, Method method, Object bean, String beanName) void
setApplicationContext
(ApplicationContext applicationContext) void
setBeanFactory
(BeanFactory beanFactory) void
setCharset
(Charset charset) void
setDefaultContainerFactoryBeanName
(String containerFactoryBeanName) void
setEndpointRegistry
(ReactivePulsarListenerEndpointRegistry<?> endpointRegistry)
-
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
-
getOrder
public int getOrder() -
setEndpointRegistry
-
setDefaultContainerFactoryBeanName
-
setCharset
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceInitializingBean
-
afterSingletonsInstantiated
public void afterSingletonsInstantiated()- Specified by:
afterSingletonsInstantiated
in interfaceSmartInitializingSingleton
-
postProcessBeforeInitialization
- Specified by:
postProcessBeforeInitialization
in interfaceBeanPostProcessor
- Throws:
BeansException
-
postProcessAfterInitialization
- Specified by:
postProcessAfterInitialization
in interfaceBeanPostProcessor
- Throws:
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) -
assertBeanFactory
protected void assertBeanFactory() -
noBeanFoundMessage
-
setApplicationContext
- Specified by:
setApplicationContext
in interfaceApplicationContextAware
- Throws:
BeansException
-
setBeanFactory
-