Class AWSMarketplaceCommerceAnalyticsAsyncClient
- java.lang.Object
-
- com.amazonaws.AmazonWebServiceClient
-
- com.amazonaws.services.marketplacecommerceanalytics.AWSMarketplaceCommerceAnalyticsClient
-
- com.amazonaws.services.marketplacecommerceanalytics.AWSMarketplaceCommerceAnalyticsAsyncClient
-
- All Implemented Interfaces:
AWSMarketplaceCommerceAnalytics
,AWSMarketplaceCommerceAnalyticsAsync
@ThreadSafe public class AWSMarketplaceCommerceAnalyticsAsyncClient extends AWSMarketplaceCommerceAnalyticsClient implements AWSMarketplaceCommerceAnalyticsAsync
Interface for accessing AWS Marketplace Commerce Analytics asynchronously. Each asynchronous method will return a Java Future object representing the asynchronous operation; overloads which accept anAsyncHandler
can be used to receive notification when an asynchronous operation completes.Provides AWS Marketplace business intelligence data on-demand.
-
-
Field Summary
-
Fields inherited from class com.amazonaws.services.marketplacecommerceanalytics.AWSMarketplaceCommerceAnalyticsClient
configFactory
-
Fields inherited from class com.amazonaws.AmazonWebServiceClient
client, clientConfiguration, endpoint, LOGGING_AWS_REQUEST_METRIC, requestHandler2s, timeOffset
-
-
Constructor Summary
Constructors Constructor Description AWSMarketplaceCommerceAnalyticsAsyncClient()
Constructs a new asynchronous client to invoke service methods on AWS Marketplace Commerce Analytics.AWSMarketplaceCommerceAnalyticsAsyncClient(AWSCredentials awsCredentials)
Constructs a new asynchronous client to invoke service methods on AWS Marketplace Commerce Analytics using the specified AWS account credentials.AWSMarketplaceCommerceAnalyticsAsyncClient(AWSCredentialsProvider awsCredentialsProvider)
Constructs a new asynchronous client to invoke service methods on AWS Marketplace Commerce Analytics using the specified AWS account credentials provider.AWSMarketplaceCommerceAnalyticsAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration)
Constructs a new asynchronous client to invoke service methods on AWS Marketplace Commerce Analytics using the provided AWS account credentials provider and client configuration options.AWSMarketplaceCommerceAnalyticsAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on AWS Marketplace Commerce Analytics using the specified AWS account credentials provider, executor service, and client configuration options.AWSMarketplaceCommerceAnalyticsAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on AWS Marketplace Commerce Analytics using the specified AWS account credentials provider and executor service.AWSMarketplaceCommerceAnalyticsAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on AWS Marketplace Commerce Analytics using the specified AWS account credentials, executor service, and client configuration options.AWSMarketplaceCommerceAnalyticsAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on AWS Marketplace Commerce Analytics using the specified AWS account credentials and executor service.AWSMarketplaceCommerceAnalyticsAsyncClient(ClientConfiguration clientConfiguration)
Constructs a new asynchronous client to invoke service methods on AWS Marketplace Commerce Analytics.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Future<GenerateDataSetResult>
generateDataSetAsync(GenerateDataSetRequest request)
Given a data set type and data set publication date, asynchronously publishes the requested data set to the specified S3 bucket and notifies the specified SNS topic once the data is available.Future<GenerateDataSetResult>
generateDataSetAsync(GenerateDataSetRequest request, AsyncHandler<GenerateDataSetRequest,GenerateDataSetResult> asyncHandler)
Given a data set type and data set publication date, asynchronously publishes the requested data set to the specified S3 bucket and notifies the specified SNS topic once the data is available.ExecutorService
getExecutorService()
Returns the executor service used by this client to execute async requests.void
shutdown()
Shuts down the client, releasing all managed resources.-
Methods inherited from class com.amazonaws.services.marketplacecommerceanalytics.AWSMarketplaceCommerceAnalyticsClient
generateDataSet, getCachedResponseMetadata
-
Methods inherited from class com.amazonaws.AmazonWebServiceClient
addRequestHandler, addRequestHandler, beforeMarshalling, configureRegion, createExecutionContext, createExecutionContext, createExecutionContext, endClientExecution, endClientExecution, findRequestMetricCollector, getEndpointPrefix, getRequestMetricsCollector, getServiceAbbreviation, getServiceName, getServiceNameIntern, getSigner, getSignerByURI, getSignerRegionOverride, getTimeOffset, isProfilingEnabled, isRequestMetricsEnabled, removeRequestHandler, removeRequestHandler, requestMetricCollector, setEndpoint, setEndpointPrefix, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, withEndpoint, withRegion, withRegion, withTimeOffset
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.amazonaws.services.marketplacecommerceanalytics.AWSMarketplaceCommerceAnalytics
generateDataSet, getCachedResponseMetadata, setEndpoint, setRegion
-
-
-
-
Constructor Detail
-
AWSMarketplaceCommerceAnalyticsAsyncClient
public AWSMarketplaceCommerceAnalyticsAsyncClient()
Constructs a new asynchronous client to invoke service methods on AWS Marketplace Commerce Analytics. A credentials provider chain will be used that searches for credentials in this order:- Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
- Java System Properties - aws.accessKeyId and aws.secretKey
- Credential profiles file at the default location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI
- Instance profile credentials delivered through the Amazon EC2 metadata service
Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default maximum number of concurrent connections to the service).
-
AWSMarketplaceCommerceAnalyticsAsyncClient
public AWSMarketplaceCommerceAnalyticsAsyncClient(ClientConfiguration clientConfiguration)
Constructs a new asynchronous client to invoke service methods on AWS Marketplace Commerce Analytics. A credentials provider chain will be used that searches for credentials in this order:- Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
- Java System Properties - aws.accessKeyId and aws.secretKey
- Credential profiles file at the default location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI
- Instance profile credentials delivered through the Amazon EC2 metadata service
Asynchronous methods are delegated to a fixed-size thread pool containing a number of threads equal to the maximum number of concurrent connections configured via
ClientConfiguration.getMaxConnections()
.- Parameters:
clientConfiguration
- The client configuration options controlling how this client connects to AWS Marketplace Commerce Analytics (ex: proxy settings, retry counts, etc).- See Also:
DefaultAWSCredentialsProviderChain
,Executors.newFixedThreadPool(int)
-
AWSMarketplaceCommerceAnalyticsAsyncClient
public AWSMarketplaceCommerceAnalyticsAsyncClient(AWSCredentials awsCredentials)
Constructs a new asynchronous client to invoke service methods on AWS Marketplace Commerce Analytics using the specified AWS account credentials.Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default maximum number of concurrent connections to the service).
- Parameters:
awsCredentials
- The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.- See Also:
Executors.newFixedThreadPool(int)
-
AWSMarketplaceCommerceAnalyticsAsyncClient
public AWSMarketplaceCommerceAnalyticsAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on AWS Marketplace Commerce Analytics using the specified AWS account credentials and executor service. Default client settings will be used.- Parameters:
awsCredentials
- The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.executorService
- The executor service by which all asynchronous requests will be executed.
-
AWSMarketplaceCommerceAnalyticsAsyncClient
public AWSMarketplaceCommerceAnalyticsAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on AWS Marketplace Commerce Analytics using the specified AWS account credentials, executor service, and client configuration options.- Parameters:
awsCredentials
- The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.clientConfiguration
- Client configuration options (ex: max retry limit, proxy settings, etc).executorService
- The executor service by which all asynchronous requests will be executed.
-
AWSMarketplaceCommerceAnalyticsAsyncClient
public AWSMarketplaceCommerceAnalyticsAsyncClient(AWSCredentialsProvider awsCredentialsProvider)
Constructs a new asynchronous client to invoke service methods on AWS Marketplace Commerce Analytics using the specified AWS account credentials provider. Default client settings will be used.Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default maximum number of concurrent connections to the service).
- Parameters:
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.- See Also:
Executors.newFixedThreadPool(int)
-
AWSMarketplaceCommerceAnalyticsAsyncClient
public AWSMarketplaceCommerceAnalyticsAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration)
Constructs a new asynchronous client to invoke service methods on AWS Marketplace Commerce Analytics using the provided AWS account credentials provider and client configuration options.Asynchronous methods are delegated to a fixed-size thread pool containing a number of threads equal to the maximum number of concurrent connections configured via
ClientConfiguration.getMaxConnections()
.- Parameters:
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.clientConfiguration
- Client configuration options (ex: max retry limit, proxy settings, etc).- See Also:
DefaultAWSCredentialsProviderChain
,Executors.newFixedThreadPool(int)
-
AWSMarketplaceCommerceAnalyticsAsyncClient
public AWSMarketplaceCommerceAnalyticsAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on AWS Marketplace Commerce Analytics using the specified AWS account credentials provider and executor service. Default client settings will be used.- Parameters:
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.executorService
- The executor service by which all asynchronous requests will be executed.
-
AWSMarketplaceCommerceAnalyticsAsyncClient
public AWSMarketplaceCommerceAnalyticsAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on AWS Marketplace Commerce Analytics using the specified AWS account credentials provider, executor service, and client configuration options.- Parameters:
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.clientConfiguration
- Client configuration options (ex: max retry limit, proxy settings, etc).executorService
- The executor service by which all asynchronous requests will be executed.
-
-
Method Detail
-
getExecutorService
public ExecutorService getExecutorService()
Returns the executor service used by this client to execute async requests.- Returns:
- The executor service used by this client to execute async requests.
-
generateDataSetAsync
public Future<GenerateDataSetResult> generateDataSetAsync(GenerateDataSetRequest request)
Description copied from interface:AWSMarketplaceCommerceAnalyticsAsync
Given a data set type and data set publication date, asynchronously publishes the requested data set to the specified S3 bucket and notifies the specified SNS topic once the data is available. Returns a unique request identifier that can be used to correlate requests with notifications from the SNS topic. Data sets will be published in comma-separated values (CSV) format with the file name {data_set_type}_YYYY-MM-DD.csv. If a file with the same name already exists (e.g. if the same data set is requested twice), the original file will be overwritten by the new file. Requires a Role with an attached permissions policy providing Allow permissions for the following actions: s3:PutObject, s3:GetBucketLocation, sns:GetTopicAttributes, sns:Publish, iam:GetRolePolicy.- Specified by:
generateDataSetAsync
in interfaceAWSMarketplaceCommerceAnalyticsAsync
- Parameters:
request
- Container for the parameters to the GenerateDataSet operation.- Returns:
- A Java Future containing the result of the GenerateDataSet operation returned by the service.
-
generateDataSetAsync
public Future<GenerateDataSetResult> generateDataSetAsync(GenerateDataSetRequest request, AsyncHandler<GenerateDataSetRequest,GenerateDataSetResult> asyncHandler)
Description copied from interface:AWSMarketplaceCommerceAnalyticsAsync
Given a data set type and data set publication date, asynchronously publishes the requested data set to the specified S3 bucket and notifies the specified SNS topic once the data is available. Returns a unique request identifier that can be used to correlate requests with notifications from the SNS topic. Data sets will be published in comma-separated values (CSV) format with the file name {data_set_type}_YYYY-MM-DD.csv. If a file with the same name already exists (e.g. if the same data set is requested twice), the original file will be overwritten by the new file. Requires a Role with an attached permissions policy providing Allow permissions for the following actions: s3:PutObject, s3:GetBucketLocation, sns:GetTopicAttributes, sns:Publish, iam:GetRolePolicy.- Specified by:
generateDataSetAsync
in interfaceAWSMarketplaceCommerceAnalyticsAsync
- Parameters:
request
- Container for the parameters to the GenerateDataSet operation.asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the GenerateDataSet operation returned by the service.
-
shutdown
public void shutdown()
Shuts down the client, releasing all managed resources. This includes forcibly terminating all pending asynchronous service calls. Clients who wish to give pending asynchronous service calls time to complete should callgetExecutorService().shutdown()
followed bygetExecutorService().awaitTermination()
prior to calling this method.- Specified by:
shutdown
in interfaceAWSMarketplaceCommerceAnalytics
- Overrides:
shutdown
in classAmazonWebServiceClient
-
-