com.amazonaws.services.connectcases.AmazonConnectCasesAsyncClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-java-sdk-connectcases Show documentation
Show all versions of aws-java-sdk-connectcases Show documentation
The AWS Java SDK for Amazon Connect Cases module holds the client classes that are used for communicating with Amazon Connect Cases 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.connectcases;
import javax.annotation.Generated;
import com.amazonaws.services.connectcases.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import java.util.concurrent.ExecutorService;
/**
* Client for accessing ConnectCases 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.
*
*
* With Amazon Connect Cases, your agents can track and manage customer issues that require multiple interactions,
* follow-up tasks, and teams in your contact center. A case represents a customer issue. It records the issue, the
* steps and interactions taken to resolve the issue, and the outcome. For more information, see Amazon Connect Cases in the Amazon
* Connect Administrator Guide.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AmazonConnectCasesAsyncClient extends AmazonConnectCasesClient implements AmazonConnectCasesAsync {
private static final int DEFAULT_THREAD_POOL_SIZE = 50;
private final java.util.concurrent.ExecutorService executorService;
public static AmazonConnectCasesAsyncClientBuilder asyncBuilder() {
return AmazonConnectCasesAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on ConnectCases using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AmazonConnectCasesAsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on ConnectCases using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AmazonConnectCasesAsyncClient(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 batchGetFieldAsync(BatchGetFieldRequest request) {
return batchGetFieldAsync(request, null);
}
@Override
public java.util.concurrent.Future batchGetFieldAsync(final BatchGetFieldRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchGetFieldRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchGetFieldResult call() throws Exception {
BatchGetFieldResult result = null;
try {
result = executeBatchGetField(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 batchPutFieldOptionsAsync(BatchPutFieldOptionsRequest request) {
return batchPutFieldOptionsAsync(request, null);
}
@Override
public java.util.concurrent.Future batchPutFieldOptionsAsync(final BatchPutFieldOptionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchPutFieldOptionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchPutFieldOptionsResult call() throws Exception {
BatchPutFieldOptionsResult result = null;
try {
result = executeBatchPutFieldOptions(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 createCaseAsync(CreateCaseRequest request) {
return createCaseAsync(request, null);
}
@Override
public java.util.concurrent.Future createCaseAsync(final CreateCaseRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateCaseRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateCaseResult call() throws Exception {
CreateCaseResult result = null;
try {
result = executeCreateCase(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 createFieldAsync(CreateFieldRequest request) {
return createFieldAsync(request, null);
}
@Override
public java.util.concurrent.Future createFieldAsync(final CreateFieldRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateFieldRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateFieldResult call() throws Exception {
CreateFieldResult result = null;
try {
result = executeCreateField(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 createLayoutAsync(CreateLayoutRequest request) {
return createLayoutAsync(request, null);
}
@Override
public java.util.concurrent.Future createLayoutAsync(final CreateLayoutRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateLayoutRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateLayoutResult call() throws Exception {
CreateLayoutResult result = null;
try {
result = executeCreateLayout(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 createRelatedItemAsync(CreateRelatedItemRequest request) {
return createRelatedItemAsync(request, null);
}
@Override
public java.util.concurrent.Future createRelatedItemAsync(final CreateRelatedItemRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateRelatedItemRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateRelatedItemResult call() throws Exception {
CreateRelatedItemResult result = null;
try {
result = executeCreateRelatedItem(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 createTemplateAsync(CreateTemplateRequest request) {
return createTemplateAsync(request, null);
}
@Override
public java.util.concurrent.Future createTemplateAsync(final CreateTemplateRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateTemplateRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateTemplateResult call() throws Exception {
CreateTemplateResult result = null;
try {
result = executeCreateTemplate(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 deleteFieldAsync(DeleteFieldRequest request) {
return deleteFieldAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteFieldAsync(final DeleteFieldRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteFieldRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteFieldResult call() throws Exception {
DeleteFieldResult result = null;
try {
result = executeDeleteField(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 deleteLayoutAsync(DeleteLayoutRequest request) {
return deleteLayoutAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteLayoutAsync(final DeleteLayoutRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteLayoutRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteLayoutResult call() throws Exception {
DeleteLayoutResult result = null;
try {
result = executeDeleteLayout(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 deleteTemplateAsync(DeleteTemplateRequest request) {
return deleteTemplateAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteTemplateAsync(final DeleteTemplateRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteTemplateRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteTemplateResult call() throws Exception {
DeleteTemplateResult result = null;
try {
result = executeDeleteTemplate(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 getCaseAsync(GetCaseRequest request) {
return getCaseAsync(request, null);
}
@Override
public java.util.concurrent.Future getCaseAsync(final GetCaseRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetCaseRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetCaseResult call() throws Exception {
GetCaseResult result = null;
try {
result = executeGetCase(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 getCaseAuditEventsAsync(GetCaseAuditEventsRequest request) {
return getCaseAuditEventsAsync(request, null);
}
@Override
public java.util.concurrent.Future getCaseAuditEventsAsync(final GetCaseAuditEventsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetCaseAuditEventsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetCaseAuditEventsResult call() throws Exception {
GetCaseAuditEventsResult result = null;
try {
result = executeGetCaseAuditEvents(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 getCaseEventConfigurationAsync(GetCaseEventConfigurationRequest request) {
return getCaseEventConfigurationAsync(request, null);
}
@Override
public java.util.concurrent.Future getCaseEventConfigurationAsync(final GetCaseEventConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetCaseEventConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetCaseEventConfigurationResult call() throws Exception {
GetCaseEventConfigurationResult result = null;
try {
result = executeGetCaseEventConfiguration(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 getDomainAsync(GetDomainRequest request) {
return getDomainAsync(request, null);
}
@Override
public java.util.concurrent.Future getDomainAsync(final GetDomainRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetDomainRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetDomainResult call() throws Exception {
GetDomainResult result = null;
try {
result = executeGetDomain(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 getLayoutAsync(GetLayoutRequest request) {
return getLayoutAsync(request, null);
}
@Override
public java.util.concurrent.Future getLayoutAsync(final GetLayoutRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetLayoutRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetLayoutResult call() throws Exception {
GetLayoutResult result = null;
try {
result = executeGetLayout(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 getTemplateAsync(GetTemplateRequest request) {
return getTemplateAsync(request, null);
}
@Override
public java.util.concurrent.Future getTemplateAsync(final GetTemplateRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetTemplateRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetTemplateResult call() throws Exception {
GetTemplateResult result = null;
try {
result = executeGetTemplate(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 listCasesForContactAsync(ListCasesForContactRequest request) {
return listCasesForContactAsync(request, null);
}
@Override
public java.util.concurrent.Future listCasesForContactAsync(final ListCasesForContactRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListCasesForContactRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListCasesForContactResult call() throws Exception {
ListCasesForContactResult result = null;
try {
result = executeListCasesForContact(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 listFieldOptionsAsync(ListFieldOptionsRequest request) {
return listFieldOptionsAsync(request, null);
}
@Override
public java.util.concurrent.Future listFieldOptionsAsync(final ListFieldOptionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListFieldOptionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListFieldOptionsResult call() throws Exception {
ListFieldOptionsResult result = null;
try {
result = executeListFieldOptions(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 listFieldsAsync(ListFieldsRequest request) {
return listFieldsAsync(request, null);
}
@Override
public java.util.concurrent.Future listFieldsAsync(final ListFieldsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListFieldsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListFieldsResult call() throws Exception {
ListFieldsResult result = null;
try {
result = executeListFields(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 listLayoutsAsync(ListLayoutsRequest request) {
return listLayoutsAsync(request, null);
}
@Override
public java.util.concurrent.Future listLayoutsAsync(final ListLayoutsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListLayoutsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListLayoutsResult call() throws Exception {
ListLayoutsResult result = null;
try {
result = executeListLayouts(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 listTemplatesAsync(ListTemplatesRequest request) {
return listTemplatesAsync(request, null);
}
@Override
public java.util.concurrent.Future listTemplatesAsync(final ListTemplatesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListTemplatesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListTemplatesResult call() throws Exception {
ListTemplatesResult result = null;
try {
result = executeListTemplates(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 putCaseEventConfigurationAsync(PutCaseEventConfigurationRequest request) {
return putCaseEventConfigurationAsync(request, null);
}
@Override
public java.util.concurrent.Future putCaseEventConfigurationAsync(final PutCaseEventConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutCaseEventConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutCaseEventConfigurationResult call() throws Exception {
PutCaseEventConfigurationResult result = null;
try {
result = executePutCaseEventConfiguration(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 searchCasesAsync(SearchCasesRequest request) {
return searchCasesAsync(request, null);
}
@Override
public java.util.concurrent.Future searchCasesAsync(final SearchCasesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final SearchCasesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public SearchCasesResult call() throws Exception {
SearchCasesResult result = null;
try {
result = executeSearchCases(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 searchRelatedItemsAsync(SearchRelatedItemsRequest request) {
return searchRelatedItemsAsync(request, null);
}
@Override
public java.util.concurrent.Future searchRelatedItemsAsync(final SearchRelatedItemsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final SearchRelatedItemsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public SearchRelatedItemsResult call() throws Exception {
SearchRelatedItemsResult result = null;
try {
result = executeSearchRelatedItems(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 updateCaseAsync(UpdateCaseRequest request) {
return updateCaseAsync(request, null);
}
@Override
public java.util.concurrent.Future updateCaseAsync(final UpdateCaseRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateCaseRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateCaseResult call() throws Exception {
UpdateCaseResult result = null;
try {
result = executeUpdateCase(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 updateFieldAsync(UpdateFieldRequest request) {
return updateFieldAsync(request, null);
}
@Override
public java.util.concurrent.Future updateFieldAsync(final UpdateFieldRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateFieldRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateFieldResult call() throws Exception {
UpdateFieldResult result = null;
try {
result = executeUpdateField(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 updateLayoutAsync(UpdateLayoutRequest request) {
return updateLayoutAsync(request, null);
}
@Override
public java.util.concurrent.Future updateLayoutAsync(final UpdateLayoutRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateLayoutRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateLayoutResult call() throws Exception {
UpdateLayoutResult result = null;
try {
result = executeUpdateLayout(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 updateTemplateAsync(UpdateTemplateRequest request) {
return updateTemplateAsync(request, null);
}
@Override
public java.util.concurrent.Future updateTemplateAsync(final UpdateTemplateRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateTemplateRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateTemplateResult call() throws Exception {
UpdateTemplateResult result = null;
try {
result = executeUpdateTemplate(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