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

com.amazonaws.services.transcribe.AmazonTranscribeAsyncClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Transcribe module holds the client classes that are used for communicating with Amazon Transcribe 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.transcribe;

import javax.annotation.Generated;

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

import java.util.concurrent.ExecutorService;

/**
 * Client for accessing Amazon Transcribe Service 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 Transcribe offers three main types of batch transcription: Standard, Medical, and Call * Analytics. *

*
    *
  • *

    * Standard transcriptions are the most common option. Refer to for details. *

    *
  • *
  • *

    * Medical transcriptions are tailored to medical professionals and incorporate medical terms. A common use case * for this service is transcribing doctor-patient dialogue into after-visit notes. Refer to for details. *

    *
  • *
  • *

    * Call Analytics transcriptions are designed for use with call center audio on two different channels; if you're * looking for insight into customer service calls, use this option. Refer to for details. *

    *
  • *
*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AmazonTranscribeAsyncClient extends AmazonTranscribeClient implements AmazonTranscribeAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; public static AmazonTranscribeAsyncClientBuilder asyncBuilder() { return AmazonTranscribeAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on Amazon Transcribe Service using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. */ AmazonTranscribeAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on Amazon Transcribe Service using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AmazonTranscribeAsyncClient(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 createCallAnalyticsCategoryAsync(CreateCallAnalyticsCategoryRequest request) { return createCallAnalyticsCategoryAsync(request, null); } @Override public java.util.concurrent.Future createCallAnalyticsCategoryAsync(final CreateCallAnalyticsCategoryRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateCallAnalyticsCategoryRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateCallAnalyticsCategoryResult call() throws Exception { CreateCallAnalyticsCategoryResult result = null; try { result = executeCreateCallAnalyticsCategory(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 createLanguageModelAsync(CreateLanguageModelRequest request) { return createLanguageModelAsync(request, null); } @Override public java.util.concurrent.Future createLanguageModelAsync(final CreateLanguageModelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateLanguageModelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateLanguageModelResult call() throws Exception { CreateLanguageModelResult result = null; try { result = executeCreateLanguageModel(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 createMedicalVocabularyAsync(CreateMedicalVocabularyRequest request) { return createMedicalVocabularyAsync(request, null); } @Override public java.util.concurrent.Future createMedicalVocabularyAsync(final CreateMedicalVocabularyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateMedicalVocabularyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateMedicalVocabularyResult call() throws Exception { CreateMedicalVocabularyResult result = null; try { result = executeCreateMedicalVocabulary(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 createVocabularyAsync(CreateVocabularyRequest request) { return createVocabularyAsync(request, null); } @Override public java.util.concurrent.Future createVocabularyAsync(final CreateVocabularyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateVocabularyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateVocabularyResult call() throws Exception { CreateVocabularyResult result = null; try { result = executeCreateVocabulary(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 createVocabularyFilterAsync(CreateVocabularyFilterRequest request) { return createVocabularyFilterAsync(request, null); } @Override public java.util.concurrent.Future createVocabularyFilterAsync(final CreateVocabularyFilterRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateVocabularyFilterRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateVocabularyFilterResult call() throws Exception { CreateVocabularyFilterResult result = null; try { result = executeCreateVocabularyFilter(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 deleteCallAnalyticsCategoryAsync(DeleteCallAnalyticsCategoryRequest request) { return deleteCallAnalyticsCategoryAsync(request, null); } @Override public java.util.concurrent.Future deleteCallAnalyticsCategoryAsync(final DeleteCallAnalyticsCategoryRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteCallAnalyticsCategoryRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteCallAnalyticsCategoryResult call() throws Exception { DeleteCallAnalyticsCategoryResult result = null; try { result = executeDeleteCallAnalyticsCategory(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 deleteCallAnalyticsJobAsync(DeleteCallAnalyticsJobRequest request) { return deleteCallAnalyticsJobAsync(request, null); } @Override public java.util.concurrent.Future deleteCallAnalyticsJobAsync(final DeleteCallAnalyticsJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteCallAnalyticsJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteCallAnalyticsJobResult call() throws Exception { DeleteCallAnalyticsJobResult result = null; try { result = executeDeleteCallAnalyticsJob(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 deleteLanguageModelAsync(DeleteLanguageModelRequest request) { return deleteLanguageModelAsync(request, null); } @Override public java.util.concurrent.Future deleteLanguageModelAsync(final DeleteLanguageModelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteLanguageModelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteLanguageModelResult call() throws Exception { DeleteLanguageModelResult result = null; try { result = executeDeleteLanguageModel(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 deleteMedicalScribeJobAsync(DeleteMedicalScribeJobRequest request) { return deleteMedicalScribeJobAsync(request, null); } @Override public java.util.concurrent.Future deleteMedicalScribeJobAsync(final DeleteMedicalScribeJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteMedicalScribeJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteMedicalScribeJobResult call() throws Exception { DeleteMedicalScribeJobResult result = null; try { result = executeDeleteMedicalScribeJob(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 deleteMedicalTranscriptionJobAsync(DeleteMedicalTranscriptionJobRequest request) { return deleteMedicalTranscriptionJobAsync(request, null); } @Override public java.util.concurrent.Future deleteMedicalTranscriptionJobAsync( final DeleteMedicalTranscriptionJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteMedicalTranscriptionJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteMedicalTranscriptionJobResult call() throws Exception { DeleteMedicalTranscriptionJobResult result = null; try { result = executeDeleteMedicalTranscriptionJob(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 deleteMedicalVocabularyAsync(DeleteMedicalVocabularyRequest request) { return deleteMedicalVocabularyAsync(request, null); } @Override public java.util.concurrent.Future deleteMedicalVocabularyAsync(final DeleteMedicalVocabularyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteMedicalVocabularyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteMedicalVocabularyResult call() throws Exception { DeleteMedicalVocabularyResult result = null; try { result = executeDeleteMedicalVocabulary(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 deleteTranscriptionJobAsync(DeleteTranscriptionJobRequest request) { return deleteTranscriptionJobAsync(request, null); } @Override public java.util.concurrent.Future deleteTranscriptionJobAsync(final DeleteTranscriptionJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteTranscriptionJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteTranscriptionJobResult call() throws Exception { DeleteTranscriptionJobResult result = null; try { result = executeDeleteTranscriptionJob(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 deleteVocabularyAsync(DeleteVocabularyRequest request) { return deleteVocabularyAsync(request, null); } @Override public java.util.concurrent.Future deleteVocabularyAsync(final DeleteVocabularyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteVocabularyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteVocabularyResult call() throws Exception { DeleteVocabularyResult result = null; try { result = executeDeleteVocabulary(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 deleteVocabularyFilterAsync(DeleteVocabularyFilterRequest request) { return deleteVocabularyFilterAsync(request, null); } @Override public java.util.concurrent.Future deleteVocabularyFilterAsync(final DeleteVocabularyFilterRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteVocabularyFilterRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteVocabularyFilterResult call() throws Exception { DeleteVocabularyFilterResult result = null; try { result = executeDeleteVocabularyFilter(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 describeLanguageModelAsync(DescribeLanguageModelRequest request) { return describeLanguageModelAsync(request, null); } @Override public java.util.concurrent.Future describeLanguageModelAsync(final DescribeLanguageModelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeLanguageModelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeLanguageModelResult call() throws Exception { DescribeLanguageModelResult result = null; try { result = executeDescribeLanguageModel(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 getCallAnalyticsCategoryAsync(GetCallAnalyticsCategoryRequest request) { return getCallAnalyticsCategoryAsync(request, null); } @Override public java.util.concurrent.Future getCallAnalyticsCategoryAsync(final GetCallAnalyticsCategoryRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetCallAnalyticsCategoryRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetCallAnalyticsCategoryResult call() throws Exception { GetCallAnalyticsCategoryResult result = null; try { result = executeGetCallAnalyticsCategory(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 getCallAnalyticsJobAsync(GetCallAnalyticsJobRequest request) { return getCallAnalyticsJobAsync(request, null); } @Override public java.util.concurrent.Future getCallAnalyticsJobAsync(final GetCallAnalyticsJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetCallAnalyticsJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetCallAnalyticsJobResult call() throws Exception { GetCallAnalyticsJobResult result = null; try { result = executeGetCallAnalyticsJob(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 getMedicalScribeJobAsync(GetMedicalScribeJobRequest request) { return getMedicalScribeJobAsync(request, null); } @Override public java.util.concurrent.Future getMedicalScribeJobAsync(final GetMedicalScribeJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetMedicalScribeJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetMedicalScribeJobResult call() throws Exception { GetMedicalScribeJobResult result = null; try { result = executeGetMedicalScribeJob(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 getMedicalTranscriptionJobAsync(GetMedicalTranscriptionJobRequest request) { return getMedicalTranscriptionJobAsync(request, null); } @Override public java.util.concurrent.Future getMedicalTranscriptionJobAsync(final GetMedicalTranscriptionJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetMedicalTranscriptionJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetMedicalTranscriptionJobResult call() throws Exception { GetMedicalTranscriptionJobResult result = null; try { result = executeGetMedicalTranscriptionJob(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 getMedicalVocabularyAsync(GetMedicalVocabularyRequest request) { return getMedicalVocabularyAsync(request, null); } @Override public java.util.concurrent.Future getMedicalVocabularyAsync(final GetMedicalVocabularyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetMedicalVocabularyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetMedicalVocabularyResult call() throws Exception { GetMedicalVocabularyResult result = null; try { result = executeGetMedicalVocabulary(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 getTranscriptionJobAsync(GetTranscriptionJobRequest request) { return getTranscriptionJobAsync(request, null); } @Override public java.util.concurrent.Future getTranscriptionJobAsync(final GetTranscriptionJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetTranscriptionJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetTranscriptionJobResult call() throws Exception { GetTranscriptionJobResult result = null; try { result = executeGetTranscriptionJob(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 getVocabularyAsync(GetVocabularyRequest request) { return getVocabularyAsync(request, null); } @Override public java.util.concurrent.Future getVocabularyAsync(final GetVocabularyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetVocabularyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetVocabularyResult call() throws Exception { GetVocabularyResult result = null; try { result = executeGetVocabulary(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 getVocabularyFilterAsync(GetVocabularyFilterRequest request) { return getVocabularyFilterAsync(request, null); } @Override public java.util.concurrent.Future getVocabularyFilterAsync(final GetVocabularyFilterRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetVocabularyFilterRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetVocabularyFilterResult call() throws Exception { GetVocabularyFilterResult result = null; try { result = executeGetVocabularyFilter(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 listCallAnalyticsCategoriesAsync(ListCallAnalyticsCategoriesRequest request) { return listCallAnalyticsCategoriesAsync(request, null); } @Override public java.util.concurrent.Future listCallAnalyticsCategoriesAsync(final ListCallAnalyticsCategoriesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListCallAnalyticsCategoriesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListCallAnalyticsCategoriesResult call() throws Exception { ListCallAnalyticsCategoriesResult result = null; try { result = executeListCallAnalyticsCategories(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 listCallAnalyticsJobsAsync(ListCallAnalyticsJobsRequest request) { return listCallAnalyticsJobsAsync(request, null); } @Override public java.util.concurrent.Future listCallAnalyticsJobsAsync(final ListCallAnalyticsJobsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListCallAnalyticsJobsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListCallAnalyticsJobsResult call() throws Exception { ListCallAnalyticsJobsResult result = null; try { result = executeListCallAnalyticsJobs(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 listLanguageModelsAsync(ListLanguageModelsRequest request) { return listLanguageModelsAsync(request, null); } @Override public java.util.concurrent.Future listLanguageModelsAsync(final ListLanguageModelsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListLanguageModelsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListLanguageModelsResult call() throws Exception { ListLanguageModelsResult result = null; try { result = executeListLanguageModels(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 listMedicalScribeJobsAsync(ListMedicalScribeJobsRequest request) { return listMedicalScribeJobsAsync(request, null); } @Override public java.util.concurrent.Future listMedicalScribeJobsAsync(final ListMedicalScribeJobsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListMedicalScribeJobsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListMedicalScribeJobsResult call() throws Exception { ListMedicalScribeJobsResult result = null; try { result = executeListMedicalScribeJobs(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 listMedicalTranscriptionJobsAsync(ListMedicalTranscriptionJobsRequest request) { return listMedicalTranscriptionJobsAsync(request, null); } @Override public java.util.concurrent.Future listMedicalTranscriptionJobsAsync(final ListMedicalTranscriptionJobsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListMedicalTranscriptionJobsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListMedicalTranscriptionJobsResult call() throws Exception { ListMedicalTranscriptionJobsResult result = null; try { result = executeListMedicalTranscriptionJobs(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 listMedicalVocabulariesAsync(ListMedicalVocabulariesRequest request) { return listMedicalVocabulariesAsync(request, null); } @Override public java.util.concurrent.Future listMedicalVocabulariesAsync(final ListMedicalVocabulariesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListMedicalVocabulariesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListMedicalVocabulariesResult call() throws Exception { ListMedicalVocabulariesResult result = null; try { result = executeListMedicalVocabularies(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 listTranscriptionJobsAsync(ListTranscriptionJobsRequest request) { return listTranscriptionJobsAsync(request, null); } @Override public java.util.concurrent.Future listTranscriptionJobsAsync(final ListTranscriptionJobsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListTranscriptionJobsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListTranscriptionJobsResult call() throws Exception { ListTranscriptionJobsResult result = null; try { result = executeListTranscriptionJobs(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 listVocabulariesAsync(ListVocabulariesRequest request) { return listVocabulariesAsync(request, null); } @Override public java.util.concurrent.Future listVocabulariesAsync(final ListVocabulariesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListVocabulariesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListVocabulariesResult call() throws Exception { ListVocabulariesResult result = null; try { result = executeListVocabularies(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 listVocabularyFiltersAsync(ListVocabularyFiltersRequest request) { return listVocabularyFiltersAsync(request, null); } @Override public java.util.concurrent.Future listVocabularyFiltersAsync(final ListVocabularyFiltersRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListVocabularyFiltersRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListVocabularyFiltersResult call() throws Exception { ListVocabularyFiltersResult result = null; try { result = executeListVocabularyFilters(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 startCallAnalyticsJobAsync(StartCallAnalyticsJobRequest request) { return startCallAnalyticsJobAsync(request, null); } @Override public java.util.concurrent.Future startCallAnalyticsJobAsync(final StartCallAnalyticsJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartCallAnalyticsJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StartCallAnalyticsJobResult call() throws Exception { StartCallAnalyticsJobResult result = null; try { result = executeStartCallAnalyticsJob(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 startMedicalScribeJobAsync(StartMedicalScribeJobRequest request) { return startMedicalScribeJobAsync(request, null); } @Override public java.util.concurrent.Future startMedicalScribeJobAsync(final StartMedicalScribeJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartMedicalScribeJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StartMedicalScribeJobResult call() throws Exception { StartMedicalScribeJobResult result = null; try { result = executeStartMedicalScribeJob(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 startMedicalTranscriptionJobAsync(StartMedicalTranscriptionJobRequest request) { return startMedicalTranscriptionJobAsync(request, null); } @Override public java.util.concurrent.Future startMedicalTranscriptionJobAsync(final StartMedicalTranscriptionJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartMedicalTranscriptionJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StartMedicalTranscriptionJobResult call() throws Exception { StartMedicalTranscriptionJobResult result = null; try { result = executeStartMedicalTranscriptionJob(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 startTranscriptionJobAsync(StartTranscriptionJobRequest request) { return startTranscriptionJobAsync(request, null); } @Override public java.util.concurrent.Future startTranscriptionJobAsync(final StartTranscriptionJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartTranscriptionJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StartTranscriptionJobResult call() throws Exception { StartTranscriptionJobResult result = null; try { result = executeStartTranscriptionJob(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 updateCallAnalyticsCategoryAsync(UpdateCallAnalyticsCategoryRequest request) { return updateCallAnalyticsCategoryAsync(request, null); } @Override public java.util.concurrent.Future updateCallAnalyticsCategoryAsync(final UpdateCallAnalyticsCategoryRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateCallAnalyticsCategoryRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateCallAnalyticsCategoryResult call() throws Exception { UpdateCallAnalyticsCategoryResult result = null; try { result = executeUpdateCallAnalyticsCategory(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 updateMedicalVocabularyAsync(UpdateMedicalVocabularyRequest request) { return updateMedicalVocabularyAsync(request, null); } @Override public java.util.concurrent.Future updateMedicalVocabularyAsync(final UpdateMedicalVocabularyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateMedicalVocabularyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateMedicalVocabularyResult call() throws Exception { UpdateMedicalVocabularyResult result = null; try { result = executeUpdateMedicalVocabulary(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 updateVocabularyAsync(UpdateVocabularyRequest request) { return updateVocabularyAsync(request, null); } @Override public java.util.concurrent.Future updateVocabularyAsync(final UpdateVocabularyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateVocabularyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateVocabularyResult call() throws Exception { UpdateVocabularyResult result = null; try { result = executeUpdateVocabulary(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 updateVocabularyFilterAsync(UpdateVocabularyFilterRequest request) { return updateVocabularyFilterAsync(request, null); } @Override public java.util.concurrent.Future updateVocabularyFilterAsync(final UpdateVocabularyFilterRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateVocabularyFilterRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateVocabularyFilterResult call() throws Exception { UpdateVocabularyFilterResult result = null; try { result = executeUpdateVocabularyFilter(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