Package io.awspring.cloud.sqs.config
Class AbstractEndpoint
java.lang.Object
io.awspring.cloud.sqs.config.AbstractEndpoint
- All Implemented Interfaces:
Endpoint
,HandlerMethodEndpoint
- Direct Known Subclasses:
SqsEndpoint
Base class for implementing a
HandlerMethodEndpoint
.- Since:
- 3.0
- Author:
- Tomaz Fernandes
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractEndpoint
(Collection<String> queueNames, String listenerContainerFactoryName, String id) -
Method Summary
Modifier and TypeMethodDescriptionvoid
configureListenerMode
(Consumer<ListenerMode> consumer) Allows configuring theListenerMode
for this endpoint.protected <T> AsyncMessageListener<T>
createAsyncMessageListenerInstance
(InvocableHandlerMethod handlerMethod) protected <T> MessageListener<T>
createMessageListenerInstance
(InvocableHandlerMethod handlerMethod) getId()
An optional id for this endpoint.The name of the factory bean that will process this endpoint.The logical names for this endpoint.void
Set the bean instance to be used when handling a message for this endpoint.void
setHandlerMethodFactory
(MessageHandlerMethodFactory handlerMethodFactory) Set theMessageHandlerMethodFactory
to be used for handling messages in this endpoint.void
Set the method to be used when handling a message for this endpoint.<T> void
setupContainer
(MessageListenerContainer<T> container) Configure the provided container for this endpoint.
-
Constructor Details
-
AbstractEndpoint
protected AbstractEndpoint(Collection<String> queueNames, @Nullable String listenerContainerFactoryName, String id)
-
-
Method Details
-
getLogicalNames
Description copied from interface:Endpoint
The logical names for this endpoint.- Specified by:
getLogicalNames
in interfaceEndpoint
- Returns:
- the logical names.
-
getListenerContainerFactoryName
Description copied from interface:Endpoint
The name of the factory bean that will process this endpoint.- Specified by:
getListenerContainerFactoryName
in interfaceEndpoint
- Returns:
- the factory bean name.
-
getId
Description copied from interface:Endpoint
An optional id for this endpoint. -
setBean
Set the bean instance to be used when handling a message for this endpoint.- Specified by:
setBean
in interfaceHandlerMethodEndpoint
- Parameters:
bean
- the bean instance.
-
setMethod
Set the method to be used when handling a message for this endpoint.- Specified by:
setMethod
in interfaceHandlerMethodEndpoint
- Parameters:
method
- the method.
-
setHandlerMethodFactory
Set theMessageHandlerMethodFactory
to be used for handling messages in this endpoint.- Specified by:
setHandlerMethodFactory
in interfaceHandlerMethodEndpoint
- Parameters:
handlerMethodFactory
- the factory.
-
configureListenerMode
Description copied from interface:HandlerMethodEndpoint
Allows configuring theListenerMode
for this endpoint.- Specified by:
configureListenerMode
in interfaceHandlerMethodEndpoint
- Parameters:
consumer
- a consumer for the strategy used by this endpoint.
-
setupContainer
Configure the provided container for this endpoint.- Specified by:
setupContainer
in interfaceEndpoint
- Parameters:
container
- the container to be configured.
-
createMessageListenerInstance
protected <T> MessageListener<T> createMessageListenerInstance(InvocableHandlerMethod handlerMethod) -
createAsyncMessageListenerInstance
protected <T> AsyncMessageListener<T> createAsyncMessageListenerInstance(InvocableHandlerMethod handlerMethod)
-