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

com.amazonaws.services.apptest.AWSAppTestAsyncClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Mainframe Modernization Application Testing module holds the client classes that are used for communicating with AWS Mainframe Modernization Application Testing Service

There is a newer version: 1.12.778
Show 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.apptest;

import javax.annotation.Generated;

import com.amazonaws.services.apptest.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;

import java.util.concurrent.ExecutorService;

/**
 * Client for accessing AWS Mainframe Modernization Application Testing 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 Mainframe Modernization Application Testing provides tools and resources for automated functional equivalence * testing for your migration projects. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSAppTestAsyncClient extends AWSAppTestClient implements AWSAppTestAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; public static AWSAppTestAsyncClientBuilder asyncBuilder() { return AWSAppTestAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on AWS Mainframe Modernization Application Testing * using the specified parameters. * * @param asyncClientParams * Object providing client parameters. */ AWSAppTestAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on AWS Mainframe Modernization Application Testing * using the specified parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AWSAppTestAsyncClient(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 createTestCaseAsync(CreateTestCaseRequest request) { return createTestCaseAsync(request, null); } @Override public java.util.concurrent.Future createTestCaseAsync(final CreateTestCaseRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateTestCaseRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateTestCaseResult call() throws Exception { CreateTestCaseResult result = null; try { result = executeCreateTestCase(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 createTestConfigurationAsync(CreateTestConfigurationRequest request) { return createTestConfigurationAsync(request, null); } @Override public java.util.concurrent.Future createTestConfigurationAsync(final CreateTestConfigurationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateTestConfigurationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateTestConfigurationResult call() throws Exception { CreateTestConfigurationResult result = null; try { result = executeCreateTestConfiguration(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 createTestSuiteAsync(CreateTestSuiteRequest request) { return createTestSuiteAsync(request, null); } @Override public java.util.concurrent.Future createTestSuiteAsync(final CreateTestSuiteRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateTestSuiteRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateTestSuiteResult call() throws Exception { CreateTestSuiteResult result = null; try { result = executeCreateTestSuite(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 deleteTestCaseAsync(DeleteTestCaseRequest request) { return deleteTestCaseAsync(request, null); } @Override public java.util.concurrent.Future deleteTestCaseAsync(final DeleteTestCaseRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteTestCaseRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteTestCaseResult call() throws Exception { DeleteTestCaseResult result = null; try { result = executeDeleteTestCase(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 deleteTestConfigurationAsync(DeleteTestConfigurationRequest request) { return deleteTestConfigurationAsync(request, null); } @Override public java.util.concurrent.Future deleteTestConfigurationAsync(final DeleteTestConfigurationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteTestConfigurationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteTestConfigurationResult call() throws Exception { DeleteTestConfigurationResult result = null; try { result = executeDeleteTestConfiguration(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 deleteTestRunAsync(DeleteTestRunRequest request) { return deleteTestRunAsync(request, null); } @Override public java.util.concurrent.Future deleteTestRunAsync(final DeleteTestRunRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteTestRunRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteTestRunResult call() throws Exception { DeleteTestRunResult result = null; try { result = executeDeleteTestRun(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 deleteTestSuiteAsync(DeleteTestSuiteRequest request) { return deleteTestSuiteAsync(request, null); } @Override public java.util.concurrent.Future deleteTestSuiteAsync(final DeleteTestSuiteRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteTestSuiteRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteTestSuiteResult call() throws Exception { DeleteTestSuiteResult result = null; try { result = executeDeleteTestSuite(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 getTestCaseAsync(GetTestCaseRequest request) { return getTestCaseAsync(request, null); } @Override public java.util.concurrent.Future getTestCaseAsync(final GetTestCaseRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetTestCaseRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetTestCaseResult call() throws Exception { GetTestCaseResult result = null; try { result = executeGetTestCase(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 getTestConfigurationAsync(GetTestConfigurationRequest request) { return getTestConfigurationAsync(request, null); } @Override public java.util.concurrent.Future getTestConfigurationAsync(final GetTestConfigurationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetTestConfigurationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetTestConfigurationResult call() throws Exception { GetTestConfigurationResult result = null; try { result = executeGetTestConfiguration(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 getTestRunStepAsync(GetTestRunStepRequest request) { return getTestRunStepAsync(request, null); } @Override public java.util.concurrent.Future getTestRunStepAsync(final GetTestRunStepRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetTestRunStepRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetTestRunStepResult call() throws Exception { GetTestRunStepResult result = null; try { result = executeGetTestRunStep(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 getTestSuiteAsync(GetTestSuiteRequest request) { return getTestSuiteAsync(request, null); } @Override public java.util.concurrent.Future getTestSuiteAsync(final GetTestSuiteRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetTestSuiteRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetTestSuiteResult call() throws Exception { GetTestSuiteResult result = null; try { result = executeGetTestSuite(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 listTestCasesAsync(ListTestCasesRequest request) { return listTestCasesAsync(request, null); } @Override public java.util.concurrent.Future listTestCasesAsync(final ListTestCasesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListTestCasesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListTestCasesResult call() throws Exception { ListTestCasesResult result = null; try { result = executeListTestCases(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 listTestConfigurationsAsync(ListTestConfigurationsRequest request) { return listTestConfigurationsAsync(request, null); } @Override public java.util.concurrent.Future listTestConfigurationsAsync(final ListTestConfigurationsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListTestConfigurationsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListTestConfigurationsResult call() throws Exception { ListTestConfigurationsResult result = null; try { result = executeListTestConfigurations(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 listTestRunStepsAsync(ListTestRunStepsRequest request) { return listTestRunStepsAsync(request, null); } @Override public java.util.concurrent.Future listTestRunStepsAsync(final ListTestRunStepsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListTestRunStepsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListTestRunStepsResult call() throws Exception { ListTestRunStepsResult result = null; try { result = executeListTestRunSteps(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 listTestRunTestCasesAsync(ListTestRunTestCasesRequest request) { return listTestRunTestCasesAsync(request, null); } @Override public java.util.concurrent.Future listTestRunTestCasesAsync(final ListTestRunTestCasesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListTestRunTestCasesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListTestRunTestCasesResult call() throws Exception { ListTestRunTestCasesResult result = null; try { result = executeListTestRunTestCases(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 listTestRunsAsync(ListTestRunsRequest request) { return listTestRunsAsync(request, null); } @Override public java.util.concurrent.Future listTestRunsAsync(final ListTestRunsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListTestRunsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListTestRunsResult call() throws Exception { ListTestRunsResult result = null; try { result = executeListTestRuns(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 listTestSuitesAsync(ListTestSuitesRequest request) { return listTestSuitesAsync(request, null); } @Override public java.util.concurrent.Future listTestSuitesAsync(final ListTestSuitesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListTestSuitesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListTestSuitesResult call() throws Exception { ListTestSuitesResult result = null; try { result = executeListTestSuites(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 startTestRunAsync(StartTestRunRequest request) { return startTestRunAsync(request, null); } @Override public java.util.concurrent.Future startTestRunAsync(final StartTestRunRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartTestRunRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StartTestRunResult call() throws Exception { StartTestRunResult result = null; try { result = executeStartTestRun(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 updateTestCaseAsync(UpdateTestCaseRequest request) { return updateTestCaseAsync(request, null); } @Override public java.util.concurrent.Future updateTestCaseAsync(final UpdateTestCaseRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateTestCaseRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateTestCaseResult call() throws Exception { UpdateTestCaseResult result = null; try { result = executeUpdateTestCase(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 updateTestConfigurationAsync(UpdateTestConfigurationRequest request) { return updateTestConfigurationAsync(request, null); } @Override public java.util.concurrent.Future updateTestConfigurationAsync(final UpdateTestConfigurationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateTestConfigurationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateTestConfigurationResult call() throws Exception { UpdateTestConfigurationResult result = null; try { result = executeUpdateTestConfiguration(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 updateTestSuiteAsync(UpdateTestSuiteRequest request) { return updateTestSuiteAsync(request, null); } @Override public java.util.concurrent.Future updateTestSuiteAsync(final UpdateTestSuiteRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateTestSuiteRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateTestSuiteResult call() throws Exception { UpdateTestSuiteResult result = null; try { result = executeUpdateTestSuite(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