List of usage examples for com.amazonaws.services.sqs AmazonSQSAsyncClient AmazonSQSAsyncClient
@Deprecated
public AmazonSQSAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration, ExecutorService executorService)
From source file:io.relution.jenkins.awssqs.factories.SQSFactoryImpl.java
License:Apache License
@Override public AmazonSQSAsync createSQSAsync(final io.relution.jenkins.awssqs.interfaces.SQSQueue queue) { final ClientConfiguration clientConfiguration = this.getClientConfiguration(queue); boolean hasCredentials = isNotBlank(queue.getAWSAccessKeyId()) && isNotBlank(queue.getAWSSecretKey()); io.relution.jenkins.awssqs.logging.Log.info("Creating AmazonSQS instance - hasCredentials='%s'", hasCredentials);//from w w w . j a v a 2s .c om final AmazonSQSAsyncClient sqsAsync = hasCredentials ? new AmazonSQSAsyncClient(queue, clientConfiguration, this.executor) : new AmazonSQSAsyncClient(clientConfiguration); if (queue.getEndpoint() != null) { sqsAsync.setEndpoint(queue.getEndpoint()); } final QueueBufferConfig queueBufferConfig = this.getQueueBufferConfig(queue); final AmazonSQSBufferedAsyncClient sqsBufferedAsync = new AmazonSQSBufferedAsyncClient(sqsAsync, queueBufferConfig); return sqsBufferedAsync; }
From source file:io.relution.jenkins.scmsqs.factories.SQSFactoryImpl.java
License:Apache License
@Override public AmazonSQSAsync createSQSAsync(final SQSQueue queue) { final ClientConfiguration clientConfiguration = this.getClientConfiguration(queue); final AmazonSQSAsyncClient sqsAsync = new AmazonSQSAsyncClient(queue, clientConfiguration, this.executor); if (queue.getEndpoint() != null) { sqsAsync.setEndpoint(queue.getEndpoint()); }/*from ww w . ja v a2s .com*/ final QueueBufferConfig queueBufferConfig = this.getQueueBufferConfig(queue); final AmazonSQSBufferedAsyncClient sqsBufferedAsync = new AmazonSQSBufferedAsyncClient(sqsAsync, queueBufferConfig); return sqsBufferedAsync; }
From source file:org.apache.usergrid.persistence.queue.impl.SNSQueueManagerImpl.java
License:Apache License
/** * Create the async sqs client//ww w. j a v a 2 s.c om */ private AmazonSQSAsyncClient createAsyncSQSClient(final Region region, final ExecutorService executor) { final UsergridAwsCredentialsProvider ugProvider = new UsergridAwsCredentialsProvider(); final AmazonSQSAsyncClient sqs = new AmazonSQSAsyncClient(ugProvider.getCredentials(), clientConfiguration, executor); sqs.setRegion(region); return sqs; }