com.amazonaws.services.finspacedata.AWSFinSpaceDataAsyncClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-java-sdk-finspacedata Show documentation
Show all versions of aws-java-sdk-finspacedata Show documentation
The AWS Java SDK for FinSpace Public API module holds the client classes that are used for communicating with FinSpace Public API 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.finspacedata;
import javax.annotation.Generated;
import com.amazonaws.services.finspacedata.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import java.util.concurrent.ExecutorService;
/**
* Client for accessing FinSpace Data 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.
*
*
* The FinSpace APIs let you take actions inside the FinSpace.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AWSFinSpaceDataAsyncClient extends AWSFinSpaceDataClient implements AWSFinSpaceDataAsync {
private static final int DEFAULT_THREAD_POOL_SIZE = 50;
private final java.util.concurrent.ExecutorService executorService;
public static AWSFinSpaceDataAsyncClientBuilder asyncBuilder() {
return AWSFinSpaceDataAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on FinSpace Data using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AWSFinSpaceDataAsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on FinSpace Data using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AWSFinSpaceDataAsyncClient(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 createChangesetAsync(CreateChangesetRequest request) {
return createChangesetAsync(request, null);
}
@Override
public java.util.concurrent.Future createChangesetAsync(final CreateChangesetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateChangesetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateChangesetResult call() throws Exception {
CreateChangesetResult result = null;
try {
result = executeCreateChangeset(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 createDataViewAsync(CreateDataViewRequest request) {
return createDataViewAsync(request, null);
}
@Override
public java.util.concurrent.Future createDataViewAsync(final CreateDataViewRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateDataViewRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateDataViewResult call() throws Exception {
CreateDataViewResult result = null;
try {
result = executeCreateDataView(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 createDatasetAsync(CreateDatasetRequest request) {
return createDatasetAsync(request, null);
}
@Override
public java.util.concurrent.Future createDatasetAsync(final CreateDatasetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateDatasetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateDatasetResult call() throws Exception {
CreateDatasetResult result = null;
try {
result = executeCreateDataset(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 createPermissionGroupAsync(CreatePermissionGroupRequest request) {
return createPermissionGroupAsync(request, null);
}
@Override
public java.util.concurrent.Future createPermissionGroupAsync(final CreatePermissionGroupRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreatePermissionGroupRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreatePermissionGroupResult call() throws Exception {
CreatePermissionGroupResult result = null;
try {
result = executeCreatePermissionGroup(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 deleteDatasetAsync(DeleteDatasetRequest request) {
return deleteDatasetAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteDatasetAsync(final DeleteDatasetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteDatasetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteDatasetResult call() throws Exception {
DeleteDatasetResult result = null;
try {
result = executeDeleteDataset(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 deletePermissionGroupAsync(DeletePermissionGroupRequest request) {
return deletePermissionGroupAsync(request, null);
}
@Override
public java.util.concurrent.Future deletePermissionGroupAsync(final DeletePermissionGroupRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeletePermissionGroupRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeletePermissionGroupResult call() throws Exception {
DeletePermissionGroupResult result = null;
try {
result = executeDeletePermissionGroup(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 disableUserAsync(DisableUserRequest request) {
return disableUserAsync(request, null);
}
@Override
public java.util.concurrent.Future disableUserAsync(final DisableUserRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DisableUserRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DisableUserResult call() throws Exception {
DisableUserResult result = null;
try {
result = executeDisableUser(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 enableUserAsync(EnableUserRequest request) {
return enableUserAsync(request, null);
}
@Override
public java.util.concurrent.Future enableUserAsync(final EnableUserRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final EnableUserRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public EnableUserResult call() throws Exception {
EnableUserResult result = null;
try {
result = executeEnableUser(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 getChangesetAsync(GetChangesetRequest request) {
return getChangesetAsync(request, null);
}
@Override
public java.util.concurrent.Future getChangesetAsync(final GetChangesetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetChangesetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetChangesetResult call() throws Exception {
GetChangesetResult result = null;
try {
result = executeGetChangeset(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 getDataViewAsync(GetDataViewRequest request) {
return getDataViewAsync(request, null);
}
@Override
public java.util.concurrent.Future getDataViewAsync(final GetDataViewRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetDataViewRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetDataViewResult call() throws Exception {
GetDataViewResult result = null;
try {
result = executeGetDataView(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 getDatasetAsync(GetDatasetRequest request) {
return getDatasetAsync(request, null);
}
@Override
public java.util.concurrent.Future getDatasetAsync(final GetDatasetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetDatasetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetDatasetResult call() throws Exception {
GetDatasetResult result = null;
try {
result = executeGetDataset(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 getProgrammaticAccessCredentialsAsync(
GetProgrammaticAccessCredentialsRequest request) {
return getProgrammaticAccessCredentialsAsync(request, null);
}
@Override
public java.util.concurrent.Future getProgrammaticAccessCredentialsAsync(
final GetProgrammaticAccessCredentialsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetProgrammaticAccessCredentialsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetProgrammaticAccessCredentialsResult call() throws Exception {
GetProgrammaticAccessCredentialsResult result = null;
try {
result = executeGetProgrammaticAccessCredentials(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 getUserAsync(GetUserRequest request) {
return getUserAsync(request, null);
}
@Override
public java.util.concurrent.Future getUserAsync(final GetUserRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetUserRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetUserResult call() throws Exception {
GetUserResult result = null;
try {
result = executeGetUser(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 getWorkingLocationAsync(GetWorkingLocationRequest request) {
return getWorkingLocationAsync(request, null);
}
@Override
public java.util.concurrent.Future getWorkingLocationAsync(final GetWorkingLocationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetWorkingLocationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetWorkingLocationResult call() throws Exception {
GetWorkingLocationResult result = null;
try {
result = executeGetWorkingLocation(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 listChangesetsAsync(ListChangesetsRequest request) {
return listChangesetsAsync(request, null);
}
@Override
public java.util.concurrent.Future listChangesetsAsync(final ListChangesetsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListChangesetsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListChangesetsResult call() throws Exception {
ListChangesetsResult result = null;
try {
result = executeListChangesets(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 listDataViewsAsync(ListDataViewsRequest request) {
return listDataViewsAsync(request, null);
}
@Override
public java.util.concurrent.Future listDataViewsAsync(final ListDataViewsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListDataViewsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListDataViewsResult call() throws Exception {
ListDataViewsResult result = null;
try {
result = executeListDataViews(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 listDatasetsAsync(ListDatasetsRequest request) {
return listDatasetsAsync(request, null);
}
@Override
public java.util.concurrent.Future listDatasetsAsync(final ListDatasetsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListDatasetsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListDatasetsResult call() throws Exception {
ListDatasetsResult result = null;
try {
result = executeListDatasets(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 listPermissionGroupsAsync(ListPermissionGroupsRequest request) {
return listPermissionGroupsAsync(request, null);
}
@Override
public java.util.concurrent.Future listPermissionGroupsAsync(final ListPermissionGroupsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListPermissionGroupsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListPermissionGroupsResult call() throws Exception {
ListPermissionGroupsResult result = null;
try {
result = executeListPermissionGroups(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 resetUserPasswordAsync(ResetUserPasswordRequest request) {
return resetUserPasswordAsync(request, null);
}
@Override
public java.util.concurrent.Future resetUserPasswordAsync(final ResetUserPasswordRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ResetUserPasswordRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ResetUserPasswordResult call() throws Exception {
ResetUserPasswordResult result = null;
try {
result = executeResetUserPassword(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 updateChangesetAsync(UpdateChangesetRequest request) {
return updateChangesetAsync(request, null);
}
@Override
public java.util.concurrent.Future updateChangesetAsync(final UpdateChangesetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateChangesetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateChangesetResult call() throws Exception {
UpdateChangesetResult result = null;
try {
result = executeUpdateChangeset(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 updateDatasetAsync(UpdateDatasetRequest request) {
return updateDatasetAsync(request, null);
}
@Override
public java.util.concurrent.Future updateDatasetAsync(final UpdateDatasetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateDatasetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateDatasetResult call() throws Exception {
UpdateDatasetResult result = null;
try {
result = executeUpdateDataset(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 updatePermissionGroupAsync(UpdatePermissionGroupRequest request) {
return updatePermissionGroupAsync(request, null);
}
@Override
public java.util.concurrent.Future updatePermissionGroupAsync(final UpdatePermissionGroupRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdatePermissionGroupRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdatePermissionGroupResult call() throws Exception {
UpdatePermissionGroupResult result = null;
try {
result = executeUpdatePermissionGroup(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