Package io.awspring.cloud.sqs.operations
Class AbstractMessagingTemplate.AbstractMessagingTemplateOptions<O extends MessagingTemplateOptions<O>>
java.lang.Object
io.awspring.cloud.sqs.operations.AbstractMessagingTemplate.AbstractMessagingTemplateOptions<O>
- Type Parameters:
O
- the options type for returning in the chained methods.
- All Implemented Interfaces:
MessagingTemplateOptions<O>
- Enclosing class:
- AbstractMessagingTemplate<S>
protected abstract static class AbstractMessagingTemplate.AbstractMessagingTemplateOptions<O extends MessagingTemplateOptions<O>>
extends Object
implements MessagingTemplateOptions<O>
Base class for template options, to be extended by subclasses.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionacknowledgementMode
(TemplateAcknowledgementMode defaultAcknowledgementMode) Set the acknowledgement mode for this template.additionalHeaderForReceive
(String name, Object value) Set a default header to be added to received messages.additionalHeadersForReceive
(Map<String, Object> defaultAdditionalHeaders) Set default headers to be added to received messages.protected void
defaultEndpointName
(String defaultEndpointName) Subclasses should have a method with a more specific name and delegate to this.defaultMaxNumberOfMessages
(Integer defaultMaxNumberOfMessages) Set the default maximum number of messages to be retrieved in a single batch.defaultPayloadClass
(Class<?> defaultPayloadClass) The default class to which this template should convert payloads to.defaultPollTimeout
(Duration defaultPollTimeout) Set the default maximum amount of time this template will wait for the maximum number of messages before returning.self()
sendBatchFailureHandlingStrategy
(SendBatchFailureHandlingStrategy sendBatchFailureHandlingStrategy) Set the strategy to use when handling batch send operations with at least one failed message.
-
Constructor Details
-
AbstractMessagingTemplateOptions
protected AbstractMessagingTemplateOptions()
-
-
Method Details
-
acknowledgementMode
Description copied from interface:MessagingTemplateOptions
Set the acknowledgement mode for this template. Default isTemplateAcknowledgementMode.ACKNOWLEDGE
- Specified by:
acknowledgementMode
in interfaceMessagingTemplateOptions<O extends MessagingTemplateOptions<O>>
- Parameters:
defaultAcknowledgementMode
- the mode.- Returns:
- the options instance.
-
sendBatchFailureHandlingStrategy
public O sendBatchFailureHandlingStrategy(SendBatchFailureHandlingStrategy sendBatchFailureHandlingStrategy) Description copied from interface:MessagingTemplateOptions
Set the strategy to use when handling batch send operations with at least one failed message. Default isSendBatchFailureHandlingStrategy.THROW
- Specified by:
sendBatchFailureHandlingStrategy
in interfaceMessagingTemplateOptions<O extends MessagingTemplateOptions<O>>
- Parameters:
sendBatchFailureHandlingStrategy
- the strategy.- Returns:
- the options instance.
-
defaultPollTimeout
Description copied from interface:MessagingTemplateOptions
Set the default maximum amount of time this template will wait for the maximum number of messages before returning. Default is 10 seconds.- Specified by:
defaultPollTimeout
in interfaceMessagingTemplateOptions<O extends MessagingTemplateOptions<O>>
- Parameters:
defaultPollTimeout
- the timeout.- Returns:
- the options instance.
-
defaultMaxNumberOfMessages
Description copied from interface:MessagingTemplateOptions
Set the default maximum number of messages to be retrieved in a single batch. Default is 10.- Specified by:
defaultMaxNumberOfMessages
in interfaceMessagingTemplateOptions<O extends MessagingTemplateOptions<O>>
- Parameters:
defaultMaxNumberOfMessages
- the maximum number of messages.- Returns:
- the options instance.
-
defaultEndpointName
Subclasses should have a method with a more specific name and delegate to this.- Parameters:
defaultEndpointName
- the default endpoint name.
-
defaultPayloadClass
Description copied from interface:MessagingTemplateOptions
The default class to which this template should convert payloads to.- Specified by:
defaultPayloadClass
in interfaceMessagingTemplateOptions<O extends MessagingTemplateOptions<O>>
- Parameters:
defaultPayloadClass
- the default payload class.- Returns:
- the options instance.
-
additionalHeaderForReceive
Description copied from interface:MessagingTemplateOptions
Set a default header to be added to received messages.- Specified by:
additionalHeaderForReceive
in interfaceMessagingTemplateOptions<O extends MessagingTemplateOptions<O>>
- Parameters:
name
- the header name.value
- the header value.- Returns:
- the options instance.
-
additionalHeadersForReceive
Description copied from interface:MessagingTemplateOptions
Set default headers to be added to received messages.- Specified by:
additionalHeadersForReceive
in interfaceMessagingTemplateOptions<O extends MessagingTemplateOptions<O>>
- Parameters:
defaultAdditionalHeaders
- the headers.- Returns:
- the options instance.
-
self
-