Class AbstractReactivePulsarListenerEndpoint<T>
java.lang.Object
org.springframework.pulsar.reactive.config.AbstractReactivePulsarListenerEndpoint<T>
- Type Parameters:
T- Message payload type.
- All Implemented Interfaces:
Aware,BeanFactoryAware,InitializingBean,ListenerEndpoint<ReactivePulsarMessageListenerContainer<T>>,ReactivePulsarListenerEndpoint<T>
- Direct Known Subclasses:
MethodReactivePulsarListenerEndpoint
public abstract class AbstractReactivePulsarListenerEndpoint<T>
extends Object
implements ReactivePulsarListenerEndpoint<T>, BeanFactoryAware, InitializingBean
Base implementation for
ReactivePulsarListenerEndpoint.- Author:
- Christophe Bornet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected abstract PulsarMessagingMessageListenerAdapter<T>createMessageHandler(ReactivePulsarMessageListenerContainer<T> container, MessageConverter messageConverter) Return the autoStartup for this endpoint's container.protected BeanExpressionContextprotected BeanFactoryprotected BeanResolverReturn the concurrency for this endpoint's container.getId()Return the id of this endpoint.protected BeanExpressionResolverorg.apache.pulsar.common.schema.SchemaTypeReturn the schema type for this endpoint's container.Return the subscription name for this endpoint's container.org.apache.pulsar.client.api.SubscriptionTypeReturn the subscription type for this endpoint's container.Return the topic pattern for this endpoint's container.Return the topics for this endpoint's container.booleanvoidsetAutoStartup(Boolean autoStartup) voidsetBeanFactory(BeanFactory beanFactory) voidsetConcurrency(Integer concurrency) Set the concurrency for this endpoint's container.voidsetFluxListener(boolean fluxListener) voidvoidsetSchemaType(org.apache.pulsar.common.schema.SchemaType schemaType) voidsetSubscriptionName(String subscriptionName) voidsetSubscriptionType(org.apache.pulsar.client.api.SubscriptionType subscriptionType) voidsetTopicPattern(String topicPattern) voidvoidsetupListenerContainer(ReactivePulsarMessageListenerContainer<T> listenerContainer, MessageConverter messageConverter) Setup the specified message listener container with the model defined by this endpoint.voidsetUseKeyOrderedProcessing(Boolean useKeyOrderedProcessing)
-
Constructor Details
-
AbstractReactivePulsarListenerEndpoint
public AbstractReactivePulsarListenerEndpoint()
-
-
Method Details
-
setBeanFactory
- Specified by:
setBeanFactoryin interfaceBeanFactoryAware- Throws:
BeansException
-
getBeanFactory
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceInitializingBean
-
getResolver
-
getBeanExpressionContext
-
getBeanResolver
-
setSubscriptionName
-
getSubscriptionName
Description copied from interface:ListenerEndpointReturn the subscription name for this endpoint's container.- Specified by:
getSubscriptionNamein interfaceListenerEndpoint<T>- Returns:
- the subscription name.
-
setId
-
getId
Description copied from interface:ListenerEndpointReturn the id of this endpoint.- Specified by:
getIdin interfaceListenerEndpoint<T>- Returns:
- the id of this endpoint. The id can be further qualified when the endpoint is resolved against its actual listener container.
- See Also:
-
setTopics
-
getTopics
Description copied from interface:ListenerEndpointReturn the topics for this endpoint's container.- Specified by:
getTopicsin interfaceListenerEndpoint<T>- Returns:
- the topics.
-
setTopicPattern
-
getTopicPattern
Description copied from interface:ListenerEndpointReturn the topic pattern for this endpoint's container.- Specified by:
getTopicPatternin interfaceListenerEndpoint<T>- Returns:
- the topic pattern.
-
getAutoStartup
Description copied from interface:ListenerEndpointReturn the autoStartup for this endpoint's container.- Specified by:
getAutoStartupin interfaceListenerEndpoint<T>- Returns:
- the autoStartup.
-
setAutoStartup
-
setupListenerContainer
public void setupListenerContainer(ReactivePulsarMessageListenerContainer<T> listenerContainer, @Nullable MessageConverter messageConverter) Description copied from interface:ListenerEndpointSetup the specified message listener container with the model defined by this endpoint.This endpoint must provide the requested missing option(s) of the specified container to make it usable. Usually, this is about setting the
queuesand themessageListenerto use but an implementation may override any default setting that was already set.- Specified by:
setupListenerContainerin interfaceListenerEndpoint<T>- Parameters:
listenerContainer- the listener container to configuremessageConverter- the message converter - can be null
-
createMessageHandler
protected abstract PulsarMessagingMessageListenerAdapter<T> createMessageHandler(ReactivePulsarMessageListenerContainer<T> container, @Nullable MessageConverter messageConverter) -
getFluxListener
-
setFluxListener
public void setFluxListener(boolean fluxListener) -
isFluxListener
public boolean isFluxListener()- Specified by:
isFluxListenerin interfaceReactivePulsarListenerEndpoint<T>
-
getSubscriptionType
public org.apache.pulsar.client.api.SubscriptionType getSubscriptionType()Description copied from interface:ListenerEndpointReturn the subscription type for this endpoint's container.- Specified by:
getSubscriptionTypein interfaceListenerEndpoint<T>- Returns:
- the subscription type.
-
setSubscriptionType
public void setSubscriptionType(org.apache.pulsar.client.api.SubscriptionType subscriptionType) -
getSchemaType
public org.apache.pulsar.common.schema.SchemaType getSchemaType()Description copied from interface:ListenerEndpointReturn the schema type for this endpoint's container.- Specified by:
getSchemaTypein interfaceListenerEndpoint<T>- Returns:
- the schema type.
-
setSchemaType
public void setSchemaType(org.apache.pulsar.common.schema.SchemaType schemaType) -
getConcurrency
Description copied from interface:ListenerEndpointReturn the concurrency for this endpoint's container.- Specified by:
getConcurrencyin interfaceListenerEndpoint<T>- Returns:
- the concurrency.
-
setConcurrency
Set the concurrency for this endpoint's container.- Parameters:
concurrency- the concurrency.
-
getUseKeyOrderedProcessing
- Specified by:
getUseKeyOrderedProcessingin interfaceReactivePulsarListenerEndpoint<T>
-
setUseKeyOrderedProcessing
-