Class AbstractPulsarReaderEndpoint<K>

java.lang.Object
org.springframework.pulsar.config.AbstractPulsarReaderEndpoint<K>
Type Parameters:
K - Message payload type.
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean, PulsarReaderEndpoint<PulsarMessageReaderContainer>
Direct Known Subclasses:
MethodPulsarReaderEndpoint

public abstract class AbstractPulsarReaderEndpoint<K> extends Object implements PulsarReaderEndpoint<PulsarMessageReaderContainer>, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean
Base implementation for PulsarListenerEndpoint.
  • Constructor Details

    • AbstractPulsarReaderEndpoint

      public AbstractPulsarReaderEndpoint()
  • Method Details

    • setBeanFactory

      public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException
      Specified by:
      setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
      Throws:
      org.springframework.beans.BeansException
    • getBeanFactory

      @Nullable protected org.springframework.beans.factory.BeanFactory getBeanFactory()
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • getResolver

      @Nullable protected org.springframework.beans.factory.config.BeanExpressionResolver getResolver()
    • getBeanExpressionContext

      @Nullable protected org.springframework.beans.factory.config.BeanExpressionContext getBeanExpressionContext()
    • getBeanResolver

      @Nullable protected org.springframework.expression.BeanResolver getBeanResolver()
    • setSubscriptionName

      public void setSubscriptionName(String subscriptionName)
    • setId

      public void setId(String id)
    • getId

      public String getId()
      Description copied from interface: PulsarReaderEndpoint
      Return the id of this endpoint.
      Specified by:
      getId in interface PulsarReaderEndpoint<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

      public void setTopics(String... topics)
    • getTopics

      public List<String> getTopics()
      Description copied from interface: PulsarReaderEndpoint
      Return the topics for this endpoint's container.
      Specified by:
      getTopics in interface PulsarReaderEndpoint<K>
      Returns:
      the topics.
    • getAutoStartup

      @Nullable public Boolean getAutoStartup()
      Specified by:
      getAutoStartup in interface PulsarReaderEndpoint<K>
    • setAutoStartup

      public void setAutoStartup(Boolean autoStartup)
    • setupListenerContainer

      public void setupListenerContainer(PulsarMessageReaderContainer listenerContainer, @Nullable MessageConverter messageConverter)
      Description copied from interface: PulsarReaderEndpoint
      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 the messageListener to use but an implementation may override any default setting that was already set.

      Specified by:
      setupListenerContainer in interface PulsarReaderEndpoint<K>
      Parameters:
      listenerContainer - the listener container to configure
      messageConverter - 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: PulsarReaderEndpoint
      Return the schema type for this endpoint's container.
      Specified by:
      getSchemaType in interface PulsarReaderEndpoint<K>
      Returns:
      the schema type.
    • setSchemaType

      public void setSchemaType(org.apache.pulsar.common.schema.SchemaType schemaType)
    • getStartMessageId

      public org.apache.pulsar.client.api.MessageId getStartMessageId()
      Specified by:
      getStartMessageId in interface PulsarReaderEndpoint<K>
    • setStartMessageId

      public void setStartMessageId(org.apache.pulsar.client.api.MessageId startMessageId)