com.amazonaws.services.private5g.AWSPrivate5GAsyncClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-java-sdk-private5g Show documentation
Show all versions of aws-java-sdk-private5g Show documentation
The AWS Java SDK for AWS Private 5G module holds the client classes that are used for communicating with AWS Private 5G Service
/*
* 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.private5g;
import javax.annotation.Generated;
import com.amazonaws.services.private5g.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import java.util.concurrent.ExecutorService;
/**
* Client for accessing AWS Private 5G 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 Private 5G is a managed service that makes it easy to deploy, operate, and scale your own private
* mobile network at your on-premises location. Private 5G provides the pre-configured hardware and software for mobile
* networks, helps automate setup, and scales capacity on demand to support additional devices as needed.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AWSPrivate5GAsyncClient extends AWSPrivate5GClient implements AWSPrivate5GAsync {
private static final int DEFAULT_THREAD_POOL_SIZE = 50;
private final java.util.concurrent.ExecutorService executorService;
public static AWSPrivate5GAsyncClientBuilder asyncBuilder() {
return AWSPrivate5GAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on AWS Private 5G using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AWSPrivate5GAsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on AWS Private 5G using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AWSPrivate5GAsyncClient(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 acknowledgeOrderReceiptAsync(AcknowledgeOrderReceiptRequest request) {
return acknowledgeOrderReceiptAsync(request, null);
}
@Override
public java.util.concurrent.Future acknowledgeOrderReceiptAsync(final AcknowledgeOrderReceiptRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AcknowledgeOrderReceiptRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AcknowledgeOrderReceiptResult call() throws Exception {
AcknowledgeOrderReceiptResult result = null;
try {
result = executeAcknowledgeOrderReceipt(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 activateDeviceIdentifierAsync(ActivateDeviceIdentifierRequest request) {
return activateDeviceIdentifierAsync(request, null);
}
@Override
public java.util.concurrent.Future activateDeviceIdentifierAsync(final ActivateDeviceIdentifierRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ActivateDeviceIdentifierRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ActivateDeviceIdentifierResult call() throws Exception {
ActivateDeviceIdentifierResult result = null;
try {
result = executeActivateDeviceIdentifier(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 activateNetworkSiteAsync(ActivateNetworkSiteRequest request) {
return activateNetworkSiteAsync(request, null);
}
@Override
public java.util.concurrent.Future activateNetworkSiteAsync(final ActivateNetworkSiteRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ActivateNetworkSiteRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ActivateNetworkSiteResult call() throws Exception {
ActivateNetworkSiteResult result = null;
try {
result = executeActivateNetworkSite(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 configureAccessPointAsync(ConfigureAccessPointRequest request) {
return configureAccessPointAsync(request, null);
}
@Override
public java.util.concurrent.Future configureAccessPointAsync(final ConfigureAccessPointRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ConfigureAccessPointRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ConfigureAccessPointResult call() throws Exception {
ConfigureAccessPointResult result = null;
try {
result = executeConfigureAccessPoint(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 createNetworkAsync(CreateNetworkRequest request) {
return createNetworkAsync(request, null);
}
@Override
public java.util.concurrent.Future createNetworkAsync(final CreateNetworkRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateNetworkRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateNetworkResult call() throws Exception {
CreateNetworkResult result = null;
try {
result = executeCreateNetwork(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 createNetworkSiteAsync(CreateNetworkSiteRequest request) {
return createNetworkSiteAsync(request, null);
}
@Override
public java.util.concurrent.Future createNetworkSiteAsync(final CreateNetworkSiteRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateNetworkSiteRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateNetworkSiteResult call() throws Exception {
CreateNetworkSiteResult result = null;
try {
result = executeCreateNetworkSite(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 deactivateDeviceIdentifierAsync(DeactivateDeviceIdentifierRequest request) {
return deactivateDeviceIdentifierAsync(request, null);
}
@Override
public java.util.concurrent.Future deactivateDeviceIdentifierAsync(final DeactivateDeviceIdentifierRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeactivateDeviceIdentifierRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeactivateDeviceIdentifierResult call() throws Exception {
DeactivateDeviceIdentifierResult result = null;
try {
result = executeDeactivateDeviceIdentifier(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 deleteNetworkAsync(DeleteNetworkRequest request) {
return deleteNetworkAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteNetworkAsync(final DeleteNetworkRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteNetworkRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteNetworkResult call() throws Exception {
DeleteNetworkResult result = null;
try {
result = executeDeleteNetwork(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 deleteNetworkSiteAsync(DeleteNetworkSiteRequest request) {
return deleteNetworkSiteAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteNetworkSiteAsync(final DeleteNetworkSiteRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteNetworkSiteRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteNetworkSiteResult call() throws Exception {
DeleteNetworkSiteResult result = null;
try {
result = executeDeleteNetworkSite(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 getDeviceIdentifierAsync(GetDeviceIdentifierRequest request) {
return getDeviceIdentifierAsync(request, null);
}
@Override
public java.util.concurrent.Future getDeviceIdentifierAsync(final GetDeviceIdentifierRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetDeviceIdentifierRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetDeviceIdentifierResult call() throws Exception {
GetDeviceIdentifierResult result = null;
try {
result = executeGetDeviceIdentifier(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 getNetworkAsync(GetNetworkRequest request) {
return getNetworkAsync(request, null);
}
@Override
public java.util.concurrent.Future getNetworkAsync(final GetNetworkRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetNetworkRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetNetworkResult call() throws Exception {
GetNetworkResult result = null;
try {
result = executeGetNetwork(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 getNetworkResourceAsync(GetNetworkResourceRequest request) {
return getNetworkResourceAsync(request, null);
}
@Override
public java.util.concurrent.Future getNetworkResourceAsync(final GetNetworkResourceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetNetworkResourceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetNetworkResourceResult call() throws Exception {
GetNetworkResourceResult result = null;
try {
result = executeGetNetworkResource(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 getNetworkSiteAsync(GetNetworkSiteRequest request) {
return getNetworkSiteAsync(request, null);
}
@Override
public java.util.concurrent.Future getNetworkSiteAsync(final GetNetworkSiteRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetNetworkSiteRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetNetworkSiteResult call() throws Exception {
GetNetworkSiteResult result = null;
try {
result = executeGetNetworkSite(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 listDeviceIdentifiersAsync(ListDeviceIdentifiersRequest request) {
return listDeviceIdentifiersAsync(request, null);
}
@Override
public java.util.concurrent.Future listDeviceIdentifiersAsync(final ListDeviceIdentifiersRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListDeviceIdentifiersRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListDeviceIdentifiersResult call() throws Exception {
ListDeviceIdentifiersResult result = null;
try {
result = executeListDeviceIdentifiers(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 listNetworkResourcesAsync(ListNetworkResourcesRequest request) {
return listNetworkResourcesAsync(request, null);
}
@Override
public java.util.concurrent.Future listNetworkResourcesAsync(final ListNetworkResourcesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListNetworkResourcesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListNetworkResourcesResult call() throws Exception {
ListNetworkResourcesResult result = null;
try {
result = executeListNetworkResources(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 listNetworkSitesAsync(ListNetworkSitesRequest request) {
return listNetworkSitesAsync(request, null);
}
@Override
public java.util.concurrent.Future listNetworkSitesAsync(final ListNetworkSitesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListNetworkSitesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListNetworkSitesResult call() throws Exception {
ListNetworkSitesResult result = null;
try {
result = executeListNetworkSites(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 listNetworksAsync(ListNetworksRequest request) {
return listNetworksAsync(request, null);
}
@Override
public java.util.concurrent.Future listNetworksAsync(final ListNetworksRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListNetworksRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListNetworksResult call() throws Exception {
ListNetworksResult result = null;
try {
result = executeListNetworks(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 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 pingAsync(PingRequest request) {
return pingAsync(request, null);
}
@Override
public java.util.concurrent.Future pingAsync(final PingRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PingRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PingResult call() throws Exception {
PingResult result = null;
try {
result = executePing(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 startNetworkResourceUpdateAsync(StartNetworkResourceUpdateRequest request) {
return startNetworkResourceUpdateAsync(request, null);
}
@Override
public java.util.concurrent.Future startNetworkResourceUpdateAsync(final StartNetworkResourceUpdateRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartNetworkResourceUpdateRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartNetworkResourceUpdateResult call() throws Exception {
StartNetworkResourceUpdateResult result = null;
try {
result = executeStartNetworkResourceUpdate(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 updateNetworkSiteAsync(UpdateNetworkSiteRequest request) {
return updateNetworkSiteAsync(request, null);
}
@Override
public java.util.concurrent.Future updateNetworkSiteAsync(final UpdateNetworkSiteRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateNetworkSiteRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateNetworkSiteResult call() throws Exception {
UpdateNetworkSiteResult result = null;
try {
result = executeUpdateNetworkSite(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 updateNetworkSitePlanAsync(UpdateNetworkSitePlanRequest request) {
return updateNetworkSitePlanAsync(request, null);
}
@Override
public java.util.concurrent.Future updateNetworkSitePlanAsync(final UpdateNetworkSitePlanRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateNetworkSitePlanRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateNetworkSitePlanResult call() throws Exception {
UpdateNetworkSitePlanResult result = null;
try {
result = executeUpdateNetworkSitePlan(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();
}
}