@ThreadSafe @Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class AWSMarketplaceMeteringAsyncClient extends AWSMarketplaceMeteringClient implements AWSMarketplaceMeteringAsync
AsyncHandler
can be used to receive
notification when an asynchronous operation completes.
This reference provides descriptions of the low-level AWS Marketplace Metering Service API.
AWS Marketplace sellers can use this API to submit usage data for custom usage dimensions.
Submitting Metering Records
MeterUsage- Submits the metering record for a Marketplace product. MeterUsage is called from an EC2 instance.
BatchMeterUsage- Submits the metering record for a set of customers. BatchMeterUsage is called from a software-as-a-service (SaaS) application.
Accepting New Customers
ResolveCustomer- Called by a SaaS application during the registration process. When a buyer visits your website during the registration process, the buyer submits a Registration Token through the browser. The Registration Token is resolved through this API to obtain a CustomerIdentifier and Product Code.
LOGGING_AWS_REQUEST_METRIC
ENDPOINT_PREFIX
Constructor and Description |
---|
AWSMarketplaceMeteringAsyncClient()
Deprecated.
|
AWSMarketplaceMeteringAsyncClient(AWSCredentials awsCredentials)
Deprecated.
|
AWSMarketplaceMeteringAsyncClient(AWSCredentials awsCredentials,
ClientConfiguration clientConfiguration,
ExecutorService executorService)
|
AWSMarketplaceMeteringAsyncClient(AWSCredentials awsCredentials,
ExecutorService executorService)
|
AWSMarketplaceMeteringAsyncClient(AWSCredentialsProvider awsCredentialsProvider)
Deprecated.
|
AWSMarketplaceMeteringAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration)
|
AWSMarketplaceMeteringAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration,
ExecutorService executorService)
|
AWSMarketplaceMeteringAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
ExecutorService executorService)
|
AWSMarketplaceMeteringAsyncClient(ClientConfiguration clientConfiguration)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static AWSMarketplaceMeteringAsyncClientBuilder |
asyncBuilder() |
Future<BatchMeterUsageResult> |
batchMeterUsageAsync(BatchMeterUsageRequest request)
BatchMeterUsage is called from a SaaS application listed on the AWS Marketplace to post metering records for a
set of customers.
|
Future<BatchMeterUsageResult> |
batchMeterUsageAsync(BatchMeterUsageRequest request,
AsyncHandler<BatchMeterUsageRequest,BatchMeterUsageResult> asyncHandler)
BatchMeterUsage is called from a SaaS application listed on the AWS Marketplace to post metering records for a
set of customers.
|
ExecutorService |
getExecutorService()
Returns the executor service used by this client to execute async requests.
|
Future<MeterUsageResult> |
meterUsageAsync(MeterUsageRequest request)
API to emit metering records.
|
Future<MeterUsageResult> |
meterUsageAsync(MeterUsageRequest request,
AsyncHandler<MeterUsageRequest,MeterUsageResult> asyncHandler)
API to emit metering records.
|
Future<ResolveCustomerResult> |
resolveCustomerAsync(ResolveCustomerRequest request)
ResolveCustomer is called by a SaaS application during the registration process.
|
Future<ResolveCustomerResult> |
resolveCustomerAsync(ResolveCustomerRequest request,
AsyncHandler<ResolveCustomerRequest,ResolveCustomerResult> asyncHandler)
ResolveCustomer is called by a SaaS application during the registration process.
|
void |
shutdown()
Shuts down the client, releasing all managed resources.
|
batchMeterUsage, builder, getCachedResponseMetadata, meterUsage, resolveCustomer
addRequestHandler, addRequestHandler, configureRegion, getEndpointPrefix, getRequestMetricsCollector, getServiceName, getSignerByURI, getSignerOverride, getSignerRegionOverride, getTimeOffset, makeImmutable, removeRequestHandler, removeRequestHandler, setEndpoint, setEndpoint, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, withEndpoint, withRegion, withRegion, withTimeOffset
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
batchMeterUsage, getCachedResponseMetadata, meterUsage, resolveCustomer, setEndpoint, setRegion
@Deprecated public AWSMarketplaceMeteringAsyncClient()
AWSMarketplaceMeteringAsyncClientBuilder.defaultClient()
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).
@Deprecated public AWSMarketplaceMeteringAsyncClient(ClientConfiguration clientConfiguration)
AwsClientBuilder.withClientConfiguration(ClientConfiguration)
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()
.
clientConfiguration
- The client configuration options controlling how this client connects to AWSMarketplace Metering (ex:
proxy settings, retry counts, etc).DefaultAWSCredentialsProviderChain
,
Executors.newFixedThreadPool(int)
@Deprecated public AWSMarketplaceMeteringAsyncClient(AWSCredentials awsCredentials)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
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).
awsCredentials
- The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.Executors.newFixedThreadPool(int)
@Deprecated public AWSMarketplaceMeteringAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsAsyncClientBuilder.withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)
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.@Deprecated public AWSMarketplaceMeteringAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsClientBuilder.withClientConfiguration(ClientConfiguration)
and
AwsAsyncClientBuilder.withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)
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.@Deprecated public AWSMarketplaceMeteringAsyncClient(AWSCredentialsProvider awsCredentialsProvider)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
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).
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.Executors.newFixedThreadPool(int)
@Deprecated public AWSMarketplaceMeteringAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsClientBuilder.withClientConfiguration(ClientConfiguration)
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()
.
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).DefaultAWSCredentialsProviderChain
,
Executors.newFixedThreadPool(int)
@Deprecated public AWSMarketplaceMeteringAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsAsyncClientBuilder.withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)
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.@Deprecated public AWSMarketplaceMeteringAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, ExecutorService executorService)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsClientBuilder.withClientConfiguration(ClientConfiguration)
and
AwsAsyncClientBuilder.withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)
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.public static AWSMarketplaceMeteringAsyncClientBuilder asyncBuilder()
public ExecutorService getExecutorService()
public Future<BatchMeterUsageResult> batchMeterUsageAsync(BatchMeterUsageRequest request)
AWSMarketplaceMeteringAsync
BatchMeterUsage is called from a SaaS application listed on the AWS Marketplace to post metering records for a set of customers.
For identical requests, the API is idempotent; requests can be retried with the same records or a subset of the input records.
Every request to BatchMeterUsage is for one product. If you need to meter usage for multiple products, you must make multiple calls to BatchMeterUsage.
BatchMeterUsage can process up to 25 UsageRecords at a time.
batchMeterUsageAsync
in interface AWSMarketplaceMeteringAsync
request
- A BatchMeterUsageRequest contains UsageRecords, which indicate quantities of usage within your
application.public Future<BatchMeterUsageResult> batchMeterUsageAsync(BatchMeterUsageRequest request, AsyncHandler<BatchMeterUsageRequest,BatchMeterUsageResult> asyncHandler)
AWSMarketplaceMeteringAsync
BatchMeterUsage is called from a SaaS application listed on the AWS Marketplace to post metering records for a set of customers.
For identical requests, the API is idempotent; requests can be retried with the same records or a subset of the input records.
Every request to BatchMeterUsage is for one product. If you need to meter usage for multiple products, you must make multiple calls to BatchMeterUsage.
BatchMeterUsage can process up to 25 UsageRecords at a time.
batchMeterUsageAsync
in interface AWSMarketplaceMeteringAsync
request
- A BatchMeterUsageRequest contains UsageRecords, which indicate quantities of usage within your
application.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.public Future<MeterUsageResult> meterUsageAsync(MeterUsageRequest request)
AWSMarketplaceMeteringAsync
API to emit metering records. For identical requests, the API is idempotent. It simply returns the metering record ID.
MeterUsage is authenticated on the buyer's AWS account, generally when running from an EC2 instance on the AWS Marketplace.
meterUsageAsync
in interface AWSMarketplaceMeteringAsync
public Future<MeterUsageResult> meterUsageAsync(MeterUsageRequest request, AsyncHandler<MeterUsageRequest,MeterUsageResult> asyncHandler)
AWSMarketplaceMeteringAsync
API to emit metering records. For identical requests, the API is idempotent. It simply returns the metering record ID.
MeterUsage is authenticated on the buyer's AWS account, generally when running from an EC2 instance on the AWS Marketplace.
meterUsageAsync
in interface AWSMarketplaceMeteringAsync
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.public Future<ResolveCustomerResult> resolveCustomerAsync(ResolveCustomerRequest request)
AWSMarketplaceMeteringAsync
ResolveCustomer is called by a SaaS application during the registration process. When a buyer visits your website during the registration process, the buyer submits a registration token through their browser. The registration token is resolved through this API to obtain a CustomerIdentifier and product code.
resolveCustomerAsync
in interface AWSMarketplaceMeteringAsync
request
- Contains input to the ResolveCustomer operation.public Future<ResolveCustomerResult> resolveCustomerAsync(ResolveCustomerRequest request, AsyncHandler<ResolveCustomerRequest,ResolveCustomerResult> asyncHandler)
AWSMarketplaceMeteringAsync
ResolveCustomer is called by a SaaS application during the registration process. When a buyer visits your website during the registration process, the buyer submits a registration token through their browser. The registration token is resolved through this API to obtain a CustomerIdentifier and product code.
resolveCustomerAsync
in interface AWSMarketplaceMeteringAsync
request
- Contains input to the ResolveCustomer 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.public void shutdown()
getExecutorService().shutdown()
followed by getExecutorService().awaitTermination()
prior to
calling this method.shutdown
in interface AWSMarketplaceMetering
shutdown
in class AmazonWebServiceClient
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.