Class ReactivePulsarListenerEndpointAdapter<T>
java.lang.Object
org.springframework.pulsar.reactive.config.ReactivePulsarListenerEndpointAdapter<T>
- Type Parameters:
T
- Message payload type.
- All Implemented Interfaces:
ListenerEndpoint<ReactivePulsarMessageListenerContainer<T>>
,ReactivePulsarListenerEndpoint<T>
public class ReactivePulsarListenerEndpointAdapter<T>
extends Object
implements ReactivePulsarListenerEndpoint<T>
Adapter to avoid having to implement all methods.
- Author:
- Christophe Bornet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the autoStartup for this endpoint's container.Return the concurrency for this endpoint's container.getId()
Return the id of this endpoint.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
setupListenerContainer
(ReactivePulsarMessageListenerContainer<T> listenerContainer, MessageConverter messageConverter) Setup the specified message listener container with the model defined by this endpoint.
-
Constructor Details
-
ReactivePulsarListenerEndpointAdapter
public ReactivePulsarListenerEndpointAdapter()
-
-
Method Details
-
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:
-
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.
-
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.
-
getTopics
Description copied from interface:ListenerEndpoint
Return the topics for this endpoint's container.- Specified by:
getTopics
in interfaceListenerEndpoint<T>
- Returns:
- the topics.
-
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.
-
setupListenerContainer
public void setupListenerContainer(ReactivePulsarMessageListenerContainer<T> listenerContainer, 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
-
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.
-
getConcurrency
Description copied from interface:ListenerEndpoint
Return the concurrency for this endpoint's container.- Specified by:
getConcurrency
in interfaceListenerEndpoint<T>
- Returns:
- the concurrency.
-
isFluxListener
public boolean isFluxListener()- Specified by:
isFluxListener
in interfaceReactivePulsarListenerEndpoint<T>
-
getUseKeyOrderedProcessing
- Specified by:
getUseKeyOrderedProcessing
in interfaceReactivePulsarListenerEndpoint<T>
-