com.amazonaws.services.worklink.AmazonWorkLinkAsyncClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-java-sdk-worklink Show documentation
Show all versions of aws-java-sdk-worklink Show documentation
The AWS Java SDK for Amazon WorkLink module holds the client classes that are used for communicating with Amazon WorkLink Service
/*
* Copyright 2017-2022 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.worklink;
import javax.annotation.Generated;
import com.amazonaws.services.worklink.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import java.util.concurrent.ExecutorService;
/**
* Client for accessing WorkLink 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 WorkLink is a cloud-based service that provides secure access to internal websites and web apps from iOS and
* Android phones. In a single step, your users, such as employees, can access internal websites as efficiently as they
* access any other public website. They enter a URL in their web browser, or choose a link to an internal website in an
* email. Amazon WorkLink authenticates the user's access and securely renders authorized internal web content in a
* secure rendering service in the AWS cloud. Amazon WorkLink doesn't download or store any internal web content on
* mobile devices.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AmazonWorkLinkAsyncClient extends AmazonWorkLinkClient implements AmazonWorkLinkAsync {
private static final int DEFAULT_THREAD_POOL_SIZE = 50;
private final java.util.concurrent.ExecutorService executorService;
public static AmazonWorkLinkAsyncClientBuilder asyncBuilder() {
return AmazonWorkLinkAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on WorkLink using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AmazonWorkLinkAsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on WorkLink using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AmazonWorkLinkAsyncClient(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
@Deprecated
public java.util.concurrent.Future associateDomainAsync(AssociateDomainRequest request) {
return associateDomainAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future associateDomainAsync(final AssociateDomainRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateDomainRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateDomainResult call() throws Exception {
AssociateDomainResult result = null;
try {
result = executeAssociateDomain(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future associateWebsiteAuthorizationProviderAsync(
AssociateWebsiteAuthorizationProviderRequest request) {
return associateWebsiteAuthorizationProviderAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future associateWebsiteAuthorizationProviderAsync(
final AssociateWebsiteAuthorizationProviderRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateWebsiteAuthorizationProviderRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateWebsiteAuthorizationProviderResult call() throws Exception {
AssociateWebsiteAuthorizationProviderResult result = null;
try {
result = executeAssociateWebsiteAuthorizationProvider(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future associateWebsiteCertificateAuthorityAsync(
AssociateWebsiteCertificateAuthorityRequest request) {
return associateWebsiteCertificateAuthorityAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future associateWebsiteCertificateAuthorityAsync(
final AssociateWebsiteCertificateAuthorityRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AssociateWebsiteCertificateAuthorityRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AssociateWebsiteCertificateAuthorityResult call() throws Exception {
AssociateWebsiteCertificateAuthorityResult result = null;
try {
result = executeAssociateWebsiteCertificateAuthority(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future createFleetAsync(CreateFleetRequest request) {
return createFleetAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future createFleetAsync(final CreateFleetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateFleetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateFleetResult call() throws Exception {
CreateFleetResult result = null;
try {
result = executeCreateFleet(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future deleteFleetAsync(DeleteFleetRequest request) {
return deleteFleetAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future deleteFleetAsync(final DeleteFleetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteFleetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteFleetResult call() throws Exception {
DeleteFleetResult result = null;
try {
result = executeDeleteFleet(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future describeAuditStreamConfigurationAsync(
DescribeAuditStreamConfigurationRequest request) {
return describeAuditStreamConfigurationAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future describeAuditStreamConfigurationAsync(
final DescribeAuditStreamConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeAuditStreamConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeAuditStreamConfigurationResult call() throws Exception {
DescribeAuditStreamConfigurationResult result = null;
try {
result = executeDescribeAuditStreamConfiguration(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future describeCompanyNetworkConfigurationAsync(
DescribeCompanyNetworkConfigurationRequest request) {
return describeCompanyNetworkConfigurationAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future describeCompanyNetworkConfigurationAsync(
final DescribeCompanyNetworkConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeCompanyNetworkConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeCompanyNetworkConfigurationResult call() throws Exception {
DescribeCompanyNetworkConfigurationResult result = null;
try {
result = executeDescribeCompanyNetworkConfiguration(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future describeDeviceAsync(DescribeDeviceRequest request) {
return describeDeviceAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future describeDeviceAsync(final DescribeDeviceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeDeviceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeDeviceResult call() throws Exception {
DescribeDeviceResult result = null;
try {
result = executeDescribeDevice(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future describeDevicePolicyConfigurationAsync(
DescribeDevicePolicyConfigurationRequest request) {
return describeDevicePolicyConfigurationAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future describeDevicePolicyConfigurationAsync(
final DescribeDevicePolicyConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeDevicePolicyConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeDevicePolicyConfigurationResult call() throws Exception {
DescribeDevicePolicyConfigurationResult result = null;
try {
result = executeDescribeDevicePolicyConfiguration(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future describeDomainAsync(DescribeDomainRequest request) {
return describeDomainAsync(request, null);
}
@Override
@Deprecated
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
@Deprecated
public java.util.concurrent.Future describeFleetMetadataAsync(DescribeFleetMetadataRequest request) {
return describeFleetMetadataAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future describeFleetMetadataAsync(final DescribeFleetMetadataRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeFleetMetadataRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeFleetMetadataResult call() throws Exception {
DescribeFleetMetadataResult result = null;
try {
result = executeDescribeFleetMetadata(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future describeIdentityProviderConfigurationAsync(
DescribeIdentityProviderConfigurationRequest request) {
return describeIdentityProviderConfigurationAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future describeIdentityProviderConfigurationAsync(
final DescribeIdentityProviderConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeIdentityProviderConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeIdentityProviderConfigurationResult call() throws Exception {
DescribeIdentityProviderConfigurationResult result = null;
try {
result = executeDescribeIdentityProviderConfiguration(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future describeWebsiteCertificateAuthorityAsync(
DescribeWebsiteCertificateAuthorityRequest request) {
return describeWebsiteCertificateAuthorityAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future describeWebsiteCertificateAuthorityAsync(
final DescribeWebsiteCertificateAuthorityRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeWebsiteCertificateAuthorityRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeWebsiteCertificateAuthorityResult call() throws Exception {
DescribeWebsiteCertificateAuthorityResult result = null;
try {
result = executeDescribeWebsiteCertificateAuthority(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future disassociateDomainAsync(DisassociateDomainRequest request) {
return disassociateDomainAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future disassociateDomainAsync(final DisassociateDomainRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisassociateDomainRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisassociateDomainResult call() throws Exception {
DisassociateDomainResult result = null;
try {
result = executeDisassociateDomain(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future disassociateWebsiteAuthorizationProviderAsync(
DisassociateWebsiteAuthorizationProviderRequest request) {
return disassociateWebsiteAuthorizationProviderAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future disassociateWebsiteAuthorizationProviderAsync(
final DisassociateWebsiteAuthorizationProviderRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisassociateWebsiteAuthorizationProviderRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisassociateWebsiteAuthorizationProviderResult call() throws Exception {
DisassociateWebsiteAuthorizationProviderResult result = null;
try {
result = executeDisassociateWebsiteAuthorizationProvider(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future disassociateWebsiteCertificateAuthorityAsync(
DisassociateWebsiteCertificateAuthorityRequest request) {
return disassociateWebsiteCertificateAuthorityAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future disassociateWebsiteCertificateAuthorityAsync(
final DisassociateWebsiteCertificateAuthorityRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisassociateWebsiteCertificateAuthorityRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisassociateWebsiteCertificateAuthorityResult call() throws Exception {
DisassociateWebsiteCertificateAuthorityResult result = null;
try {
result = executeDisassociateWebsiteCertificateAuthority(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future listDevicesAsync(ListDevicesRequest request) {
return listDevicesAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future listDevicesAsync(final ListDevicesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListDevicesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListDevicesResult call() throws Exception {
ListDevicesResult result = null;
try {
result = executeListDevices(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future listDomainsAsync(ListDomainsRequest request) {
return listDomainsAsync(request, null);
}
@Override
@Deprecated
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
@Deprecated
public java.util.concurrent.Future listFleetsAsync(ListFleetsRequest request) {
return listFleetsAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future listFleetsAsync(final ListFleetsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListFleetsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListFleetsResult call() throws Exception {
ListFleetsResult result = null;
try {
result = executeListFleets(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future listTagsForResourceAsync(ListTagsForResourceRequest request) {
return listTagsForResourceAsync(request, null);
}
@Override
@Deprecated
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
@Deprecated
public java.util.concurrent.Future listWebsiteAuthorizationProvidersAsync(
ListWebsiteAuthorizationProvidersRequest request) {
return listWebsiteAuthorizationProvidersAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future listWebsiteAuthorizationProvidersAsync(
final ListWebsiteAuthorizationProvidersRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListWebsiteAuthorizationProvidersRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListWebsiteAuthorizationProvidersResult call() throws Exception {
ListWebsiteAuthorizationProvidersResult result = null;
try {
result = executeListWebsiteAuthorizationProviders(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future listWebsiteCertificateAuthoritiesAsync(
ListWebsiteCertificateAuthoritiesRequest request) {
return listWebsiteCertificateAuthoritiesAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future listWebsiteCertificateAuthoritiesAsync(
final ListWebsiteCertificateAuthoritiesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListWebsiteCertificateAuthoritiesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListWebsiteCertificateAuthoritiesResult call() throws Exception {
ListWebsiteCertificateAuthoritiesResult result = null;
try {
result = executeListWebsiteCertificateAuthorities(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future restoreDomainAccessAsync(RestoreDomainAccessRequest request) {
return restoreDomainAccessAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future restoreDomainAccessAsync(final RestoreDomainAccessRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final RestoreDomainAccessRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public RestoreDomainAccessResult call() throws Exception {
RestoreDomainAccessResult result = null;
try {
result = executeRestoreDomainAccess(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future revokeDomainAccessAsync(RevokeDomainAccessRequest request) {
return revokeDomainAccessAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future revokeDomainAccessAsync(final RevokeDomainAccessRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final RevokeDomainAccessRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public RevokeDomainAccessResult call() throws Exception {
RevokeDomainAccessResult result = null;
try {
result = executeRevokeDomainAccess(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future signOutUserAsync(SignOutUserRequest request) {
return signOutUserAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future signOutUserAsync(final SignOutUserRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final SignOutUserRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public SignOutUserResult call() throws Exception {
SignOutUserResult result = null;
try {
result = executeSignOutUser(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future tagResourceAsync(TagResourceRequest request) {
return tagResourceAsync(request, null);
}
@Override
@Deprecated
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
@Deprecated
public java.util.concurrent.Future untagResourceAsync(UntagResourceRequest request) {
return untagResourceAsync(request, null);
}
@Override
@Deprecated
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
@Deprecated
public java.util.concurrent.Future updateAuditStreamConfigurationAsync(UpdateAuditStreamConfigurationRequest request) {
return updateAuditStreamConfigurationAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future updateAuditStreamConfigurationAsync(
final UpdateAuditStreamConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateAuditStreamConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateAuditStreamConfigurationResult call() throws Exception {
UpdateAuditStreamConfigurationResult result = null;
try {
result = executeUpdateAuditStreamConfiguration(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future updateCompanyNetworkConfigurationAsync(
UpdateCompanyNetworkConfigurationRequest request) {
return updateCompanyNetworkConfigurationAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future updateCompanyNetworkConfigurationAsync(
final UpdateCompanyNetworkConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateCompanyNetworkConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateCompanyNetworkConfigurationResult call() throws Exception {
UpdateCompanyNetworkConfigurationResult result = null;
try {
result = executeUpdateCompanyNetworkConfiguration(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future updateDevicePolicyConfigurationAsync(
UpdateDevicePolicyConfigurationRequest request) {
return updateDevicePolicyConfigurationAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future updateDevicePolicyConfigurationAsync(
final UpdateDevicePolicyConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateDevicePolicyConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateDevicePolicyConfigurationResult call() throws Exception {
UpdateDevicePolicyConfigurationResult result = null;
try {
result = executeUpdateDevicePolicyConfiguration(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future updateDomainMetadataAsync(UpdateDomainMetadataRequest request) {
return updateDomainMetadataAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future updateDomainMetadataAsync(final UpdateDomainMetadataRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateDomainMetadataRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateDomainMetadataResult call() throws Exception {
UpdateDomainMetadataResult result = null;
try {
result = executeUpdateDomainMetadata(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future updateFleetMetadataAsync(UpdateFleetMetadataRequest request) {
return updateFleetMetadataAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future updateFleetMetadataAsync(final UpdateFleetMetadataRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateFleetMetadataRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateFleetMetadataResult call() throws Exception {
UpdateFleetMetadataResult result = null;
try {
result = executeUpdateFleetMetadata(finalRequest);
} catch (Exception ex) {
if (asyncHandler != null) {
asyncHandler.onError(ex);
}
throw ex;
}
if (asyncHandler != null) {
asyncHandler.onSuccess(finalRequest, result);
}
return result;
}
});
}
@Override
@Deprecated
public java.util.concurrent.Future updateIdentityProviderConfigurationAsync(
UpdateIdentityProviderConfigurationRequest request) {
return updateIdentityProviderConfigurationAsync(request, null);
}
@Override
@Deprecated
public java.util.concurrent.Future updateIdentityProviderConfigurationAsync(
final UpdateIdentityProviderConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateIdentityProviderConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateIdentityProviderConfigurationResult call() throws Exception {
UpdateIdentityProviderConfigurationResult result = null;
try {
result = executeUpdateIdentityProviderConfiguration(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