Class AbstractPulsarReaderEndpoint<K>
java.lang.Object
org.springframework.pulsar.config.AbstractPulsarReaderEndpoint<K>
- Type Parameters:
K- Message payload type.
- All Implemented Interfaces:
Aware, BeanFactoryAware, InitializingBean, PulsarReaderEndpoint<PulsarMessageReaderContainer>
- Direct Known Subclasses:
MethodPulsarReaderEndpoint
public abstract class AbstractPulsarReaderEndpoint<K>
extends Object
implements PulsarReaderEndpoint<PulsarMessageReaderContainer>, BeanFactoryAware, InitializingBean
Base implementation for
PulsarListenerEndpoint.- Author:
- Soby Chacko
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected abstract AbstractPulsarMessageToSpringMessageAdapter<K> createReaderListener(PulsarMessageReaderContainer container, @Nullable MessageConverter messageConverter) @Nullable Booleanprotected @Nullable BeanExpressionContextprotected @Nullable BeanFactoryprotected @Nullable BeanResolver@Nullable StringgetId()Return the id of this endpoint.protected @Nullable BeanExpressionResolverorg.apache.pulsar.common.schema.SchemaTypeReturn the schema type for this endpoint's container.@Nullable org.apache.pulsar.client.api.MessageIdReturn the topics for this endpoint's container.voidsetAutoStartup(@Nullable Boolean autoStartup) voidsetBeanFactory(BeanFactory beanFactory) voidvoidsetSchemaType(org.apache.pulsar.common.schema.SchemaType schemaType) voidsetStartMessageId(@Nullable org.apache.pulsar.client.api.MessageId startMessageId) voidsetSubscriptionName(String subscriptionName) voidvoidsetupListenerContainer(PulsarMessageReaderContainer listenerContainer, @Nullable MessageConverter messageConverter) Sets up the specified message listener container with the model defined by this endpoint.
-
Constructor Details
-
AbstractPulsarReaderEndpoint
public AbstractPulsarReaderEndpoint()
-
-
Method Details
-
setBeanFactory
- Specified by:
setBeanFactoryin interfaceBeanFactoryAware- Throws:
BeansException
-
getBeanFactory
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceInitializingBean
-
getResolver
-
getBeanExpressionContext
-
getBeanResolver
-
setSubscriptionName
-
setId
-
getId
Description copied from interface:PulsarReaderEndpointReturn the id of this endpoint.- Specified by:
getIdin interfacePulsarReaderEndpoint<K>- 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:PulsarReaderEndpointReturn the topics for this endpoint's container.- Specified by:
getTopicsin interfacePulsarReaderEndpoint<K>- Returns:
- the topics.
-
getAutoStartup
- Specified by:
getAutoStartupin interfacePulsarReaderEndpoint<K>
-
setAutoStartup
-
setupListenerContainer
public void setupListenerContainer(PulsarMessageReaderContainer listenerContainer, @Nullable MessageConverter messageConverter) Description copied from interface:PulsarReaderEndpointSets up 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 interfacePulsarReaderEndpoint<K>- Parameters:
listenerContainer- the listener container to configuremessageConverter- message converter used
-
createReaderListener
protected abstract AbstractPulsarMessageToSpringMessageAdapter<K> createReaderListener(PulsarMessageReaderContainer container, @Nullable MessageConverter messageConverter) -
getSchemaType
public org.apache.pulsar.common.schema.SchemaType getSchemaType()Description copied from interface:PulsarReaderEndpointReturn the schema type for this endpoint's container.- Specified by:
getSchemaTypein interfacePulsarReaderEndpoint<K>- Returns:
- the schema type.
-
setSchemaType
public void setSchemaType(org.apache.pulsar.common.schema.SchemaType schemaType) -
getStartMessageId
public @Nullable org.apache.pulsar.client.api.MessageId getStartMessageId()- Specified by:
getStartMessageIdin interfacePulsarReaderEndpoint<K>
-
setStartMessageId
public void setStartMessageId(@Nullable org.apache.pulsar.client.api.MessageId startMessageId)
-