Class AmazonSQSImplementation
- java.lang.Object
-
- com.adaptris.core.jms.VendorImplementationImp
-
- com.adaptris.aws.sqs.jms.AmazonSQSImplementation
-
- All Implemented Interfaces:
com.adaptris.aws.AWSCredentialsProviderBuilder.BuilderConfig
,ComponentLifecycleExtension
,ConnectionComparator<VendorImplementationBase>
,VendorImplementation
,VendorImplementationBase
- Direct Known Subclasses:
AdvancedSQSImplementation
public class AmazonSQSImplementation extends VendorImplementationImp implements com.adaptris.aws.AWSCredentialsProviderBuilder.BuilderConfig
JMS VendorImplementation for Amazon SQS.This VendorImplementation uses the Amazon SQS JMS compatibility layer. When using this class, do not use the AmazonSQS Producer and Consumer classes. Use regular JMS consumers and producers instead.
- Since:
- 3.0.3
In the adapter configuration file this class is aliased as amazon-sqs-implementation which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.jms.VendorImplementationImp
log
-
-
Constructor Summary
Constructors Constructor Description AmazonSQSImplementation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.amazon.sqs.javamessaging.SQSConnectionFactory
build()
protected com.amazonaws.ClientConfiguration
buildClientConfiguration()
KeyValuePairSet
clientConfiguration()
boolean
connectionEquals(VendorImplementationBase arg0)
com.amazon.sqs.javamessaging.SQSConnectionFactory
createConnectionFactory()
protected com.adaptris.aws.AWSCredentialsProviderBuilder
credentialsProvider()
com.adaptris.aws.EndpointBuilder
endpointBuilder()
com.adaptris.aws.AWSCredentialsProviderBuilder
getCredentials()
How to provide Credentials for AWS.java.lang.Integer
getPrefetchCount()
The maximum number of messages to retrieve from the Amazon SQS queue per request.java.lang.String
getRegion()
Set the region for the client.@NonNull SQSClientFactory
getSqsClientFactory()
How to create the SQS client and set parameters.protected com.amazon.sqs.javamessaging.ProviderConfiguration
newProviderConfiguration()
protected int
prefetchCount()
com.adaptris.aws.RetryPolicyFactory
retryPolicy()
void
setCredentials(com.adaptris.aws.AWSCredentialsProviderBuilder credentials)
How to provide Credentials for AWS.void
setPrefetchCount(java.lang.Integer prefetchCount)
The maximum number of messages to retrieve from the Amazon SQS queue per request.void
setRegion(java.lang.String region)
Set the region for the client.void
setSqsClientFactory(@NonNull SQSClientFactory sqsClientFactory)
How to create the SQS client and set parameters.<T extends AmazonSQSImplementation>
TwithClientFactory(SQSClientFactory fac)
<T extends AmazonSQSImplementation>
TwithCredentialsProviderBuilder(com.adaptris.aws.AWSCredentialsProviderBuilder builder)
-
Methods inherited from class com.adaptris.core.jms.VendorImplementationImp
applyVendorSessionProperties, createConsumer, createDestination, createQueue, createQueueReceiver, createSession, createTopic, createTopicSubscriber, prepare, retrieveBrokerDetailsForLogging
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.jms.VendorImplementation
createConnection
-
-
-
-
Method Detail
-
createConnectionFactory
public com.amazon.sqs.javamessaging.SQSConnectionFactory createConnectionFactory() throws javax.jms.JMSException
- Specified by:
createConnectionFactory
in interfaceVendorImplementation
- Throws:
javax.jms.JMSException
-
build
protected com.amazon.sqs.javamessaging.SQSConnectionFactory build() throws java.lang.Exception
- Throws:
java.lang.Exception
-
buildClientConfiguration
protected com.amazonaws.ClientConfiguration buildClientConfiguration() throws java.lang.Exception
- Throws:
java.lang.Exception
-
credentialsProvider
protected com.adaptris.aws.AWSCredentialsProviderBuilder credentialsProvider()
-
connectionEquals
public boolean connectionEquals(VendorImplementationBase arg0)
- Specified by:
connectionEquals
in interfaceConnectionComparator<VendorImplementationBase>
-
prefetchCount
protected int prefetchCount()
-
withClientFactory
public <T extends AmazonSQSImplementation> T withClientFactory(SQSClientFactory fac)
-
withCredentialsProviderBuilder
public <T extends AmazonSQSImplementation> T withCredentialsProviderBuilder(com.adaptris.aws.AWSCredentialsProviderBuilder builder)
-
endpointBuilder
public com.adaptris.aws.EndpointBuilder endpointBuilder()
- Specified by:
endpointBuilder
in interfacecom.adaptris.aws.AWSCredentialsProviderBuilder.BuilderConfig
-
retryPolicy
public com.adaptris.aws.RetryPolicyFactory retryPolicy()
- Specified by:
retryPolicy
in interfacecom.adaptris.aws.AWSCredentialsProviderBuilder.BuilderConfig
-
clientConfiguration
public KeyValuePairSet clientConfiguration()
- Specified by:
clientConfiguration
in interfacecom.adaptris.aws.AWSCredentialsProviderBuilder.BuilderConfig
-
newProviderConfiguration
protected com.amazon.sqs.javamessaging.ProviderConfiguration newProviderConfiguration()
-
getRegion
public java.lang.String getRegion()
Set the region for the client.If the region is not specified, then
DefaultAwsRegionProviderChain
is used to determine the region. You can always specify a region using the standard system propertyaws.region
or via environment variables.
-
setRegion
public void setRegion(java.lang.String region)
Set the region for the client.If the region is not specified, then
DefaultAwsRegionProviderChain
is used to determine the region. You can always specify a region using the standard system propertyaws.region
or via environment variables.
-
getCredentials
public com.adaptris.aws.AWSCredentialsProviderBuilder getCredentials()
How to provide Credentials for AWS.If not specified, then a static credentials provider with a default provider chain will be used.
-
setCredentials
public void setCredentials(com.adaptris.aws.AWSCredentialsProviderBuilder credentials)
How to provide Credentials for AWS.If not specified, then a static credentials provider with a default provider chain will be used.
-
getPrefetchCount
public java.lang.Integer getPrefetchCount()
The maximum number of messages to retrieve from the Amazon SQS queue per request.
-
setPrefetchCount
public void setPrefetchCount(java.lang.Integer prefetchCount)
The maximum number of messages to retrieve from the Amazon SQS queue per request.
-
getSqsClientFactory
@NonNull public @NonNull SQSClientFactory getSqsClientFactory()
How to create the SQS client and set parameters.
-
setSqsClientFactory
public void setSqsClientFactory(@NonNull @NonNull SQSClientFactory sqsClientFactory)
How to create the SQS client and set parameters.
-
-