All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.medicalimaging.AWSMedicalImagingAsyncClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Health Imaging module holds the client classes that are used for communicating with AWS Health Imaging Service

The newest version!
/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.medicalimaging;

import javax.annotation.Generated;

import com.amazonaws.services.medicalimaging.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;

import java.util.concurrent.ExecutorService;

/**
 * Client for accessing AWS Health Imaging 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.
 * 

*

* This is the AWS HealthImaging API Reference. AWS HealthImaging is a HIPAA eligible service that empowers * healthcare providers, life science organizations, and their software partners to store, analyze, and share medical * images in the cloud at petabyte scale. For an introduction to the service, see the AWS HealthImaging Developer * Guide . *

* *

* We recommend using one of the AWS Software Development Kits (SDKs) for your programming language, as they take care * of request authentication, serialization, and connection management. For more information, see Tools to build on AWS. *

*
*

* The following sections list AWS HealthImaging API actions categorized according to functionality. Links are provided * to actions within this Reference, along with links back to corresponding sections in the AWS HealthImaging * Developer Guide where you can view tested code examples. *

*

* Data store actions *

* *

* Import job actions *

* *

* Image set access actions *

* *

* Image set modification actions *

* *

* Tagging actions *

* */ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSMedicalImagingAsyncClient extends AWSMedicalImagingClient implements AWSMedicalImagingAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; public static AWSMedicalImagingAsyncClientBuilder asyncBuilder() { return AWSMedicalImagingAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on AWS Health Imaging using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. */ AWSMedicalImagingAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on AWS Health Imaging using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AWSMedicalImagingAsyncClient(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 copyImageSetAsync(CopyImageSetRequest request) { return copyImageSetAsync(request, null); } @Override public java.util.concurrent.Future copyImageSetAsync(final CopyImageSetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CopyImageSetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CopyImageSetResult call() throws Exception { CopyImageSetResult result = null; try { result = executeCopyImageSet(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 createDatastoreAsync(CreateDatastoreRequest request) { return createDatastoreAsync(request, null); } @Override public java.util.concurrent.Future createDatastoreAsync(final CreateDatastoreRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateDatastoreRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateDatastoreResult call() throws Exception { CreateDatastoreResult result = null; try { result = executeCreateDatastore(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 deleteDatastoreAsync(DeleteDatastoreRequest request) { return deleteDatastoreAsync(request, null); } @Override public java.util.concurrent.Future deleteDatastoreAsync(final DeleteDatastoreRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteDatastoreRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteDatastoreResult call() throws Exception { DeleteDatastoreResult result = null; try { result = executeDeleteDatastore(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 deleteImageSetAsync(DeleteImageSetRequest request) { return deleteImageSetAsync(request, null); } @Override public java.util.concurrent.Future deleteImageSetAsync(final DeleteImageSetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteImageSetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteImageSetResult call() throws Exception { DeleteImageSetResult result = null; try { result = executeDeleteImageSet(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 getDICOMImportJobAsync(GetDICOMImportJobRequest request) { return getDICOMImportJobAsync(request, null); } @Override public java.util.concurrent.Future getDICOMImportJobAsync(final GetDICOMImportJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetDICOMImportJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetDICOMImportJobResult call() throws Exception { GetDICOMImportJobResult result = null; try { result = executeGetDICOMImportJob(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 getDatastoreAsync(GetDatastoreRequest request) { return getDatastoreAsync(request, null); } @Override public java.util.concurrent.Future getDatastoreAsync(final GetDatastoreRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetDatastoreRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetDatastoreResult call() throws Exception { GetDatastoreResult result = null; try { result = executeGetDatastore(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 getImageFrameAsync(GetImageFrameRequest request) { return getImageFrameAsync(request, null); } @Override public java.util.concurrent.Future getImageFrameAsync(final GetImageFrameRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetImageFrameRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetImageFrameResult call() throws Exception { GetImageFrameResult result = null; try { result = executeGetImageFrame(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 getImageSetAsync(GetImageSetRequest request) { return getImageSetAsync(request, null); } @Override public java.util.concurrent.Future getImageSetAsync(final GetImageSetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetImageSetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetImageSetResult call() throws Exception { GetImageSetResult result = null; try { result = executeGetImageSet(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 getImageSetMetadataAsync(GetImageSetMetadataRequest request) { return getImageSetMetadataAsync(request, null); } @Override public java.util.concurrent.Future getImageSetMetadataAsync(final GetImageSetMetadataRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetImageSetMetadataRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetImageSetMetadataResult call() throws Exception { GetImageSetMetadataResult result = null; try { result = executeGetImageSetMetadata(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 listDICOMImportJobsAsync(ListDICOMImportJobsRequest request) { return listDICOMImportJobsAsync(request, null); } @Override public java.util.concurrent.Future listDICOMImportJobsAsync(final ListDICOMImportJobsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDICOMImportJobsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDICOMImportJobsResult call() throws Exception { ListDICOMImportJobsResult result = null; try { result = executeListDICOMImportJobs(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 listDatastoresAsync(ListDatastoresRequest request) { return listDatastoresAsync(request, null); } @Override public java.util.concurrent.Future listDatastoresAsync(final ListDatastoresRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDatastoresRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDatastoresResult call() throws Exception { ListDatastoresResult result = null; try { result = executeListDatastores(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 listImageSetVersionsAsync(ListImageSetVersionsRequest request) { return listImageSetVersionsAsync(request, null); } @Override public java.util.concurrent.Future listImageSetVersionsAsync(final ListImageSetVersionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListImageSetVersionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListImageSetVersionsResult call() throws Exception { ListImageSetVersionsResult result = null; try { result = executeListImageSetVersions(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 searchImageSetsAsync(SearchImageSetsRequest request) { return searchImageSetsAsync(request, null); } @Override public java.util.concurrent.Future searchImageSetsAsync(final SearchImageSetsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final SearchImageSetsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public SearchImageSetsResult call() throws Exception { SearchImageSetsResult result = null; try { result = executeSearchImageSets(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 startDICOMImportJobAsync(StartDICOMImportJobRequest request) { return startDICOMImportJobAsync(request, null); } @Override public java.util.concurrent.Future startDICOMImportJobAsync(final StartDICOMImportJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartDICOMImportJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StartDICOMImportJobResult call() throws Exception { StartDICOMImportJobResult result = null; try { result = executeStartDICOMImportJob(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future tagResourceAsync(TagResourceRequest request) { return tagResourceAsync(request, null); } @Override public java.util.concurrent.Future tagResourceAsync(final TagResourceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final TagResourceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public TagResourceResult call() throws Exception { TagResourceResult result = null; try { result = executeTagResource(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future untagResourceAsync(UntagResourceRequest request) { return untagResourceAsync(request, null); } @Override public java.util.concurrent.Future untagResourceAsync(final UntagResourceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UntagResourceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UntagResourceResult call() throws Exception { UntagResourceResult result = null; try { result = executeUntagResource(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateImageSetMetadataAsync(UpdateImageSetMetadataRequest request) { return updateImageSetMetadataAsync(request, null); } @Override public java.util.concurrent.Future updateImageSetMetadataAsync(final UpdateImageSetMetadataRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateImageSetMetadataRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateImageSetMetadataResult call() throws Exception { UpdateImageSetMetadataResult result = null; try { result = executeUpdateImageSetMetadata(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