com.amazonaws.services.workmail.AmazonWorkMailAsyncClient Maven / Gradle / Ivy
Show all versions of aws-java-sdk-workmail Show documentation
/*
* 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.workmail;
import javax.annotation.Generated;
import com.amazonaws.services.workmail.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import java.util.concurrent.ExecutorService;
/**
* Client for accessing Amazon WorkMail 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.
*
*
* WorkMail is a secure, managed business email and calendaring service with support for existing desktop and mobile
* email clients. You can access your email, contacts, and calendars using Microsoft Outlook, your browser, or other
* native iOS and Android email applications. You can integrate WorkMail with your existing corporate directory and
* control both the keys that encrypt your data and the location in which your data is stored.
*
*
* The WorkMail API is designed for the following scenarios:
*
*
* -
*
* Listing and describing organizations
*
*
*
*
* -
*
* Managing users
*
*
*
*
* -
*
* Managing groups
*
*
*
*
* -
*
* Managing resources
*
*
*
*
* All WorkMail API operations are Amazon-authenticated and certificate-signed. They not only require the use of the AWS
* SDK, but also allow for the exclusive use of AWS Identity and Access Management users and roles to help facilitate
* access, trust, and permission policies. By creating a role and allowing an IAM user to access the WorkMail site, the
* IAM user gains full administrative visibility into the entire WorkMail organization (or as set in the IAM policy).
* This includes, but is not limited to, the ability to create, update, and delete users, groups, and resources. This
* allows developers to perform the scenarios listed above, as well as give users the ability to grant access on a
* selective basis using the IAM model.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AmazonWorkMailAsyncClient extends AmazonWorkMailClient implements AmazonWorkMailAsync {
private static final int DEFAULT_THREAD_POOL_SIZE = 50;
private final java.util.concurrent.ExecutorService executorService;
public static AmazonWorkMailAsyncClientBuilder asyncBuilder() {
return AmazonWorkMailAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon WorkMail using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AmazonWorkMailAsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon WorkMail using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AmazonWorkMailAsyncClient(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 associateDelegateToResourceAsync(AssociateDelegateToResourceRequest request) {
return associateDelegateToResourceAsync(request, null);
}
@Override
public java.util.concurrent.Future associateDelegateToResourceAsync(final AssociateDelegateToResourceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateDelegateToResourceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateDelegateToResourceResult call() throws Exception {
AssociateDelegateToResourceResult result = null;
try {
result = executeAssociateDelegateToResource(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 associateMemberToGroupAsync(AssociateMemberToGroupRequest request) {
return associateMemberToGroupAsync(request, null);
}
@Override
public java.util.concurrent.Future associateMemberToGroupAsync(final AssociateMemberToGroupRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateMemberToGroupRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateMemberToGroupResult call() throws Exception {
AssociateMemberToGroupResult result = null;
try {
result = executeAssociateMemberToGroup(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 assumeImpersonationRoleAsync(AssumeImpersonationRoleRequest request) {
return assumeImpersonationRoleAsync(request, null);
}
@Override
public java.util.concurrent.Future assumeImpersonationRoleAsync(final AssumeImpersonationRoleRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssumeImpersonationRoleRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssumeImpersonationRoleResult call() throws Exception {
AssumeImpersonationRoleResult result = null;
try {
result = executeAssumeImpersonationRole(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 cancelMailboxExportJobAsync(CancelMailboxExportJobRequest request) {
return cancelMailboxExportJobAsync(request, null);
}
@Override
public java.util.concurrent.Future cancelMailboxExportJobAsync(final CancelMailboxExportJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CancelMailboxExportJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CancelMailboxExportJobResult call() throws Exception {
CancelMailboxExportJobResult result = null;
try {
result = executeCancelMailboxExportJob(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 createAliasAsync(CreateAliasRequest request) {
return createAliasAsync(request, null);
}
@Override
public java.util.concurrent.Future createAliasAsync(final CreateAliasRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateAliasRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateAliasResult call() throws Exception {
CreateAliasResult result = null;
try {
result = executeCreateAlias(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 createAvailabilityConfigurationAsync(
CreateAvailabilityConfigurationRequest request) {
return createAvailabilityConfigurationAsync(request, null);
}
@Override
public java.util.concurrent.Future createAvailabilityConfigurationAsync(
final CreateAvailabilityConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateAvailabilityConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateAvailabilityConfigurationResult call() throws Exception {
CreateAvailabilityConfigurationResult result = null;
try {
result = executeCreateAvailabilityConfiguration(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 createGroupAsync(CreateGroupRequest request) {
return createGroupAsync(request, null);
}
@Override
public java.util.concurrent.Future createGroupAsync(final CreateGroupRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateGroupRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateGroupResult call() throws Exception {
CreateGroupResult result = null;
try {
result = executeCreateGroup(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 createImpersonationRoleAsync(CreateImpersonationRoleRequest request) {
return createImpersonationRoleAsync(request, null);
}
@Override
public java.util.concurrent.Future createImpersonationRoleAsync(final CreateImpersonationRoleRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateImpersonationRoleRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateImpersonationRoleResult call() throws Exception {
CreateImpersonationRoleResult result = null;
try {
result = executeCreateImpersonationRole(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 createMobileDeviceAccessRuleAsync(CreateMobileDeviceAccessRuleRequest request) {
return createMobileDeviceAccessRuleAsync(request, null);
}
@Override
public java.util.concurrent.Future createMobileDeviceAccessRuleAsync(final CreateMobileDeviceAccessRuleRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateMobileDeviceAccessRuleRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateMobileDeviceAccessRuleResult call() throws Exception {
CreateMobileDeviceAccessRuleResult result = null;
try {
result = executeCreateMobileDeviceAccessRule(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 createOrganizationAsync(CreateOrganizationRequest request) {
return createOrganizationAsync(request, null);
}
@Override
public java.util.concurrent.Future createOrganizationAsync(final CreateOrganizationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateOrganizationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateOrganizationResult call() throws Exception {
CreateOrganizationResult result = null;
try {
result = executeCreateOrganization(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 createResourceAsync(CreateResourceRequest request) {
return createResourceAsync(request, null);
}
@Override
public java.util.concurrent.Future createResourceAsync(final CreateResourceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateResourceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateResourceResult call() throws Exception {
CreateResourceResult result = null;
try {
result = executeCreateResource(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 createUserAsync(CreateUserRequest request) {
return createUserAsync(request, null);
}
@Override
public java.util.concurrent.Future createUserAsync(final CreateUserRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateUserRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateUserResult call() throws Exception {
CreateUserResult result = null;
try {
result = executeCreateUser(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 deleteAccessControlRuleAsync(DeleteAccessControlRuleRequest request) {
return deleteAccessControlRuleAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteAccessControlRuleAsync(final DeleteAccessControlRuleRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteAccessControlRuleRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteAccessControlRuleResult call() throws Exception {
DeleteAccessControlRuleResult result = null;
try {
result = executeDeleteAccessControlRule(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 deleteAliasAsync(DeleteAliasRequest request) {
return deleteAliasAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteAliasAsync(final DeleteAliasRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteAliasRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteAliasResult call() throws Exception {
DeleteAliasResult result = null;
try {
result = executeDeleteAlias(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 deleteAvailabilityConfigurationAsync(
DeleteAvailabilityConfigurationRequest request) {
return deleteAvailabilityConfigurationAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteAvailabilityConfigurationAsync(
final DeleteAvailabilityConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteAvailabilityConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteAvailabilityConfigurationResult call() throws Exception {
DeleteAvailabilityConfigurationResult result = null;
try {
result = executeDeleteAvailabilityConfiguration(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 deleteEmailMonitoringConfigurationAsync(
DeleteEmailMonitoringConfigurationRequest request) {
return deleteEmailMonitoringConfigurationAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteEmailMonitoringConfigurationAsync(
final DeleteEmailMonitoringConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteEmailMonitoringConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteEmailMonitoringConfigurationResult call() throws Exception {
DeleteEmailMonitoringConfigurationResult result = null;
try {
result = executeDeleteEmailMonitoringConfiguration(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 deleteGroupAsync(DeleteGroupRequest request) {
return deleteGroupAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteGroupAsync(final DeleteGroupRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteGroupRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteGroupResult call() throws Exception {
DeleteGroupResult result = null;
try {
result = executeDeleteGroup(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 deleteImpersonationRoleAsync(DeleteImpersonationRoleRequest request) {
return deleteImpersonationRoleAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteImpersonationRoleAsync(final DeleteImpersonationRoleRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteImpersonationRoleRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteImpersonationRoleResult call() throws Exception {
DeleteImpersonationRoleResult result = null;
try {
result = executeDeleteImpersonationRole(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 deleteMailboxPermissionsAsync(DeleteMailboxPermissionsRequest request) {
return deleteMailboxPermissionsAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteMailboxPermissionsAsync(final DeleteMailboxPermissionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteMailboxPermissionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteMailboxPermissionsResult call() throws Exception {
DeleteMailboxPermissionsResult result = null;
try {
result = executeDeleteMailboxPermissions(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 deleteMobileDeviceAccessOverrideAsync(
DeleteMobileDeviceAccessOverrideRequest request) {
return deleteMobileDeviceAccessOverrideAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteMobileDeviceAccessOverrideAsync(
final DeleteMobileDeviceAccessOverrideRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteMobileDeviceAccessOverrideRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteMobileDeviceAccessOverrideResult call() throws Exception {
DeleteMobileDeviceAccessOverrideResult result = null;
try {
result = executeDeleteMobileDeviceAccessOverride(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 deleteMobileDeviceAccessRuleAsync(DeleteMobileDeviceAccessRuleRequest request) {
return deleteMobileDeviceAccessRuleAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteMobileDeviceAccessRuleAsync(final DeleteMobileDeviceAccessRuleRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteMobileDeviceAccessRuleRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteMobileDeviceAccessRuleResult call() throws Exception {
DeleteMobileDeviceAccessRuleResult result = null;
try {
result = executeDeleteMobileDeviceAccessRule(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 deleteOrganizationAsync(DeleteOrganizationRequest request) {
return deleteOrganizationAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteOrganizationAsync(final DeleteOrganizationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteOrganizationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteOrganizationResult call() throws Exception {
DeleteOrganizationResult result = null;
try {
result = executeDeleteOrganization(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 deleteResourceAsync(DeleteResourceRequest request) {
return deleteResourceAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteResourceAsync(final DeleteResourceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteResourceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteResourceResult call() throws Exception {
DeleteResourceResult result = null;
try {
result = executeDeleteResource(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 deleteRetentionPolicyAsync(DeleteRetentionPolicyRequest request) {
return deleteRetentionPolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteRetentionPolicyAsync(final DeleteRetentionPolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteRetentionPolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteRetentionPolicyResult call() throws Exception {
DeleteRetentionPolicyResult result = null;
try {
result = executeDeleteRetentionPolicy(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 deleteUserAsync(DeleteUserRequest request) {
return deleteUserAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteUserAsync(final DeleteUserRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteUserRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteUserResult call() throws Exception {
DeleteUserResult result = null;
try {
result = executeDeleteUser(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 deregisterFromWorkMailAsync(DeregisterFromWorkMailRequest request) {
return deregisterFromWorkMailAsync(request, null);
}
@Override
public java.util.concurrent.Future deregisterFromWorkMailAsync(final DeregisterFromWorkMailRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeregisterFromWorkMailRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeregisterFromWorkMailResult call() throws Exception {
DeregisterFromWorkMailResult result = null;
try {
result = executeDeregisterFromWorkMail(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 deregisterMailDomainAsync(DeregisterMailDomainRequest request) {
return deregisterMailDomainAsync(request, null);
}
@Override
public java.util.concurrent.Future deregisterMailDomainAsync(final DeregisterMailDomainRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeregisterMailDomainRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeregisterMailDomainResult call() throws Exception {
DeregisterMailDomainResult result = null;
try {
result = executeDeregisterMailDomain(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 describeEmailMonitoringConfigurationAsync(
DescribeEmailMonitoringConfigurationRequest request) {
return describeEmailMonitoringConfigurationAsync(request, null);
}
@Override
public java.util.concurrent.Future describeEmailMonitoringConfigurationAsync(
final DescribeEmailMonitoringConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeEmailMonitoringConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeEmailMonitoringConfigurationResult call() throws Exception {
DescribeEmailMonitoringConfigurationResult result = null;
try {
result = executeDescribeEmailMonitoringConfiguration(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 describeEntityAsync(DescribeEntityRequest request) {
return describeEntityAsync(request, null);
}
@Override
public java.util.concurrent.Future describeEntityAsync(final DescribeEntityRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeEntityRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeEntityResult call() throws Exception {
DescribeEntityResult result = null;
try {
result = executeDescribeEntity(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 describeGroupAsync(DescribeGroupRequest request) {
return describeGroupAsync(request, null);
}
@Override
public java.util.concurrent.Future describeGroupAsync(final DescribeGroupRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeGroupRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeGroupResult call() throws Exception {
DescribeGroupResult result = null;
try {
result = executeDescribeGroup(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 describeInboundDmarcSettingsAsync(DescribeInboundDmarcSettingsRequest request) {
return describeInboundDmarcSettingsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeInboundDmarcSettingsAsync(final DescribeInboundDmarcSettingsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeInboundDmarcSettingsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeInboundDmarcSettingsResult call() throws Exception {
DescribeInboundDmarcSettingsResult result = null;
try {
result = executeDescribeInboundDmarcSettings(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 describeMailboxExportJobAsync(DescribeMailboxExportJobRequest request) {
return describeMailboxExportJobAsync(request, null);
}
@Override
public java.util.concurrent.Future describeMailboxExportJobAsync(final DescribeMailboxExportJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeMailboxExportJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeMailboxExportJobResult call() throws Exception {
DescribeMailboxExportJobResult result = null;
try {
result = executeDescribeMailboxExportJob(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 describeOrganizationAsync(DescribeOrganizationRequest request) {
return describeOrganizationAsync(request, null);
}
@Override
public java.util.concurrent.Future describeOrganizationAsync(final DescribeOrganizationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeOrganizationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeOrganizationResult call() throws Exception {
DescribeOrganizationResult result = null;
try {
result = executeDescribeOrganization(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 describeResourceAsync(DescribeResourceRequest request) {
return describeResourceAsync(request, null);
}
@Override
public java.util.concurrent.Future describeResourceAsync(final DescribeResourceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeResourceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeResourceResult call() throws Exception {
DescribeResourceResult result = null;
try {
result = executeDescribeResource(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 describeUserAsync(DescribeUserRequest request) {
return describeUserAsync(request, null);
}
@Override
public java.util.concurrent.Future describeUserAsync(final DescribeUserRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeUserRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeUserResult call() throws Exception {
DescribeUserResult result = null;
try {
result = executeDescribeUser(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 disassociateDelegateFromResourceAsync(
DisassociateDelegateFromResourceRequest request) {
return disassociateDelegateFromResourceAsync(request, null);
}
@Override
public java.util.concurrent.Future disassociateDelegateFromResourceAsync(
final DisassociateDelegateFromResourceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisassociateDelegateFromResourceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisassociateDelegateFromResourceResult call() throws Exception {
DisassociateDelegateFromResourceResult result = null;
try {
result = executeDisassociateDelegateFromResource(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 disassociateMemberFromGroupAsync(DisassociateMemberFromGroupRequest request) {
return disassociateMemberFromGroupAsync(request, null);
}
@Override
public java.util.concurrent.Future disassociateMemberFromGroupAsync(final DisassociateMemberFromGroupRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisassociateMemberFromGroupRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisassociateMemberFromGroupResult call() throws Exception {
DisassociateMemberFromGroupResult result = null;
try {
result = executeDisassociateMemberFromGroup(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 getAccessControlEffectAsync(GetAccessControlEffectRequest request) {
return getAccessControlEffectAsync(request, null);
}
@Override
public java.util.concurrent.Future getAccessControlEffectAsync(final GetAccessControlEffectRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetAccessControlEffectRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetAccessControlEffectResult call() throws Exception {
GetAccessControlEffectResult result = null;
try {
result = executeGetAccessControlEffect(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 getDefaultRetentionPolicyAsync(GetDefaultRetentionPolicyRequest request) {
return getDefaultRetentionPolicyAsync(request, null);
}
@Override
public java.util.concurrent.Future getDefaultRetentionPolicyAsync(final GetDefaultRetentionPolicyRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetDefaultRetentionPolicyRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetDefaultRetentionPolicyResult call() throws Exception {
GetDefaultRetentionPolicyResult result = null;
try {
result = executeGetDefaultRetentionPolicy(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 getImpersonationRoleAsync(GetImpersonationRoleRequest request) {
return getImpersonationRoleAsync(request, null);
}
@Override
public java.util.concurrent.Future getImpersonationRoleAsync(final GetImpersonationRoleRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetImpersonationRoleRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetImpersonationRoleResult call() throws Exception {
GetImpersonationRoleResult result = null;
try {
result = executeGetImpersonationRole(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 getImpersonationRoleEffectAsync(GetImpersonationRoleEffectRequest request) {
return getImpersonationRoleEffectAsync(request, null);
}
@Override
public java.util.concurrent.Future getImpersonationRoleEffectAsync(final GetImpersonationRoleEffectRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetImpersonationRoleEffectRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetImpersonationRoleEffectResult call() throws Exception {
GetImpersonationRoleEffectResult result = null;
try {
result = executeGetImpersonationRoleEffect(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 getMailDomainAsync(GetMailDomainRequest request) {
return getMailDomainAsync(request, null);
}
@Override
public java.util.concurrent.Future getMailDomainAsync(final GetMailDomainRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetMailDomainRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetMailDomainResult call() throws Exception {
GetMailDomainResult result = null;
try {
result = executeGetMailDomain(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 getMailboxDetailsAsync(GetMailboxDetailsRequest request) {
return getMailboxDetailsAsync(request, null);
}
@Override
public java.util.concurrent.Future getMailboxDetailsAsync(final GetMailboxDetailsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetMailboxDetailsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetMailboxDetailsResult call() throws Exception {
GetMailboxDetailsResult result = null;
try {
result = executeGetMailboxDetails(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 getMobileDeviceAccessEffectAsync(GetMobileDeviceAccessEffectRequest request) {
return getMobileDeviceAccessEffectAsync(request, null);
}
@Override
public java.util.concurrent.Future getMobileDeviceAccessEffectAsync(final GetMobileDeviceAccessEffectRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetMobileDeviceAccessEffectRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetMobileDeviceAccessEffectResult call() throws Exception {
GetMobileDeviceAccessEffectResult result = null;
try {
result = executeGetMobileDeviceAccessEffect(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 getMobileDeviceAccessOverrideAsync(GetMobileDeviceAccessOverrideRequest request) {
return getMobileDeviceAccessOverrideAsync(request, null);
}
@Override
public java.util.concurrent.Future getMobileDeviceAccessOverrideAsync(
final GetMobileDeviceAccessOverrideRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetMobileDeviceAccessOverrideRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetMobileDeviceAccessOverrideResult call() throws Exception {
GetMobileDeviceAccessOverrideResult result = null;
try {
result = executeGetMobileDeviceAccessOverride(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 listAccessControlRulesAsync(ListAccessControlRulesRequest request) {
return listAccessControlRulesAsync(request, null);
}
@Override
public java.util.concurrent.Future listAccessControlRulesAsync(final ListAccessControlRulesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListAccessControlRulesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListAccessControlRulesResult call() throws Exception {
ListAccessControlRulesResult result = null;
try {
result = executeListAccessControlRules(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 listAliasesAsync(ListAliasesRequest request) {
return listAliasesAsync(request, null);
}
@Override
public java.util.concurrent.Future listAliasesAsync(final ListAliasesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListAliasesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListAliasesResult call() throws Exception {
ListAliasesResult result = null;
try {
result = executeListAliases(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 listAvailabilityConfigurationsAsync(ListAvailabilityConfigurationsRequest request) {
return listAvailabilityConfigurationsAsync(request, null);
}
@Override
public java.util.concurrent.Future listAvailabilityConfigurationsAsync(
final ListAvailabilityConfigurationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListAvailabilityConfigurationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListAvailabilityConfigurationsResult call() throws Exception {
ListAvailabilityConfigurationsResult result = null;
try {
result = executeListAvailabilityConfigurations(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 listGroupMembersAsync(ListGroupMembersRequest request) {
return listGroupMembersAsync(request, null);
}
@Override
public java.util.concurrent.Future listGroupMembersAsync(final ListGroupMembersRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListGroupMembersRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListGroupMembersResult call() throws Exception {
ListGroupMembersResult result = null;
try {
result = executeListGroupMembers(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 listGroupsAsync(ListGroupsRequest request) {
return listGroupsAsync(request, null);
}
@Override
public java.util.concurrent.Future listGroupsAsync(final ListGroupsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListGroupsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListGroupsResult call() throws Exception {
ListGroupsResult result = null;
try {
result = executeListGroups(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 listGroupsForEntityAsync(ListGroupsForEntityRequest request) {
return listGroupsForEntityAsync(request, null);
}
@Override
public java.util.concurrent.Future listGroupsForEntityAsync(final ListGroupsForEntityRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListGroupsForEntityRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListGroupsForEntityResult call() throws Exception {
ListGroupsForEntityResult result = null;
try {
result = executeListGroupsForEntity(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 listImpersonationRolesAsync(ListImpersonationRolesRequest request) {
return listImpersonationRolesAsync(request, null);
}
@Override
public java.util.concurrent.Future listImpersonationRolesAsync(final ListImpersonationRolesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListImpersonationRolesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListImpersonationRolesResult call() throws Exception {
ListImpersonationRolesResult result = null;
try {
result = executeListImpersonationRoles(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 listMailDomainsAsync(ListMailDomainsRequest request) {
return listMailDomainsAsync(request, null);
}
@Override
public java.util.concurrent.Future listMailDomainsAsync(final ListMailDomainsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListMailDomainsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListMailDomainsResult call() throws Exception {
ListMailDomainsResult result = null;
try {
result = executeListMailDomains(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 listMailboxExportJobsAsync(ListMailboxExportJobsRequest request) {
return listMailboxExportJobsAsync(request, null);
}
@Override
public java.util.concurrent.Future listMailboxExportJobsAsync(final ListMailboxExportJobsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListMailboxExportJobsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListMailboxExportJobsResult call() throws Exception {
ListMailboxExportJobsResult result = null;
try {
result = executeListMailboxExportJobs(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 listMailboxPermissionsAsync(ListMailboxPermissionsRequest request) {
return listMailboxPermissionsAsync(request, null);
}
@Override
public java.util.concurrent.Future listMailboxPermissionsAsync(final ListMailboxPermissionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListMailboxPermissionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListMailboxPermissionsResult call() throws Exception {
ListMailboxPermissionsResult result = null;
try {
result = executeListMailboxPermissions(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 listMobileDeviceAccessOverridesAsync(
ListMobileDeviceAccessOverridesRequest request) {
return listMobileDeviceAccessOverridesAsync(request, null);
}
@Override
public java.util.concurrent.Future listMobileDeviceAccessOverridesAsync(
final ListMobileDeviceAccessOverridesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListMobileDeviceAccessOverridesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListMobileDeviceAccessOverridesResult call() throws Exception {
ListMobileDeviceAccessOverridesResult result = null;
try {
result = executeListMobileDeviceAccessOverrides(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 listMobileDeviceAccessRulesAsync(ListMobileDeviceAccessRulesRequest request) {
return listMobileDeviceAccessRulesAsync(request, null);
}
@Override
public java.util.concurrent.Future listMobileDeviceAccessRulesAsync(final ListMobileDeviceAccessRulesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListMobileDeviceAccessRulesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListMobileDeviceAccessRulesResult call() throws Exception {
ListMobileDeviceAccessRulesResult result = null;
try {
result = executeListMobileDeviceAccessRules(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 listOrganizationsAsync(ListOrganizationsRequest request) {
return listOrganizationsAsync(request, null);
}
@Override
public java.util.concurrent.Future listOrganizationsAsync(final ListOrganizationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListOrganizationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListOrganizationsResult call() throws Exception {
ListOrganizationsResult result = null;
try {
result = executeListOrganizations(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 listResourceDelegatesAsync(ListResourceDelegatesRequest request) {
return listResourceDelegatesAsync(request, null);
}
@Override
public java.util.concurrent.Future listResourceDelegatesAsync(final ListResourceDelegatesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListResourceDelegatesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListResourceDelegatesResult call() throws Exception {
ListResourceDelegatesResult result = null;
try {
result = executeListResourceDelegates(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 listResourcesAsync(ListResourcesRequest request) {
return listResourcesAsync(request, null);
}
@Override
public java.util.concurrent.Future listResourcesAsync(final ListResourcesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListResourcesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListResourcesResult call() throws Exception {
ListResourcesResult result = null;
try {
result = executeListResources(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 listUsersAsync(ListUsersRequest request) {
return listUsersAsync(request, null);
}
@Override
public java.util.concurrent.Future listUsersAsync(final ListUsersRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListUsersRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListUsersResult call() throws Exception {
ListUsersResult result = null;
try {
result = executeListUsers(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 putAccessControlRuleAsync(PutAccessControlRuleRequest request) {
return putAccessControlRuleAsync(request, null);
}
@Override
public java.util.concurrent.Future putAccessControlRuleAsync(final PutAccessControlRuleRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutAccessControlRuleRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable