com.amazonaws.services.quicksight.AmazonQuickSightAsyncClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-java-sdk-quicksight Show documentation
Show all versions of aws-java-sdk-quicksight Show documentation
The AWS Java SDK for Amazon QuickSight module holds the client classes that are used for communicating with Amazon QuickSight Service
/*
* Copyright 2014-2019 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.quicksight;
import javax.annotation.Generated;
import com.amazonaws.services.quicksight.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import java.util.concurrent.ExecutorService;
/**
* Client for accessing Amazon QuickSight 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 QuickSight API Reference
*
* Amazon QuickSight is a fully managed, serverless, cloud business intelligence service that makes it easy to extend
* data and insights to every user in your organization. This API interface reference contains documentation for a
* programming interface that you can use to manage Amazon QuickSight.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AmazonQuickSightAsyncClient extends AmazonQuickSightClient implements AmazonQuickSightAsync {
private static final int DEFAULT_THREAD_POOL_SIZE = 50;
private final java.util.concurrent.ExecutorService executorService;
public static AmazonQuickSightAsyncClientBuilder asyncBuilder() {
return AmazonQuickSightAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon QuickSight using the specified
* parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AmazonQuickSightAsyncClient(AwsAsyncClientParams asyncClientParams) {
super(asyncClientParams);
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 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 createGroupMembershipAsync(CreateGroupMembershipRequest request) {
return createGroupMembershipAsync(request, null);
}
@Override
public java.util.concurrent.Future createGroupMembershipAsync(final CreateGroupMembershipRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateGroupMembershipRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateGroupMembershipResult call() throws Exception {
CreateGroupMembershipResult result = null;
try {
result = executeCreateGroupMembership(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 deleteGroupMembershipAsync(DeleteGroupMembershipRequest request) {
return deleteGroupMembershipAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteGroupMembershipAsync(final DeleteGroupMembershipRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteGroupMembershipRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteGroupMembershipResult call() throws Exception {
DeleteGroupMembershipResult result = null;
try {
result = executeDeleteGroupMembership(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 deleteUserByPrincipalIdAsync(DeleteUserByPrincipalIdRequest request) {
return deleteUserByPrincipalIdAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteUserByPrincipalIdAsync(final DeleteUserByPrincipalIdRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteUserByPrincipalIdRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteUserByPrincipalIdResult call() throws Exception {
DeleteUserByPrincipalIdResult result = null;
try {
result = executeDeleteUserByPrincipalId(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 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 getDashboardEmbedUrlAsync(GetDashboardEmbedUrlRequest request) {
return getDashboardEmbedUrlAsync(request, null);
}
@Override
public java.util.concurrent.Future getDashboardEmbedUrlAsync(final GetDashboardEmbedUrlRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetDashboardEmbedUrlRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetDashboardEmbedUrlResult call() throws Exception {
GetDashboardEmbedUrlResult result = null;
try {
result = executeGetDashboardEmbedUrl(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 listGroupMembershipsAsync(ListGroupMembershipsRequest request) {
return listGroupMembershipsAsync(request, null);
}
@Override
public java.util.concurrent.Future listGroupMembershipsAsync(final ListGroupMembershipsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListGroupMembershipsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListGroupMembershipsResult call() throws Exception {
ListGroupMembershipsResult result = null;
try {
result = executeListGroupMemberships(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 listUserGroupsAsync(ListUserGroupsRequest request) {
return listUserGroupsAsync(request, null);
}
@Override
public java.util.concurrent.Future listUserGroupsAsync(final ListUserGroupsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListUserGroupsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListUserGroupsResult call() throws Exception {
ListUserGroupsResult result = null;
try {
result = executeListUserGroups(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 registerUserAsync(RegisterUserRequest request) {
return registerUserAsync(request, null);
}
@Override
public java.util.concurrent.Future registerUserAsync(final RegisterUserRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final RegisterUserRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public RegisterUserResult call() throws Exception {
RegisterUserResult result = null;
try {
result = executeRegisterUser(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 updateGroupAsync(UpdateGroupRequest request) {
return updateGroupAsync(request, null);
}
@Override
public java.util.concurrent.Future updateGroupAsync(final UpdateGroupRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateGroupRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateGroupResult call() throws Exception {
UpdateGroupResult result = null;
try {
result = executeUpdateGroup(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 updateUserAsync(UpdateUserRequest request) {
return updateUserAsync(request, null);
}
@Override
public java.util.concurrent.Future updateUserAsync(final UpdateUserRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateUserRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateUserResult call() throws Exception {
UpdateUserResult result = null;
try {
result = executeUpdateUser(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