All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.appstream.AmazonAppStreamAsyncClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon AppStream module holds the client classes that are used for communicating with Amazon AppStream.

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.appstream;

import static java.util.concurrent.Executors.newFixedThreadPool;

import javax.annotation.Generated;

import com.amazonaws.services.appstream.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import com.amazonaws.ClientConfiguration;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import java.util.concurrent.ExecutorService;
import com.amazonaws.auth.DefaultAWSCredentialsProviderChain;

/**
 * Client for accessing Amazon AppStream asynchronously. Each asynchronous method will return a Java Future object
 * representing the asynchronous operation; overloads which accept an {@code AsyncHandler} can be used to receive
 * notification when an asynchronous operation completes.
 * 

* Amazon AppStream 2.0 *

* This is the Amazon AppStream 2.0 API Reference. This documentation provides descriptions and syntax for each * of the actions and data types in AppStream 2.0. AppStream 2.0 is a fully managed, secure application streaming * service that lets you stream desktop applications to users without rewriting applications. AppStream 2.0 manages the * AWS resources that are required to host and run your applications, scales automatically, and provides access to your * users on demand. *

* *

* You can call the AppStream 2.0 API operations by using an interface VPC endpoint (interface endpoint). For more * information, see Access AppStream 2.0 API Operations and CLI Commands Through an Interface VPC Endpoint in the Amazon * AppStream 2.0 Administration Guide. *

*
*

* To learn more about AppStream 2.0, see the following resources: *

* */ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AmazonAppStreamAsyncClient extends AmazonAppStreamClient implements AmazonAppStreamAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; /** * Constructs a new asynchronous client to invoke service methods on Amazon AppStream. 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). * * @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AmazonAppStreamAsyncClientBuilder#defaultClient()} */ @Deprecated public AmazonAppStreamAsyncClient() { this(DefaultAWSCredentialsProviderChain.getInstance()); } /** * Constructs a new asynchronous client to invoke service methods on Amazon AppStream. 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 {@code ClientConfiguration.getMaxConnections()}. * * @param clientConfiguration * The client configuration options controlling how this client connects to Amazon AppStream (ex: proxy * settings, retry counts, etc). * * @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AmazonAppStreamAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AmazonAppStreamAsyncClient(ClientConfiguration clientConfiguration) { this(DefaultAWSCredentialsProviderChain.getInstance(), clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections())); } /** * Constructs a new asynchronous client to invoke service methods on Amazon AppStream 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). * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AmazonAppStreamAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} */ @Deprecated public AmazonAppStreamAsyncClient(AWSCredentials awsCredentials) { this(awsCredentials, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE)); } /** * Constructs a new asynchronous client to invoke service methods on Amazon AppStream using the specified AWS * account credentials and executor service. Default client settings will be used. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @param executorService * The executor service by which all asynchronous requests will be executed. * @deprecated use {@link AmazonAppStreamAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonAppStreamAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonAppStreamAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService) { this(awsCredentials, configFactory.getConfig(), executorService); } /** * Constructs a new asynchronous client to invoke service methods on Amazon AppStream using the specified AWS * account credentials, executor service, and client configuration options. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @param clientConfiguration * Client configuration options (ex: max retry limit, proxy settings, etc). * @param executorService * The executor service by which all asynchronous requests will be executed. * @deprecated use {@link AmazonAppStreamAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonAppStreamAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and * {@link AmazonAppStreamAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonAppStreamAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService) { super(awsCredentials, clientConfiguration); this.executorService = executorService; } /** * Constructs a new asynchronous client to invoke service methods on Amazon AppStream 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). * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AmazonAppStreamAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} */ @Deprecated public AmazonAppStreamAsyncClient(AWSCredentialsProvider awsCredentialsProvider) { this(awsCredentialsProvider, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE)); } /** * Constructs a new asynchronous client to invoke service methods on Amazon AppStream 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 {@code ClientConfiguration.getMaxConnections()}. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @param clientConfiguration * Client configuration options (ex: max retry limit, proxy settings, etc). * * @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AmazonAppStreamAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonAppStreamAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AmazonAppStreamAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration) { this(awsCredentialsProvider, clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections())); } /** * Constructs a new asynchronous client to invoke service methods on Amazon AppStream using the specified AWS * account credentials provider and executor service. Default client settings will be used. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @param executorService * The executor service by which all asynchronous requests will be executed. * @deprecated use {@link AmazonAppStreamAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonAppStreamAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonAppStreamAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService) { this(awsCredentialsProvider, configFactory.getConfig(), executorService); } /** * Constructs a new asynchronous client to invoke service methods on Amazon AppStream using the specified AWS * account credentials provider, executor service, and client configuration options. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @param clientConfiguration * Client configuration options (ex: max retry limit, proxy settings, etc). * @param executorService * The executor service by which all asynchronous requests will be executed. * @deprecated use {@link AmazonAppStreamAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonAppStreamAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and * {@link AmazonAppStreamAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonAppStreamAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, ExecutorService executorService) { super(awsCredentialsProvider, clientConfiguration); this.executorService = executorService; } public static AmazonAppStreamAsyncClientBuilder asyncBuilder() { return AmazonAppStreamAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on Amazon AppStream using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. */ AmazonAppStreamAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on Amazon AppStream using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AmazonAppStreamAsyncClient(AwsAsyncClientParams asyncClientParams, boolean endpointDiscoveryEnabled) { super(asyncClientParams, endpointDiscoveryEnabled); this.executorService = asyncClientParams.getExecutor(); } /** * Returns the executor service used by this client to execute async requests. * * @return The executor service used by this client to execute async requests. */ public ExecutorService getExecutorService() { return executorService; } @Override public java.util.concurrent.Future associateApplicationFleetAsync(AssociateApplicationFleetRequest request) { return associateApplicationFleetAsync(request, null); } @Override public java.util.concurrent.Future associateApplicationFleetAsync(final AssociateApplicationFleetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AssociateApplicationFleetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AssociateApplicationFleetResult call() throws Exception { AssociateApplicationFleetResult result = null; try { result = executeAssociateApplicationFleet(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future associateApplicationToEntitlementAsync( AssociateApplicationToEntitlementRequest request) { return associateApplicationToEntitlementAsync(request, null); } @Override public java.util.concurrent.Future associateApplicationToEntitlementAsync( final AssociateApplicationToEntitlementRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AssociateApplicationToEntitlementRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AssociateApplicationToEntitlementResult call() throws Exception { AssociateApplicationToEntitlementResult result = null; try { result = executeAssociateApplicationToEntitlement(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future associateFleetAsync(AssociateFleetRequest request) { return associateFleetAsync(request, null); } @Override public java.util.concurrent.Future associateFleetAsync(final AssociateFleetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AssociateFleetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AssociateFleetResult call() throws Exception { AssociateFleetResult result = null; try { result = executeAssociateFleet(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future batchAssociateUserStackAsync(BatchAssociateUserStackRequest request) { return batchAssociateUserStackAsync(request, null); } @Override public java.util.concurrent.Future batchAssociateUserStackAsync(final BatchAssociateUserStackRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final BatchAssociateUserStackRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public BatchAssociateUserStackResult call() throws Exception { BatchAssociateUserStackResult result = null; try { result = executeBatchAssociateUserStack(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future batchDisassociateUserStackAsync(BatchDisassociateUserStackRequest request) { return batchDisassociateUserStackAsync(request, null); } @Override public java.util.concurrent.Future batchDisassociateUserStackAsync(final BatchDisassociateUserStackRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final BatchDisassociateUserStackRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public BatchDisassociateUserStackResult call() throws Exception { BatchDisassociateUserStackResult result = null; try { result = executeBatchDisassociateUserStack(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future copyImageAsync(CopyImageRequest request) { return copyImageAsync(request, null); } @Override public java.util.concurrent.Future copyImageAsync(final CopyImageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CopyImageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CopyImageResult call() throws Exception { CopyImageResult result = null; try { result = executeCopyImage(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createAppBlockAsync(CreateAppBlockRequest request) { return createAppBlockAsync(request, null); } @Override public java.util.concurrent.Future createAppBlockAsync(final CreateAppBlockRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateAppBlockRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateAppBlockResult call() throws Exception { CreateAppBlockResult result = null; try { result = executeCreateAppBlock(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createApplicationAsync(CreateApplicationRequest request) { return createApplicationAsync(request, null); } @Override public java.util.concurrent.Future createApplicationAsync(final CreateApplicationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateApplicationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateApplicationResult call() throws Exception { CreateApplicationResult result = null; try { result = executeCreateApplication(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createDirectoryConfigAsync(CreateDirectoryConfigRequest request) { return createDirectoryConfigAsync(request, null); } @Override public java.util.concurrent.Future createDirectoryConfigAsync(final CreateDirectoryConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateDirectoryConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateDirectoryConfigResult call() throws Exception { CreateDirectoryConfigResult result = null; try { result = executeCreateDirectoryConfig(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createEntitlementAsync(CreateEntitlementRequest request) { return createEntitlementAsync(request, null); } @Override public java.util.concurrent.Future createEntitlementAsync(final CreateEntitlementRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateEntitlementRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateEntitlementResult call() throws Exception { CreateEntitlementResult result = null; try { result = executeCreateEntitlement(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createFleetAsync(CreateFleetRequest request) { return createFleetAsync(request, null); } @Override public java.util.concurrent.Future createFleetAsync(final CreateFleetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateFleetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateFleetResult call() throws Exception { CreateFleetResult result = null; try { result = executeCreateFleet(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createImageBuilderAsync(CreateImageBuilderRequest request) { return createImageBuilderAsync(request, null); } @Override public java.util.concurrent.Future createImageBuilderAsync(final CreateImageBuilderRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateImageBuilderRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateImageBuilderResult call() throws Exception { CreateImageBuilderResult result = null; try { result = executeCreateImageBuilder(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createImageBuilderStreamingURLAsync(CreateImageBuilderStreamingURLRequest request) { return createImageBuilderStreamingURLAsync(request, null); } @Override public java.util.concurrent.Future createImageBuilderStreamingURLAsync( final CreateImageBuilderStreamingURLRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateImageBuilderStreamingURLRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateImageBuilderStreamingURLResult call() throws Exception { CreateImageBuilderStreamingURLResult result = null; try { result = executeCreateImageBuilderStreamingURL(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createStackAsync(CreateStackRequest request) { return createStackAsync(request, null); } @Override public java.util.concurrent.Future createStackAsync(final CreateStackRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateStackRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateStackResult call() throws Exception { CreateStackResult result = null; try { result = executeCreateStack(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createStreamingURLAsync(CreateStreamingURLRequest request) { return createStreamingURLAsync(request, null); } @Override public java.util.concurrent.Future createStreamingURLAsync(final CreateStreamingURLRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateStreamingURLRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateStreamingURLResult call() throws Exception { CreateStreamingURLResult result = null; try { result = executeCreateStreamingURL(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createUpdatedImageAsync(CreateUpdatedImageRequest request) { return createUpdatedImageAsync(request, null); } @Override public java.util.concurrent.Future createUpdatedImageAsync(final CreateUpdatedImageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateUpdatedImageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateUpdatedImageResult call() throws Exception { CreateUpdatedImageResult result = null; try { result = executeCreateUpdatedImage(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createUsageReportSubscriptionAsync(CreateUsageReportSubscriptionRequest request) { return createUsageReportSubscriptionAsync(request, null); } @Override public java.util.concurrent.Future createUsageReportSubscriptionAsync( final CreateUsageReportSubscriptionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateUsageReportSubscriptionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateUsageReportSubscriptionResult call() throws Exception { CreateUsageReportSubscriptionResult result = null; try { result = executeCreateUsageReportSubscription(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createUserAsync(CreateUserRequest request) { return createUserAsync(request, null); } @Override public java.util.concurrent.Future createUserAsync(final CreateUserRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateUserRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateUserResult call() throws Exception { CreateUserResult result = null; try { result = executeCreateUser(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteAppBlockAsync(DeleteAppBlockRequest request) { return deleteAppBlockAsync(request, null); } @Override public java.util.concurrent.Future deleteAppBlockAsync(final DeleteAppBlockRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteAppBlockRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteAppBlockResult call() throws Exception { DeleteAppBlockResult result = null; try { result = executeDeleteAppBlock(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteApplicationAsync(DeleteApplicationRequest request) { return deleteApplicationAsync(request, null); } @Override public java.util.concurrent.Future deleteApplicationAsync(final DeleteApplicationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteApplicationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteApplicationResult call() throws Exception { DeleteApplicationResult result = null; try { result = executeDeleteApplication(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteDirectoryConfigAsync(DeleteDirectoryConfigRequest request) { return deleteDirectoryConfigAsync(request, null); } @Override public java.util.concurrent.Future deleteDirectoryConfigAsync(final DeleteDirectoryConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteDirectoryConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteDirectoryConfigResult call() throws Exception { DeleteDirectoryConfigResult result = null; try { result = executeDeleteDirectoryConfig(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteEntitlementAsync(DeleteEntitlementRequest request) { return deleteEntitlementAsync(request, null); } @Override public java.util.concurrent.Future deleteEntitlementAsync(final DeleteEntitlementRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteEntitlementRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteEntitlementResult call() throws Exception { DeleteEntitlementResult result = null; try { result = executeDeleteEntitlement(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteFleetAsync(DeleteFleetRequest request) { return deleteFleetAsync(request, null); } @Override public java.util.concurrent.Future deleteFleetAsync(final DeleteFleetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteFleetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteFleetResult call() throws Exception { DeleteFleetResult result = null; try { result = executeDeleteFleet(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteImageAsync(DeleteImageRequest request) { return deleteImageAsync(request, null); } @Override public java.util.concurrent.Future deleteImageAsync(final DeleteImageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteImageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteImageResult call() throws Exception { DeleteImageResult result = null; try { result = executeDeleteImage(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteImageBuilderAsync(DeleteImageBuilderRequest request) { return deleteImageBuilderAsync(request, null); } @Override public java.util.concurrent.Future deleteImageBuilderAsync(final DeleteImageBuilderRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteImageBuilderRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteImageBuilderResult call() throws Exception { DeleteImageBuilderResult result = null; try { result = executeDeleteImageBuilder(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteImagePermissionsAsync(DeleteImagePermissionsRequest request) { return deleteImagePermissionsAsync(request, null); } @Override public java.util.concurrent.Future deleteImagePermissionsAsync(final DeleteImagePermissionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteImagePermissionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteImagePermissionsResult call() throws Exception { DeleteImagePermissionsResult result = null; try { result = executeDeleteImagePermissions(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteStackAsync(DeleteStackRequest request) { return deleteStackAsync(request, null); } @Override public java.util.concurrent.Future deleteStackAsync(final DeleteStackRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteStackRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteStackResult call() throws Exception { DeleteStackResult result = null; try { result = executeDeleteStack(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteUsageReportSubscriptionAsync(DeleteUsageReportSubscriptionRequest request) { return deleteUsageReportSubscriptionAsync(request, null); } @Override public java.util.concurrent.Future deleteUsageReportSubscriptionAsync( final DeleteUsageReportSubscriptionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteUsageReportSubscriptionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteUsageReportSubscriptionResult call() throws Exception { DeleteUsageReportSubscriptionResult result = null; try { result = executeDeleteUsageReportSubscription(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteUserAsync(DeleteUserRequest request) { return deleteUserAsync(request, null); } @Override public java.util.concurrent.Future deleteUserAsync(final DeleteUserRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteUserRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteUserResult call() throws Exception { DeleteUserResult result = null; try { result = executeDeleteUser(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeAppBlocksAsync(DescribeAppBlocksRequest request) { return describeAppBlocksAsync(request, null); } @Override public java.util.concurrent.Future describeAppBlocksAsync(final DescribeAppBlocksRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeAppBlocksRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeAppBlocksResult call() throws Exception { DescribeAppBlocksResult result = null; try { result = executeDescribeAppBlocks(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeApplicationFleetAssociationsAsync( DescribeApplicationFleetAssociationsRequest request) { return describeApplicationFleetAssociationsAsync(request, null); } @Override public java.util.concurrent.Future describeApplicationFleetAssociationsAsync( final DescribeApplicationFleetAssociationsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeApplicationFleetAssociationsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeApplicationFleetAssociationsResult call() throws Exception { DescribeApplicationFleetAssociationsResult result = null; try { result = executeDescribeApplicationFleetAssociations(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeApplicationsAsync(DescribeApplicationsRequest request) { return describeApplicationsAsync(request, null); } @Override public java.util.concurrent.Future describeApplicationsAsync(final DescribeApplicationsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeApplicationsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeApplicationsResult call() throws Exception { DescribeApplicationsResult result = null; try { result = executeDescribeApplications(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeDirectoryConfigsAsync(DescribeDirectoryConfigsRequest request) { return describeDirectoryConfigsAsync(request, null); } @Override public java.util.concurrent.Future describeDirectoryConfigsAsync(final DescribeDirectoryConfigsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeDirectoryConfigsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeDirectoryConfigsResult call() throws Exception { DescribeDirectoryConfigsResult result = null; try { result = executeDescribeDirectoryConfigs(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeEntitlementsAsync(DescribeEntitlementsRequest request) { return describeEntitlementsAsync(request, null); } @Override public java.util.concurrent.Future describeEntitlementsAsync(final DescribeEntitlementsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeEntitlementsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeEntitlementsResult call() throws Exception { DescribeEntitlementsResult result = null; try { result = executeDescribeEntitlements(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeFleetsAsync(DescribeFleetsRequest request) { return describeFleetsAsync(request, null); } @Override public java.util.concurrent.Future describeFleetsAsync(final DescribeFleetsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeFleetsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeFleetsResult call() throws Exception { DescribeFleetsResult result = null; try { result = executeDescribeFleets(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeImageBuildersAsync(DescribeImageBuildersRequest request) { return describeImageBuildersAsync(request, null); } @Override public java.util.concurrent.Future describeImageBuildersAsync(final DescribeImageBuildersRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeImageBuildersRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeImageBuildersResult call() throws Exception { DescribeImageBuildersResult result = null; try { result = executeDescribeImageBuilders(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeImagePermissionsAsync(DescribeImagePermissionsRequest request) { return describeImagePermissionsAsync(request, null); } @Override public java.util.concurrent.Future describeImagePermissionsAsync(final DescribeImagePermissionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeImagePermissionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeImagePermissionsResult call() throws Exception { DescribeImagePermissionsResult result = null; try { result = executeDescribeImagePermissions(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeImagesAsync(DescribeImagesRequest request) { return describeImagesAsync(request, null); } @Override public java.util.concurrent.Future describeImagesAsync(final DescribeImagesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeImagesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeImagesResult call() throws Exception { DescribeImagesResult result = null; try { result = executeDescribeImages(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeSessionsAsync(DescribeSessionsRequest request) { return describeSessionsAsync(request, null); } @Override public java.util.concurrent.Future describeSessionsAsync(final DescribeSessionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeSessionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeSessionsResult call() throws Exception { DescribeSessionsResult result = null; try { result = executeDescribeSessions(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeStacksAsync(DescribeStacksRequest request) { return describeStacksAsync(request, null); } @Override public java.util.concurrent.Future describeStacksAsync(final DescribeStacksRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeStacksRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeStacksResult call() throws Exception { DescribeStacksResult result = null; try { result = executeDescribeStacks(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeUsageReportSubscriptionsAsync( DescribeUsageReportSubscriptionsRequest request) { return describeUsageReportSubscriptionsAsync(request, null); } @Override public java.util.concurrent.Future describeUsageReportSubscriptionsAsync( final DescribeUsageReportSubscriptionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeUsageReportSubscriptionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeUsageReportSubscriptionsResult call() throws Exception { DescribeUsageReportSubscriptionsResult result = null; try { result = executeDescribeUsageReportSubscriptions(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeUserStackAssociationsAsync(DescribeUserStackAssociationsRequest request) { return describeUserStackAssociationsAsync(request, null); } @Override public java.util.concurrent.Future describeUserStackAssociationsAsync( final DescribeUserStackAssociationsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeUserStackAssociationsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeUserStackAssociationsResult call() throws Exception { DescribeUserStackAssociationsResult result = null; try { result = executeDescribeUserStackAssociations(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeUsersAsync(DescribeUsersRequest request) { return describeUsersAsync(request, null); } @Override public java.util.concurrent.Future describeUsersAsync(final DescribeUsersRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeUsersRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeUsersResult call() throws Exception { DescribeUsersResult result = null; try { result = executeDescribeUsers(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future disableUserAsync(DisableUserRequest request) { return disableUserAsync(request, null); } @Override public java.util.concurrent.Future disableUserAsync(final DisableUserRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DisableUserRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DisableUserResult call() throws Exception { DisableUserResult result = null; try { result = executeDisableUser(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future disassociateApplicationFleetAsync(DisassociateApplicationFleetRequest request) { return disassociateApplicationFleetAsync(request, null); } @Override public java.util.concurrent.Future disassociateApplicationFleetAsync(final DisassociateApplicationFleetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DisassociateApplicationFleetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DisassociateApplicationFleetResult call() throws Exception { DisassociateApplicationFleetResult result = null; try { result = executeDisassociateApplicationFleet(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future disassociateApplicationFromEntitlementAsync( DisassociateApplicationFromEntitlementRequest request) { return disassociateApplicationFromEntitlementAsync(request, null); } @Override public java.util.concurrent.Future disassociateApplicationFromEntitlementAsync( final DisassociateApplicationFromEntitlementRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DisassociateApplicationFromEntitlementRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DisassociateApplicationFromEntitlementResult call() throws Exception { DisassociateApplicationFromEntitlementResult result = null; try { result = executeDisassociateApplicationFromEntitlement(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future disassociateFleetAsync(DisassociateFleetRequest request) { return disassociateFleetAsync(request, null); } @Override public java.util.concurrent.Future disassociateFleetAsync(final DisassociateFleetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DisassociateFleetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DisassociateFleetResult call() throws Exception { DisassociateFleetResult result = null; try { result = executeDisassociateFleet(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future enableUserAsync(EnableUserRequest request) { return enableUserAsync(request, null); } @Override public java.util.concurrent.Future enableUserAsync(final EnableUserRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final EnableUserRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public EnableUserResult call() throws Exception { EnableUserResult result = null; try { result = executeEnableUser(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future expireSessionAsync(ExpireSessionRequest request) { return expireSessionAsync(request, null); } @Override public java.util.concurrent.Future expireSessionAsync(final ExpireSessionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ExpireSessionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ExpireSessionResult call() throws Exception { ExpireSessionResult result = null; try { result = executeExpireSession(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listAssociatedFleetsAsync(ListAssociatedFleetsRequest request) { return listAssociatedFleetsAsync(request, null); } @Override public java.util.concurrent.Future listAssociatedFleetsAsync(final ListAssociatedFleetsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListAssociatedFleetsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListAssociatedFleetsResult call() throws Exception { ListAssociatedFleetsResult result = null; try { result = executeListAssociatedFleets(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listAssociatedStacksAsync(ListAssociatedStacksRequest request) { return listAssociatedStacksAsync(request, null); } @Override public java.util.concurrent.Future listAssociatedStacksAsync(final ListAssociatedStacksRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListAssociatedStacksRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListAssociatedStacksResult call() throws Exception { ListAssociatedStacksResult result = null; try { result = executeListAssociatedStacks(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listEntitledApplicationsAsync(ListEntitledApplicationsRequest request) { return listEntitledApplicationsAsync(request, null); } @Override public java.util.concurrent.Future listEntitledApplicationsAsync(final ListEntitledApplicationsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListEntitledApplicationsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListEntitledApplicationsResult call() throws Exception { ListEntitledApplicationsResult result = null; try { result = executeListEntitledApplications(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listTagsForResourceAsync(ListTagsForResourceRequest request) { return listTagsForResourceAsync(request, null); } @Override public java.util.concurrent.Future listTagsForResourceAsync(final ListTagsForResourceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListTagsForResourceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListTagsForResourceResult call() throws Exception { ListTagsForResourceResult result = null; try { result = executeListTagsForResource(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future startFleetAsync(StartFleetRequest request) { return startFleetAsync(request, null); } @Override public java.util.concurrent.Future startFleetAsync(final StartFleetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartFleetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StartFleetResult call() throws Exception { StartFleetResult result = null; try { result = executeStartFleet(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future startImageBuilderAsync(StartImageBuilderRequest request) { return startImageBuilderAsync(request, null); } @Override public java.util.concurrent.Future startImageBuilderAsync(final StartImageBuilderRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartImageBuilderRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StartImageBuilderResult call() throws Exception { StartImageBuilderResult result = null; try { result = executeStartImageBuilder(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future stopFleetAsync(StopFleetRequest request) { return stopFleetAsync(request, null); } @Override public java.util.concurrent.Future stopFleetAsync(final StopFleetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StopFleetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StopFleetResult call() throws Exception { StopFleetResult result = null; try { result = executeStopFleet(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future stopImageBuilderAsync(StopImageBuilderRequest request) { return stopImageBuilderAsync(request, null); } @Override public java.util.concurrent.Future stopImageBuilderAsync(final StopImageBuilderRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StopImageBuilderRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StopImageBuilderResult call() throws Exception { StopImageBuilderResult result = null; try { result = executeStopImageBuilder(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future tagResourceAsync(TagResourceRequest request) { return tagResourceAsync(request, null); } @Override public java.util.concurrent.Future tagResourceAsync(final TagResourceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final TagResourceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public TagResourceResult call() throws Exception { TagResourceResult result = null; try { result = executeTagResource(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future untagResourceAsync(UntagResourceRequest request) { return untagResourceAsync(request, null); } @Override public java.util.concurrent.Future untagResourceAsync(final UntagResourceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UntagResourceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UntagResourceResult call() throws Exception { UntagResourceResult result = null; try { result = executeUntagResource(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateApplicationAsync(UpdateApplicationRequest request) { return updateApplicationAsync(request, null); } @Override public java.util.concurrent.Future updateApplicationAsync(final UpdateApplicationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateApplicationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateApplicationResult call() throws Exception { UpdateApplicationResult result = null; try { result = executeUpdateApplication(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateDirectoryConfigAsync(UpdateDirectoryConfigRequest request) { return updateDirectoryConfigAsync(request, null); } @Override public java.util.concurrent.Future updateDirectoryConfigAsync(final UpdateDirectoryConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateDirectoryConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateDirectoryConfigResult call() throws Exception { UpdateDirectoryConfigResult result = null; try { result = executeUpdateDirectoryConfig(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateEntitlementAsync(UpdateEntitlementRequest request) { return updateEntitlementAsync(request, null); } @Override public java.util.concurrent.Future updateEntitlementAsync(final UpdateEntitlementRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateEntitlementRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateEntitlementResult call() throws Exception { UpdateEntitlementResult result = null; try { result = executeUpdateEntitlement(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateFleetAsync(UpdateFleetRequest request) { return updateFleetAsync(request, null); } @Override public java.util.concurrent.Future updateFleetAsync(final UpdateFleetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateFleetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateFleetResult call() throws Exception { UpdateFleetResult result = null; try { result = executeUpdateFleet(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateImagePermissionsAsync(UpdateImagePermissionsRequest request) { return updateImagePermissionsAsync(request, null); } @Override public java.util.concurrent.Future updateImagePermissionsAsync(final UpdateImagePermissionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateImagePermissionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateImagePermissionsResult call() throws Exception { UpdateImagePermissionsResult result = null; try { result = executeUpdateImagePermissions(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateStackAsync(UpdateStackRequest request) { return updateStackAsync(request, null); } @Override public java.util.concurrent.Future updateStackAsync(final UpdateStackRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateStackRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateStackResult call() throws Exception { UpdateStackResult result = null; try { result = executeUpdateStack(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } /** * 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 * call {@code getExecutorService().shutdown()} followed by {@code getExecutorService().awaitTermination()} prior to * calling this method. */ @Override public void shutdown() { super.shutdown(); executorService.shutdownNow(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy