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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
protected abstract PulsarMessagingMessageListenerAdapter<T>
createMessageHandler
(ReactivePulsarMessageListenerContainer<T> container, MessageConverter messageConverter) Return the autoStartup for this endpoint's container.protected BeanExpressionContext
protected BeanFactory
protected BeanResolver
Return the concurrency for this endpoint's container.getId()
Return the id of this endpoint.protected BeanExpressionResolver
org.apache.pulsar.common.schema.SchemaType
Return the schema type for this endpoint's container.Return the subscription name for this endpoint's container.org.apache.pulsar.client.api.SubscriptionType
Return 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.boolean
void
setAutoStartup
(Boolean autoStartup) void
setBeanFactory
(BeanFactory beanFactory) void
setConcurrency
(Integer concurrency) Set the concurrency for this endpoint's container.void
setFluxListener
(boolean fluxListener) void
void
setSchemaType
(org.apache.pulsar.common.schema.SchemaType schemaType) void
setSubscriptionName
(String subscriptionName) void
setSubscriptionType
(org.apache.pulsar.client.api.SubscriptionType subscriptionType) void
setTopicPattern
(String topicPattern) void
void
setupListenerContainer
(ReactivePulsarMessageListenerContainer<T> listenerContainer, MessageConverter messageConverter) Setup the specified message listener container with the model defined by this endpoint.void
setUseKeyOrderedProcessing
(Boolean useKeyOrderedProcessing)
-
Constructor Details
-
AbstractReactivePulsarListenerEndpoint
public AbstractReactivePulsarListenerEndpoint()
-
-
Method Details
-
setBeanFactory
- Specified by:
setBeanFactory
in interfaceBeanFactoryAware
- Throws:
BeansException
-
getBeanFactory
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceInitializingBean
-
getResolver
-
getBeanExpressionContext
-
getBeanResolver
-
setSubscriptionName
-
getSubscriptionName
Description copied from interface:ListenerEndpoint
Return the subscription name for this endpoint's container.- Specified by:
getSubscriptionName
in interfaceListenerEndpoint<T>
- Returns:
- the subscription name.
-
setId
-
getId
Description copied from interface:ListenerEndpoint
Return the id of this endpoint.- Specified by:
getId
in 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:ListenerEndpoint
Return the topics for this endpoint's container.- Specified by:
getTopics
in interfaceListenerEndpoint<T>
- Returns:
- the topics.
-
setTopicPattern
-
getTopicPattern
Description copied from interface:ListenerEndpoint
Return the topic pattern for this endpoint's container.- Specified by:
getTopicPattern
in interfaceListenerEndpoint<T>
- Returns:
- the topic pattern.
-
getAutoStartup
Description copied from interface:ListenerEndpoint
Return the autoStartup for this endpoint's container.- Specified by:
getAutoStartup
in interfaceListenerEndpoint<T>
- Returns:
- the autoStartup.
-
setAutoStartup
-
setupListenerContainer
public void setupListenerContainer(ReactivePulsarMessageListenerContainer<T> listenerContainer, @Nullable MessageConverter messageConverter) Description copied from interface:ListenerEndpoint
Setup 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
queues
and themessageListener
to use but an implementation may override any default setting that was already set.- Specified by:
setupListenerContainer
in 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:
isFluxListener
in interfaceReactivePulsarListenerEndpoint<T>
-
getSubscriptionType
public org.apache.pulsar.client.api.SubscriptionType getSubscriptionType()Description copied from interface:ListenerEndpoint
Return the subscription type for this endpoint's container.- Specified by:
getSubscriptionType
in 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:ListenerEndpoint
Return the schema type for this endpoint's container.- Specified by:
getSchemaType
in interfaceListenerEndpoint<T>
- Returns:
- the schema type.
-
setSchemaType
public void setSchemaType(org.apache.pulsar.common.schema.SchemaType schemaType) -
getConcurrency
Description copied from interface:ListenerEndpoint
Return the concurrency for this endpoint's container.- Specified by:
getConcurrency
in interfaceListenerEndpoint<T>
- Returns:
- the concurrency.
-
setConcurrency
Set the concurrency for this endpoint's container.- Parameters:
concurrency
- the concurrency.
-
getUseKeyOrderedProcessing
- Specified by:
getUseKeyOrderedProcessing
in interfaceReactivePulsarListenerEndpoint<T>
-
setUseKeyOrderedProcessing
-