Class AbstractMethodInvokingListenerAdapter<T>
java.lang.Object
io.awspring.cloud.sqs.listener.adapter.AbstractMethodInvokingListenerAdapter<T>
- Direct Known Subclasses:
AsyncMessagingMessageListenerAdapter,MessagingMessageListenerAdapter
Base class for invoking an
InvocableHandlerMethod.
Also handles wrapping the failed messages into a ListenerExecutionFailedException.- Since:
- 3.0
- Author:
- Tomaz Fernandes
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractMethodInvokingListenerAdapter(InvocableHandlerMethod handlerMethod) Create an instance with the providedInvocableHandlerMethod. -
Method Summary
Modifier and TypeMethodDescriptionprotected ListenerExecutionFailedExceptioncreateListenerException(Collection<Message<T>> messages, Throwable t) protected ListenerExecutionFailedExceptioncreateListenerException(Message<T> message, Throwable t) protected final ObjectinvokeHandler(Collection<Message<T>> messages) Invokes the handler for the provided messages.protected final ObjectinvokeHandler(Message<T> message) Invokes the handler for the provided message.
-
Constructor Details
-
AbstractMethodInvokingListenerAdapter
Create an instance with the providedInvocableHandlerMethod.- Parameters:
handlerMethod- the handler method.
-
-
Method Details
-
invokeHandler
Invokes the handler for the provided message.- Parameters:
message- the message.- Returns:
- the invocation result.
-
invokeHandler
Invokes the handler for the provided messages.- Parameters:
messages- the messages.- Returns:
- the invocation result.
-
createListenerException
protected ListenerExecutionFailedException createListenerException(Collection<Message<T>> messages, Throwable t) -
createListenerException
-