com.amazonaws.services.outposts.AWSOutpostsAsyncClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-java-sdk-outposts Show documentation
Show all versions of aws-java-sdk-outposts Show documentation
The AWS Java SDK for AWS Outposts module holds the client classes that are used for communicating with AWS Outposts Service
The newest version!
/*
* Copyright 2019-2024 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.outposts;
import javax.annotation.Generated;
import com.amazonaws.services.outposts.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import java.util.concurrent.ExecutorService;
/**
* Client for accessing Outposts 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 Web Services Outposts is a fully managed service that extends Amazon Web Services infrastructure, APIs, and
* tools to customer premises. By providing local access to Amazon Web Services managed infrastructure, Amazon Web
* Services Outposts enables customers to build and run applications on premises using the same programming interfaces
* as in Amazon Web Services Regions, while using local compute and storage resources for lower latency and local data
* processing needs.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AWSOutpostsAsyncClient extends AWSOutpostsClient implements AWSOutpostsAsync {
private static final int DEFAULT_THREAD_POOL_SIZE = 50;
private final java.util.concurrent.ExecutorService executorService;
public static AWSOutpostsAsyncClientBuilder asyncBuilder() {
return AWSOutpostsAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on Outposts using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AWSOutpostsAsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on Outposts using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AWSOutpostsAsyncClient(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 cancelCapacityTaskAsync(CancelCapacityTaskRequest request) {
return cancelCapacityTaskAsync(request, null);
}
@Override
public java.util.concurrent.Future cancelCapacityTaskAsync(final CancelCapacityTaskRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CancelCapacityTaskRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CancelCapacityTaskResult call() throws Exception {
CancelCapacityTaskResult result = null;
try {
result = executeCancelCapacityTask(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 cancelOrderAsync(CancelOrderRequest request) {
return cancelOrderAsync(request, null);
}
@Override
public java.util.concurrent.Future cancelOrderAsync(final CancelOrderRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CancelOrderRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CancelOrderResult call() throws Exception {
CancelOrderResult result = null;
try {
result = executeCancelOrder(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 createOrderAsync(CreateOrderRequest request) {
return createOrderAsync(request, null);
}
@Override
public java.util.concurrent.Future createOrderAsync(final CreateOrderRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateOrderRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateOrderResult call() throws Exception {
CreateOrderResult result = null;
try {
result = executeCreateOrder(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 createOutpostAsync(CreateOutpostRequest request) {
return createOutpostAsync(request, null);
}
@Override
public java.util.concurrent.Future createOutpostAsync(final CreateOutpostRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateOutpostRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateOutpostResult call() throws Exception {
CreateOutpostResult result = null;
try {
result = executeCreateOutpost(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 createSiteAsync(CreateSiteRequest request) {
return createSiteAsync(request, null);
}
@Override
public java.util.concurrent.Future createSiteAsync(final CreateSiteRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateSiteRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateSiteResult call() throws Exception {
CreateSiteResult result = null;
try {
result = executeCreateSite(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 deleteOutpostAsync(DeleteOutpostRequest request) {
return deleteOutpostAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteOutpostAsync(final DeleteOutpostRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteOutpostRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteOutpostResult call() throws Exception {
DeleteOutpostResult result = null;
try {
result = executeDeleteOutpost(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 deleteSiteAsync(DeleteSiteRequest request) {
return deleteSiteAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteSiteAsync(final DeleteSiteRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteSiteRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteSiteResult call() throws Exception {
DeleteSiteResult result = null;
try {
result = executeDeleteSite(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 getCapacityTaskAsync(GetCapacityTaskRequest request) {
return getCapacityTaskAsync(request, null);
}
@Override
public java.util.concurrent.Future getCapacityTaskAsync(final GetCapacityTaskRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetCapacityTaskRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetCapacityTaskResult call() throws Exception {
GetCapacityTaskResult result = null;
try {
result = executeGetCapacityTask(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 getCatalogItemAsync(GetCatalogItemRequest request) {
return getCatalogItemAsync(request, null);
}
@Override
public java.util.concurrent.Future getCatalogItemAsync(final GetCatalogItemRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetCatalogItemRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetCatalogItemResult call() throws Exception {
GetCatalogItemResult result = null;
try {
result = executeGetCatalogItem(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 getConnectionAsync(GetConnectionRequest request) {
return getConnectionAsync(request, null);
}
@Override
public java.util.concurrent.Future getConnectionAsync(final GetConnectionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetConnectionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetConnectionResult call() throws Exception {
GetConnectionResult result = null;
try {
result = executeGetConnection(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 getOrderAsync(GetOrderRequest request) {
return getOrderAsync(request, null);
}
@Override
public java.util.concurrent.Future getOrderAsync(final GetOrderRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetOrderRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetOrderResult call() throws Exception {
GetOrderResult result = null;
try {
result = executeGetOrder(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 getOutpostAsync(GetOutpostRequest request) {
return getOutpostAsync(request, null);
}
@Override
public java.util.concurrent.Future getOutpostAsync(final GetOutpostRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetOutpostRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetOutpostResult call() throws Exception {
GetOutpostResult result = null;
try {
result = executeGetOutpost(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 getOutpostInstanceTypesAsync(GetOutpostInstanceTypesRequest request) {
return getOutpostInstanceTypesAsync(request, null);
}
@Override
public java.util.concurrent.Future getOutpostInstanceTypesAsync(final GetOutpostInstanceTypesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetOutpostInstanceTypesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetOutpostInstanceTypesResult call() throws Exception {
GetOutpostInstanceTypesResult result = null;
try {
result = executeGetOutpostInstanceTypes(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 getOutpostSupportedInstanceTypesAsync(
GetOutpostSupportedInstanceTypesRequest request) {
return getOutpostSupportedInstanceTypesAsync(request, null);
}
@Override
public java.util.concurrent.Future getOutpostSupportedInstanceTypesAsync(
final GetOutpostSupportedInstanceTypesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetOutpostSupportedInstanceTypesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetOutpostSupportedInstanceTypesResult call() throws Exception {
GetOutpostSupportedInstanceTypesResult result = null;
try {
result = executeGetOutpostSupportedInstanceTypes(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 getSiteAsync(GetSiteRequest request) {
return getSiteAsync(request, null);
}
@Override
public java.util.concurrent.Future getSiteAsync(final GetSiteRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetSiteRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetSiteResult call() throws Exception {
GetSiteResult result = null;
try {
result = executeGetSite(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 getSiteAddressAsync(GetSiteAddressRequest request) {
return getSiteAddressAsync(request, null);
}
@Override
public java.util.concurrent.Future getSiteAddressAsync(final GetSiteAddressRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetSiteAddressRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetSiteAddressResult call() throws Exception {
GetSiteAddressResult result = null;
try {
result = executeGetSiteAddress(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 listAssetsAsync(ListAssetsRequest request) {
return listAssetsAsync(request, null);
}
@Override
public java.util.concurrent.Future listAssetsAsync(final ListAssetsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListAssetsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListAssetsResult call() throws Exception {
ListAssetsResult result = null;
try {
result = executeListAssets(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 listCapacityTasksAsync(ListCapacityTasksRequest request) {
return listCapacityTasksAsync(request, null);
}
@Override
public java.util.concurrent.Future listCapacityTasksAsync(final ListCapacityTasksRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListCapacityTasksRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListCapacityTasksResult call() throws Exception {
ListCapacityTasksResult result = null;
try {
result = executeListCapacityTasks(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 listCatalogItemsAsync(ListCatalogItemsRequest request) {
return listCatalogItemsAsync(request, null);
}
@Override
public java.util.concurrent.Future listCatalogItemsAsync(final ListCatalogItemsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListCatalogItemsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListCatalogItemsResult call() throws Exception {
ListCatalogItemsResult result = null;
try {
result = executeListCatalogItems(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 listOrdersAsync(ListOrdersRequest request) {
return listOrdersAsync(request, null);
}
@Override
public java.util.concurrent.Future listOrdersAsync(final ListOrdersRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListOrdersRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListOrdersResult call() throws Exception {
ListOrdersResult result = null;
try {
result = executeListOrders(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 listOutpostsAsync(ListOutpostsRequest request) {
return listOutpostsAsync(request, null);
}
@Override
public java.util.concurrent.Future listOutpostsAsync(final ListOutpostsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListOutpostsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListOutpostsResult call() throws Exception {
ListOutpostsResult result = null;
try {
result = executeListOutposts(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 listSitesAsync(ListSitesRequest request) {
return listSitesAsync(request, null);
}
@Override
public java.util.concurrent.Future listSitesAsync(final ListSitesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListSitesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListSitesResult call() throws Exception {
ListSitesResult result = null;
try {
result = executeListSites(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 startCapacityTaskAsync(StartCapacityTaskRequest request) {
return startCapacityTaskAsync(request, null);
}
@Override
public java.util.concurrent.Future startCapacityTaskAsync(final StartCapacityTaskRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartCapacityTaskRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartCapacityTaskResult call() throws Exception {
StartCapacityTaskResult result = null;
try {
result = executeStartCapacityTask(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 startConnectionAsync(StartConnectionRequest request) {
return startConnectionAsync(request, null);
}
@Override
public java.util.concurrent.Future startConnectionAsync(final StartConnectionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartConnectionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartConnectionResult call() throws Exception {
StartConnectionResult result = null;
try {
result = executeStartConnection(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 updateOutpostAsync(UpdateOutpostRequest request) {
return updateOutpostAsync(request, null);
}
@Override
public java.util.concurrent.Future updateOutpostAsync(final UpdateOutpostRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateOutpostRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateOutpostResult call() throws Exception {
UpdateOutpostResult result = null;
try {
result = executeUpdateOutpost(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 updateSiteAsync(UpdateSiteRequest request) {
return updateSiteAsync(request, null);
}
@Override
public java.util.concurrent.Future updateSiteAsync(final UpdateSiteRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateSiteRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateSiteResult call() throws Exception {
UpdateSiteResult result = null;
try {
result = executeUpdateSite(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 updateSiteAddressAsync(UpdateSiteAddressRequest request) {
return updateSiteAddressAsync(request, null);
}
@Override
public java.util.concurrent.Future updateSiteAddressAsync(final UpdateSiteAddressRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateSiteAddressRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateSiteAddressResult call() throws Exception {
UpdateSiteAddressResult result = null;
try {
result = executeUpdateSiteAddress(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 updateSiteRackPhysicalPropertiesAsync(
UpdateSiteRackPhysicalPropertiesRequest request) {
return updateSiteRackPhysicalPropertiesAsync(request, null);
}
@Override
public java.util.concurrent.Future updateSiteRackPhysicalPropertiesAsync(
final UpdateSiteRackPhysicalPropertiesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateSiteRackPhysicalPropertiesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateSiteRackPhysicalPropertiesResult call() throws Exception {
UpdateSiteRackPhysicalPropertiesResult result = null;
try {
result = executeUpdateSiteRackPhysicalProperties(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