com.amazonaws.services.voiceid.AmazonVoiceIDAsyncClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-java-sdk-voiceid Show documentation
Show all versions of aws-java-sdk-voiceid Show documentation
The AWS Java SDK for Amazon Voice ID module holds the client classes that are used for communicating with Amazon Voice ID 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.voiceid;
import javax.annotation.Generated;
import com.amazonaws.services.voiceid.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import java.util.concurrent.ExecutorService;
/**
* Client for accessing Amazon Voice ID 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 Connect Voice ID provides real-time caller authentication and fraud risk detection, which make voice
* interactions in contact centers more secure and efficient.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AmazonVoiceIDAsyncClient extends AmazonVoiceIDClient implements AmazonVoiceIDAsync {
private static final int DEFAULT_THREAD_POOL_SIZE = 50;
private final java.util.concurrent.ExecutorService executorService;
public static AmazonVoiceIDAsyncClientBuilder asyncBuilder() {
return AmazonVoiceIDAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon Voice ID using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AmazonVoiceIDAsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon Voice ID using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AmazonVoiceIDAsyncClient(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 associateFraudsterAsync(AssociateFraudsterRequest request) {
return associateFraudsterAsync(request, null);
}
@Override
public java.util.concurrent.Future associateFraudsterAsync(final AssociateFraudsterRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateFraudsterRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateFraudsterResult call() throws Exception {
AssociateFraudsterResult result = null;
try {
result = executeAssociateFraudster(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 createDomainAsync(CreateDomainRequest request) {
return createDomainAsync(request, null);
}
@Override
public java.util.concurrent.Future createDomainAsync(final CreateDomainRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateDomainRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateDomainResult call() throws Exception {
CreateDomainResult result = null;
try {
result = executeCreateDomain(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 createWatchlistAsync(CreateWatchlistRequest request) {
return createWatchlistAsync(request, null);
}
@Override
public java.util.concurrent.Future createWatchlistAsync(final CreateWatchlistRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateWatchlistRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateWatchlistResult call() throws Exception {
CreateWatchlistResult result = null;
try {
result = executeCreateWatchlist(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 deleteDomainAsync(DeleteDomainRequest request) {
return deleteDomainAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteDomainAsync(final DeleteDomainRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteDomainRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteDomainResult call() throws Exception {
DeleteDomainResult result = null;
try {
result = executeDeleteDomain(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 deleteFraudsterAsync(DeleteFraudsterRequest request) {
return deleteFraudsterAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteFraudsterAsync(final DeleteFraudsterRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteFraudsterRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteFraudsterResult call() throws Exception {
DeleteFraudsterResult result = null;
try {
result = executeDeleteFraudster(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 deleteSpeakerAsync(DeleteSpeakerRequest request) {
return deleteSpeakerAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteSpeakerAsync(final DeleteSpeakerRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteSpeakerRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteSpeakerResult call() throws Exception {
DeleteSpeakerResult result = null;
try {
result = executeDeleteSpeaker(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 deleteWatchlistAsync(DeleteWatchlistRequest request) {
return deleteWatchlistAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteWatchlistAsync(final DeleteWatchlistRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteWatchlistRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteWatchlistResult call() throws Exception {
DeleteWatchlistResult result = null;
try {
result = executeDeleteWatchlist(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 describeDomainAsync(DescribeDomainRequest request) {
return describeDomainAsync(request, null);
}
@Override
public java.util.concurrent.Future describeDomainAsync(final DescribeDomainRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeDomainRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeDomainResult call() throws Exception {
DescribeDomainResult result = null;
try {
result = executeDescribeDomain(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 describeFraudsterAsync(DescribeFraudsterRequest request) {
return describeFraudsterAsync(request, null);
}
@Override
public java.util.concurrent.Future describeFraudsterAsync(final DescribeFraudsterRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeFraudsterRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeFraudsterResult call() throws Exception {
DescribeFraudsterResult result = null;
try {
result = executeDescribeFraudster(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 describeFraudsterRegistrationJobAsync(
DescribeFraudsterRegistrationJobRequest request) {
return describeFraudsterRegistrationJobAsync(request, null);
}
@Override
public java.util.concurrent.Future describeFraudsterRegistrationJobAsync(
final DescribeFraudsterRegistrationJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeFraudsterRegistrationJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeFraudsterRegistrationJobResult call() throws Exception {
DescribeFraudsterRegistrationJobResult result = null;
try {
result = executeDescribeFraudsterRegistrationJob(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 describeSpeakerAsync(DescribeSpeakerRequest request) {
return describeSpeakerAsync(request, null);
}
@Override
public java.util.concurrent.Future describeSpeakerAsync(final DescribeSpeakerRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeSpeakerRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeSpeakerResult call() throws Exception {
DescribeSpeakerResult result = null;
try {
result = executeDescribeSpeaker(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 describeSpeakerEnrollmentJobAsync(DescribeSpeakerEnrollmentJobRequest request) {
return describeSpeakerEnrollmentJobAsync(request, null);
}
@Override
public java.util.concurrent.Future describeSpeakerEnrollmentJobAsync(final DescribeSpeakerEnrollmentJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeSpeakerEnrollmentJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeSpeakerEnrollmentJobResult call() throws Exception {
DescribeSpeakerEnrollmentJobResult result = null;
try {
result = executeDescribeSpeakerEnrollmentJob(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 describeWatchlistAsync(DescribeWatchlistRequest request) {
return describeWatchlistAsync(request, null);
}
@Override
public java.util.concurrent.Future describeWatchlistAsync(final DescribeWatchlistRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeWatchlistRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeWatchlistResult call() throws Exception {
DescribeWatchlistResult result = null;
try {
result = executeDescribeWatchlist(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 disassociateFraudsterAsync(DisassociateFraudsterRequest request) {
return disassociateFraudsterAsync(request, null);
}
@Override
public java.util.concurrent.Future disassociateFraudsterAsync(final DisassociateFraudsterRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisassociateFraudsterRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisassociateFraudsterResult call() throws Exception {
DisassociateFraudsterResult result = null;
try {
result = executeDisassociateFraudster(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 evaluateSessionAsync(EvaluateSessionRequest request) {
return evaluateSessionAsync(request, null);
}
@Override
public java.util.concurrent.Future evaluateSessionAsync(final EvaluateSessionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final EvaluateSessionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public EvaluateSessionResult call() throws Exception {
EvaluateSessionResult result = null;
try {
result = executeEvaluateSession(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 listDomainsAsync(ListDomainsRequest request) {
return listDomainsAsync(request, null);
}
@Override
public java.util.concurrent.Future listDomainsAsync(final ListDomainsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListDomainsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListDomainsResult call() throws Exception {
ListDomainsResult result = null;
try {
result = executeListDomains(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 listFraudsterRegistrationJobsAsync(ListFraudsterRegistrationJobsRequest request) {
return listFraudsterRegistrationJobsAsync(request, null);
}
@Override
public java.util.concurrent.Future listFraudsterRegistrationJobsAsync(
final ListFraudsterRegistrationJobsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListFraudsterRegistrationJobsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListFraudsterRegistrationJobsResult call() throws Exception {
ListFraudsterRegistrationJobsResult result = null;
try {
result = executeListFraudsterRegistrationJobs(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 listFraudstersAsync(ListFraudstersRequest request) {
return listFraudstersAsync(request, null);
}
@Override
public java.util.concurrent.Future listFraudstersAsync(final ListFraudstersRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListFraudstersRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListFraudstersResult call() throws Exception {
ListFraudstersResult result = null;
try {
result = executeListFraudsters(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 listSpeakerEnrollmentJobsAsync(ListSpeakerEnrollmentJobsRequest request) {
return listSpeakerEnrollmentJobsAsync(request, null);
}
@Override
public java.util.concurrent.Future listSpeakerEnrollmentJobsAsync(final ListSpeakerEnrollmentJobsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListSpeakerEnrollmentJobsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListSpeakerEnrollmentJobsResult call() throws Exception {
ListSpeakerEnrollmentJobsResult result = null;
try {
result = executeListSpeakerEnrollmentJobs(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 listSpeakersAsync(ListSpeakersRequest request) {
return listSpeakersAsync(request, null);
}
@Override
public java.util.concurrent.Future listSpeakersAsync(final ListSpeakersRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListSpeakersRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListSpeakersResult call() throws Exception {
ListSpeakersResult result = null;
try {
result = executeListSpeakers(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 listWatchlistsAsync(ListWatchlistsRequest request) {
return listWatchlistsAsync(request, null);
}
@Override
public java.util.concurrent.Future listWatchlistsAsync(final ListWatchlistsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListWatchlistsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListWatchlistsResult call() throws Exception {
ListWatchlistsResult result = null;
try {
result = executeListWatchlists(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 optOutSpeakerAsync(OptOutSpeakerRequest request) {
return optOutSpeakerAsync(request, null);
}
@Override
public java.util.concurrent.Future optOutSpeakerAsync(final OptOutSpeakerRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final OptOutSpeakerRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public OptOutSpeakerResult call() throws Exception {
OptOutSpeakerResult result = null;
try {
result = executeOptOutSpeaker(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 startFraudsterRegistrationJobAsync(StartFraudsterRegistrationJobRequest request) {
return startFraudsterRegistrationJobAsync(request, null);
}
@Override
public java.util.concurrent.Future startFraudsterRegistrationJobAsync(
final StartFraudsterRegistrationJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartFraudsterRegistrationJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartFraudsterRegistrationJobResult call() throws Exception {
StartFraudsterRegistrationJobResult result = null;
try {
result = executeStartFraudsterRegistrationJob(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 startSpeakerEnrollmentJobAsync(StartSpeakerEnrollmentJobRequest request) {
return startSpeakerEnrollmentJobAsync(request, null);
}
@Override
public java.util.concurrent.Future startSpeakerEnrollmentJobAsync(final StartSpeakerEnrollmentJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartSpeakerEnrollmentJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartSpeakerEnrollmentJobResult call() throws Exception {
StartSpeakerEnrollmentJobResult result = null;
try {
result = executeStartSpeakerEnrollmentJob(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 updateDomainAsync(UpdateDomainRequest request) {
return updateDomainAsync(request, null);
}
@Override
public java.util.concurrent.Future updateDomainAsync(final UpdateDomainRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateDomainRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateDomainResult call() throws Exception {
UpdateDomainResult result = null;
try {
result = executeUpdateDomain(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 updateWatchlistAsync(UpdateWatchlistRequest request) {
return updateWatchlistAsync(request, null);
}
@Override
public java.util.concurrent.Future updateWatchlistAsync(final UpdateWatchlistRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateWatchlistRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateWatchlistResult call() throws Exception {
UpdateWatchlistResult result = null;
try {
result = executeUpdateWatchlist(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