com.amazonaws.services.panorama.AWSPanoramaAsyncClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-java-sdk-panorama Show documentation
Show all versions of aws-java-sdk-panorama Show documentation
The AWS Java SDK for AWS Panorama module holds the client classes that are used for communicating with AWS Panorama 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.panorama;
import javax.annotation.Generated;
import com.amazonaws.services.panorama.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import java.util.concurrent.ExecutorService;
/**
* Client for accessing Panorama 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.
*
*
* AWS Panorama
*
* Overview
*
*
* This is the AWS Panorama API Reference. For an introduction to the service, see What is AWS Panorama? in the AWS
* Panorama Developer Guide.
*
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AWSPanoramaAsyncClient extends AWSPanoramaClient implements AWSPanoramaAsync {
private static final int DEFAULT_THREAD_POOL_SIZE = 50;
private final java.util.concurrent.ExecutorService executorService;
public static AWSPanoramaAsyncClientBuilder asyncBuilder() {
return AWSPanoramaAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on Panorama using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AWSPanoramaAsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on Panorama using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AWSPanoramaAsyncClient(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 createApplicationInstanceAsync(CreateApplicationInstanceRequest request) {
return createApplicationInstanceAsync(request, null);
}
@Override
public java.util.concurrent.Future createApplicationInstanceAsync(final CreateApplicationInstanceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateApplicationInstanceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateApplicationInstanceResult call() throws Exception {
CreateApplicationInstanceResult result = null;
try {
result = executeCreateApplicationInstance(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 createJobForDevicesAsync(CreateJobForDevicesRequest request) {
return createJobForDevicesAsync(request, null);
}
@Override
public java.util.concurrent.Future createJobForDevicesAsync(final CreateJobForDevicesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateJobForDevicesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateJobForDevicesResult call() throws Exception {
CreateJobForDevicesResult result = null;
try {
result = executeCreateJobForDevices(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 createNodeFromTemplateJobAsync(CreateNodeFromTemplateJobRequest request) {
return createNodeFromTemplateJobAsync(request, null);
}
@Override
public java.util.concurrent.Future createNodeFromTemplateJobAsync(final CreateNodeFromTemplateJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateNodeFromTemplateJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateNodeFromTemplateJobResult call() throws Exception {
CreateNodeFromTemplateJobResult result = null;
try {
result = executeCreateNodeFromTemplateJob(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 createPackageAsync(CreatePackageRequest request) {
return createPackageAsync(request, null);
}
@Override
public java.util.concurrent.Future createPackageAsync(final CreatePackageRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreatePackageRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreatePackageResult call() throws Exception {
CreatePackageResult result = null;
try {
result = executeCreatePackage(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 createPackageImportJobAsync(CreatePackageImportJobRequest request) {
return createPackageImportJobAsync(request, null);
}
@Override
public java.util.concurrent.Future createPackageImportJobAsync(final CreatePackageImportJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreatePackageImportJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreatePackageImportJobResult call() throws Exception {
CreatePackageImportJobResult result = null;
try {
result = executeCreatePackageImportJob(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 deleteDeviceAsync(DeleteDeviceRequest request) {
return deleteDeviceAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteDeviceAsync(final DeleteDeviceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteDeviceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteDeviceResult call() throws Exception {
DeleteDeviceResult result = null;
try {
result = executeDeleteDevice(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 deletePackageAsync(DeletePackageRequest request) {
return deletePackageAsync(request, null);
}
@Override
public java.util.concurrent.Future deletePackageAsync(final DeletePackageRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeletePackageRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeletePackageResult call() throws Exception {
DeletePackageResult result = null;
try {
result = executeDeletePackage(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 deregisterPackageVersionAsync(DeregisterPackageVersionRequest request) {
return deregisterPackageVersionAsync(request, null);
}
@Override
public java.util.concurrent.Future deregisterPackageVersionAsync(final DeregisterPackageVersionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeregisterPackageVersionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeregisterPackageVersionResult call() throws Exception {
DeregisterPackageVersionResult result = null;
try {
result = executeDeregisterPackageVersion(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 describeApplicationInstanceAsync(DescribeApplicationInstanceRequest request) {
return describeApplicationInstanceAsync(request, null);
}
@Override
public java.util.concurrent.Future describeApplicationInstanceAsync(final DescribeApplicationInstanceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeApplicationInstanceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeApplicationInstanceResult call() throws Exception {
DescribeApplicationInstanceResult result = null;
try {
result = executeDescribeApplicationInstance(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 describeApplicationInstanceDetailsAsync(
DescribeApplicationInstanceDetailsRequest request) {
return describeApplicationInstanceDetailsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeApplicationInstanceDetailsAsync(
final DescribeApplicationInstanceDetailsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeApplicationInstanceDetailsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeApplicationInstanceDetailsResult call() throws Exception {
DescribeApplicationInstanceDetailsResult result = null;
try {
result = executeDescribeApplicationInstanceDetails(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 describeDeviceAsync(DescribeDeviceRequest request) {
return describeDeviceAsync(request, null);
}
@Override
public java.util.concurrent.Future describeDeviceAsync(final DescribeDeviceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeDeviceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeDeviceResult call() throws Exception {
DescribeDeviceResult result = null;
try {
result = executeDescribeDevice(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 describeDeviceJobAsync(DescribeDeviceJobRequest request) {
return describeDeviceJobAsync(request, null);
}
@Override
public java.util.concurrent.Future describeDeviceJobAsync(final DescribeDeviceJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeDeviceJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeDeviceJobResult call() throws Exception {
DescribeDeviceJobResult result = null;
try {
result = executeDescribeDeviceJob(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 describeNodeAsync(DescribeNodeRequest request) {
return describeNodeAsync(request, null);
}
@Override
public java.util.concurrent.Future describeNodeAsync(final DescribeNodeRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeNodeRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeNodeResult call() throws Exception {
DescribeNodeResult result = null;
try {
result = executeDescribeNode(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 describeNodeFromTemplateJobAsync(DescribeNodeFromTemplateJobRequest request) {
return describeNodeFromTemplateJobAsync(request, null);
}
@Override
public java.util.concurrent.Future describeNodeFromTemplateJobAsync(final DescribeNodeFromTemplateJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeNodeFromTemplateJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeNodeFromTemplateJobResult call() throws Exception {
DescribeNodeFromTemplateJobResult result = null;
try {
result = executeDescribeNodeFromTemplateJob(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 describePackageAsync(DescribePackageRequest request) {
return describePackageAsync(request, null);
}
@Override
public java.util.concurrent.Future describePackageAsync(final DescribePackageRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribePackageRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribePackageResult call() throws Exception {
DescribePackageResult result = null;
try {
result = executeDescribePackage(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 describePackageImportJobAsync(DescribePackageImportJobRequest request) {
return describePackageImportJobAsync(request, null);
}
@Override
public java.util.concurrent.Future describePackageImportJobAsync(final DescribePackageImportJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribePackageImportJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribePackageImportJobResult call() throws Exception {
DescribePackageImportJobResult result = null;
try {
result = executeDescribePackageImportJob(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 describePackageVersionAsync(DescribePackageVersionRequest request) {
return describePackageVersionAsync(request, null);
}
@Override
public java.util.concurrent.Future describePackageVersionAsync(final DescribePackageVersionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribePackageVersionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribePackageVersionResult call() throws Exception {
DescribePackageVersionResult result = null;
try {
result = executeDescribePackageVersion(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 listApplicationInstanceDependenciesAsync(
ListApplicationInstanceDependenciesRequest request) {
return listApplicationInstanceDependenciesAsync(request, null);
}
@Override
public java.util.concurrent.Future listApplicationInstanceDependenciesAsync(
final ListApplicationInstanceDependenciesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListApplicationInstanceDependenciesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListApplicationInstanceDependenciesResult call() throws Exception {
ListApplicationInstanceDependenciesResult result = null;
try {
result = executeListApplicationInstanceDependencies(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 listApplicationInstanceNodeInstancesAsync(
ListApplicationInstanceNodeInstancesRequest request) {
return listApplicationInstanceNodeInstancesAsync(request, null);
}
@Override
public java.util.concurrent.Future listApplicationInstanceNodeInstancesAsync(
final ListApplicationInstanceNodeInstancesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListApplicationInstanceNodeInstancesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListApplicationInstanceNodeInstancesResult call() throws Exception {
ListApplicationInstanceNodeInstancesResult result = null;
try {
result = executeListApplicationInstanceNodeInstances(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 listApplicationInstancesAsync(ListApplicationInstancesRequest request) {
return listApplicationInstancesAsync(request, null);
}
@Override
public java.util.concurrent.Future listApplicationInstancesAsync(final ListApplicationInstancesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListApplicationInstancesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListApplicationInstancesResult call() throws Exception {
ListApplicationInstancesResult result = null;
try {
result = executeListApplicationInstances(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 listDevicesAsync(ListDevicesRequest request) {
return listDevicesAsync(request, null);
}
@Override
public java.util.concurrent.Future listDevicesAsync(final ListDevicesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListDevicesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListDevicesResult call() throws Exception {
ListDevicesResult result = null;
try {
result = executeListDevices(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 listDevicesJobsAsync(ListDevicesJobsRequest request) {
return listDevicesJobsAsync(request, null);
}
@Override
public java.util.concurrent.Future listDevicesJobsAsync(final ListDevicesJobsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListDevicesJobsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListDevicesJobsResult call() throws Exception {
ListDevicesJobsResult result = null;
try {
result = executeListDevicesJobs(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 listNodeFromTemplateJobsAsync(ListNodeFromTemplateJobsRequest request) {
return listNodeFromTemplateJobsAsync(request, null);
}
@Override
public java.util.concurrent.Future listNodeFromTemplateJobsAsync(final ListNodeFromTemplateJobsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListNodeFromTemplateJobsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListNodeFromTemplateJobsResult call() throws Exception {
ListNodeFromTemplateJobsResult result = null;
try {
result = executeListNodeFromTemplateJobs(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 listNodesAsync(ListNodesRequest request) {
return listNodesAsync(request, null);
}
@Override
public java.util.concurrent.Future listNodesAsync(final ListNodesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListNodesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListNodesResult call() throws Exception {
ListNodesResult result = null;
try {
result = executeListNodes(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 listPackageImportJobsAsync(ListPackageImportJobsRequest request) {
return listPackageImportJobsAsync(request, null);
}
@Override
public java.util.concurrent.Future listPackageImportJobsAsync(final ListPackageImportJobsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListPackageImportJobsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListPackageImportJobsResult call() throws Exception {
ListPackageImportJobsResult result = null;
try {
result = executeListPackageImportJobs(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 listPackagesAsync(ListPackagesRequest request) {
return listPackagesAsync(request, null);
}
@Override
public java.util.concurrent.Future listPackagesAsync(final ListPackagesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListPackagesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListPackagesResult call() throws Exception {
ListPackagesResult result = null;
try {
result = executeListPackages(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 provisionDeviceAsync(ProvisionDeviceRequest request) {
return provisionDeviceAsync(request, null);
}
@Override
public java.util.concurrent.Future provisionDeviceAsync(final ProvisionDeviceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ProvisionDeviceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ProvisionDeviceResult call() throws Exception {
ProvisionDeviceResult result = null;
try {
result = executeProvisionDevice(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 registerPackageVersionAsync(RegisterPackageVersionRequest request) {
return registerPackageVersionAsync(request, null);
}
@Override
public java.util.concurrent.Future registerPackageVersionAsync(final RegisterPackageVersionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final RegisterPackageVersionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public RegisterPackageVersionResult call() throws Exception {
RegisterPackageVersionResult result = null;
try {
result = executeRegisterPackageVersion(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 removeApplicationInstanceAsync(RemoveApplicationInstanceRequest request) {
return removeApplicationInstanceAsync(request, null);
}
@Override
public java.util.concurrent.Future removeApplicationInstanceAsync(final RemoveApplicationInstanceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final RemoveApplicationInstanceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public RemoveApplicationInstanceResult call() throws Exception {
RemoveApplicationInstanceResult result = null;
try {
result = executeRemoveApplicationInstance(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 signalApplicationInstanceNodeInstancesAsync(
SignalApplicationInstanceNodeInstancesRequest request) {
return signalApplicationInstanceNodeInstancesAsync(request, null);
}
@Override
public java.util.concurrent.Future signalApplicationInstanceNodeInstancesAsync(
final SignalApplicationInstanceNodeInstancesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final SignalApplicationInstanceNodeInstancesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public SignalApplicationInstanceNodeInstancesResult call() throws Exception {
SignalApplicationInstanceNodeInstancesResult result = null;
try {
result = executeSignalApplicationInstanceNodeInstances(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 updateDeviceMetadataAsync(UpdateDeviceMetadataRequest request) {
return updateDeviceMetadataAsync(request, null);
}
@Override
public java.util.concurrent.Future updateDeviceMetadataAsync(final UpdateDeviceMetadataRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateDeviceMetadataRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateDeviceMetadataResult call() throws Exception {
UpdateDeviceMetadataResult result = null;
try {
result = executeUpdateDeviceMetadata(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 - 2024 Weber Informatics LLC | Privacy Policy