@Generated(value="software.amazon.awssdk:codegen") @ThreadSafe public interface MediaStoreDataAsyncClient extends AwsClient
builder()
method.
An AWS Elemental MediaStore asset is an object, similar to an object in the Amazon S3 service. Objects are the fundamental entities that are stored in AWS Elemental MediaStore.
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_METADATA_ID
Value for looking up the service's metadata from the
ServiceMetadataProvider. |
static String |
SERVICE_NAME |
| Modifier and Type | Method and Description |
|---|---|
static MediaStoreDataAsyncClientBuilder |
builder()
Create a builder that can be used to configure and create a
MediaStoreDataAsyncClient. |
static MediaStoreDataAsyncClient |
create()
Create a
MediaStoreDataAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider. |
default CompletableFuture<DeleteObjectResponse> |
deleteObject(Consumer<DeleteObjectRequest.Builder> deleteObjectRequest)
Deletes an object at the specified path.
|
default CompletableFuture<DeleteObjectResponse> |
deleteObject(DeleteObjectRequest deleteObjectRequest)
Deletes an object at the specified path.
|
default CompletableFuture<DescribeObjectResponse> |
describeObject(Consumer<DescribeObjectRequest.Builder> describeObjectRequest)
Gets the headers for an object at the specified path.
|
default CompletableFuture<DescribeObjectResponse> |
describeObject(DescribeObjectRequest describeObjectRequest)
Gets the headers for an object at the specified path.
|
default <ReturnT> CompletableFuture<ReturnT> |
getObject(Consumer<GetObjectRequest.Builder> getObjectRequest,
AsyncResponseTransformer<GetObjectResponse,ReturnT> asyncResponseTransformer)
Downloads the object at the specified path.
|
default CompletableFuture<GetObjectResponse> |
getObject(Consumer<GetObjectRequest.Builder> getObjectRequest,
Path destinationPath)
Downloads the object at the specified path.
|
default <ReturnT> CompletableFuture<ReturnT> |
getObject(GetObjectRequest getObjectRequest,
AsyncResponseTransformer<GetObjectResponse,ReturnT> asyncResponseTransformer)
Downloads the object at the specified path.
|
default CompletableFuture<GetObjectResponse> |
getObject(GetObjectRequest getObjectRequest,
Path destinationPath)
Downloads the object at the specified path.
|
default CompletableFuture<ListItemsResponse> |
listItems(Consumer<ListItemsRequest.Builder> listItemsRequest)
Provides a list of metadata entries about folders and objects in the specified folder.
|
default CompletableFuture<ListItemsResponse> |
listItems(ListItemsRequest listItemsRequest)
Provides a list of metadata entries about folders and objects in the specified folder.
|
default ListItemsPublisher |
listItemsPaginator(Consumer<ListItemsRequest.Builder> listItemsRequest)
Provides a list of metadata entries about folders and objects in the specified folder.
|
default ListItemsPublisher |
listItemsPaginator(ListItemsRequest listItemsRequest)
Provides a list of metadata entries about folders and objects in the specified folder.
|
default CompletableFuture<PutObjectResponse> |
putObject(Consumer<PutObjectRequest.Builder> putObjectRequest,
AsyncRequestBody requestBody)
Uploads an object to the specified path.
|
default CompletableFuture<PutObjectResponse> |
putObject(Consumer<PutObjectRequest.Builder> putObjectRequest,
Path sourcePath)
Uploads an object to the specified path.
|
default CompletableFuture<PutObjectResponse> |
putObject(PutObjectRequest putObjectRequest,
AsyncRequestBody requestBody)
Uploads an object to the specified path.
|
default CompletableFuture<PutObjectResponse> |
putObject(PutObjectRequest putObjectRequest,
Path sourcePath)
Uploads an object to the specified path.
|
default MediaStoreDataServiceClientConfiguration |
serviceClientConfiguration() |
serviceNameclosestatic final String SERVICE_NAME
static final String SERVICE_METADATA_ID
ServiceMetadataProvider.default CompletableFuture<DeleteObjectResponse> deleteObject(DeleteObjectRequest deleteObjectRequest)
Deletes an object at the specified path.
deleteObjectRequest - default CompletableFuture<DeleteObjectResponse> deleteObject(Consumer<DeleteObjectRequest.Builder> deleteObjectRequest)
Deletes an object at the specified path.
This is a convenience which creates an instance of the DeleteObjectRequest.Builder avoiding the need to
create one manually via DeleteObjectRequest.builder()
deleteObjectRequest - A Consumer that will call methods on DeleteObjectRequest.Builder to create a request.default CompletableFuture<DescribeObjectResponse> describeObject(DescribeObjectRequest describeObjectRequest)
Gets the headers for an object at the specified path.
describeObjectRequest - default CompletableFuture<DescribeObjectResponse> describeObject(Consumer<DescribeObjectRequest.Builder> describeObjectRequest)
Gets the headers for an object at the specified path.
This is a convenience which creates an instance of the DescribeObjectRequest.Builder avoiding the need to
create one manually via DescribeObjectRequest.builder()
describeObjectRequest - A Consumer that will call methods on DescribeObjectRequest.Builder to create a request.default <ReturnT> CompletableFuture<ReturnT> getObject(GetObjectRequest getObjectRequest, AsyncResponseTransformer<GetObjectResponse,ReturnT> asyncResponseTransformer)
Downloads the object at the specified path. If the object’s upload availability is set to streaming,
AWS Elemental MediaStore downloads the object even if it’s still uploading the object.
getObjectRequest - asyncResponseTransformer - The response transformer for processing the streaming response in a non-blocking manner. See
AsyncResponseTransformer for details on how this callback should be implemented and for links to
precanned implementations for common scenarios like downloading to a file. The service documentation for
the response content is as follows '
The bytes of the object.
'.default <ReturnT> CompletableFuture<ReturnT> getObject(Consumer<GetObjectRequest.Builder> getObjectRequest, AsyncResponseTransformer<GetObjectResponse,ReturnT> asyncResponseTransformer)
Downloads the object at the specified path. If the object’s upload availability is set to streaming,
AWS Elemental MediaStore downloads the object even if it’s still uploading the object.
This is a convenience which creates an instance of the GetObjectRequest.Builder avoiding the need to
create one manually via GetObjectRequest.builder()
getObjectRequest - A Consumer that will call methods on GetObjectRequest.Builder to create a request.asyncResponseTransformer - The response transformer for processing the streaming response in a non-blocking manner. See
AsyncResponseTransformer for details on how this callback should be implemented and for links to
precanned implementations for common scenarios like downloading to a file. The service documentation for
the response content is as follows '
The bytes of the object.
'.default CompletableFuture<GetObjectResponse> getObject(GetObjectRequest getObjectRequest, Path destinationPath)
Downloads the object at the specified path. If the object’s upload availability is set to streaming,
AWS Elemental MediaStore downloads the object even if it’s still uploading the object.
getObjectRequest - destinationPath - Path to file that response contents will be written to. The file must not exist or this method
will throw an exception. If the file is not writable by the current user then an exception will be thrown.
The service documentation for the response content is as follows '
The bytes of the object.
'.default CompletableFuture<GetObjectResponse> getObject(Consumer<GetObjectRequest.Builder> getObjectRequest, Path destinationPath)
Downloads the object at the specified path. If the object’s upload availability is set to streaming,
AWS Elemental MediaStore downloads the object even if it’s still uploading the object.
This is a convenience which creates an instance of the GetObjectRequest.Builder avoiding the need to
create one manually via GetObjectRequest.builder()
getObjectRequest - A Consumer that will call methods on GetObjectRequest.Builder to create a request.destinationPath - Path to file that response contents will be written to. The file must not exist or this method
will throw an exception. If the file is not writable by the current user then an exception will be thrown.
The service documentation for the response content is as follows '
The bytes of the object.
'.default CompletableFuture<ListItemsResponse> listItems(ListItemsRequest listItemsRequest)
Provides a list of metadata entries about folders and objects in the specified folder.
listItemsRequest - default CompletableFuture<ListItemsResponse> listItems(Consumer<ListItemsRequest.Builder> listItemsRequest)
Provides a list of metadata entries about folders and objects in the specified folder.
This is a convenience which creates an instance of the ListItemsRequest.Builder avoiding the need to
create one manually via ListItemsRequest.builder()
listItemsRequest - A Consumer that will call methods on ListItemsRequest.Builder to create a request.default ListItemsPublisher listItemsPaginator(ListItemsRequest listItemsRequest)
Provides a list of metadata entries about folders and objects in the specified folder.
This is a variant of listItems(software.amazon.awssdk.services.mediastoredata.model.ListItemsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
SDK will internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe
method will result in a new Subscription i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.mediastoredata.paginators.ListItemsPublisher publisher = client.listItemsPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.mediastoredata.paginators.ListItemsPublisher publisher = client.listItemsPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.mediastoredata.model.ListItemsResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.mediastoredata.model.ListItemsResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listItems(software.amazon.awssdk.services.mediastoredata.model.ListItemsRequest) operation.
listItemsRequest - default ListItemsPublisher listItemsPaginator(Consumer<ListItemsRequest.Builder> listItemsRequest)
Provides a list of metadata entries about folders and objects in the specified folder.
This is a variant of listItems(software.amazon.awssdk.services.mediastoredata.model.ListItemsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
SDK will internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe
method will result in a new Subscription i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.mediastoredata.paginators.ListItemsPublisher publisher = client.listItemsPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.mediastoredata.paginators.ListItemsPublisher publisher = client.listItemsPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.mediastoredata.model.ListItemsResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.mediastoredata.model.ListItemsResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listItems(software.amazon.awssdk.services.mediastoredata.model.ListItemsRequest) operation.
This is a convenience which creates an instance of the ListItemsRequest.Builder avoiding the need to
create one manually via ListItemsRequest.builder()
listItemsRequest - A Consumer that will call methods on ListItemsRequest.Builder to create a request.default CompletableFuture<PutObjectResponse> putObject(PutObjectRequest putObjectRequest, AsyncRequestBody requestBody)
Uploads an object to the specified path. Object sizes are limited to 25 MB for standard upload availability and 10 MB for streaming upload availability.
putObjectRequest - requestBody - Functional interface that can be implemented to produce the request content in a non-blocking manner. The
size of the content is expected to be known up front. See AsyncRequestBody for specific details on
implementing this interface as well as links to precanned implementations for common scenarios like
uploading from a file. The service documentation for the request content is as follows '
The bytes to be stored.
'default CompletableFuture<PutObjectResponse> putObject(Consumer<PutObjectRequest.Builder> putObjectRequest, AsyncRequestBody requestBody)
Uploads an object to the specified path. Object sizes are limited to 25 MB for standard upload availability and 10 MB for streaming upload availability.
This is a convenience which creates an instance of the PutObjectRequest.Builder avoiding the need to
create one manually via PutObjectRequest.builder()
putObjectRequest - A Consumer that will call methods on PutObjectRequest.Builder to create a request.requestBody - Functional interface that can be implemented to produce the request content in a non-blocking manner. The
size of the content is expected to be known up front. See AsyncRequestBody for specific details on
implementing this interface as well as links to precanned implementations for common scenarios like
uploading from a file. The service documentation for the request content is as follows '
The bytes to be stored.
'default CompletableFuture<PutObjectResponse> putObject(PutObjectRequest putObjectRequest, Path sourcePath)
Uploads an object to the specified path. Object sizes are limited to 25 MB for standard upload availability and 10 MB for streaming upload availability.
putObjectRequest - sourcePath - Path to file containing data to send to the service. File will be read entirely and may be read
multiple times in the event of a retry. If the file does not exist or the current user does not have
access to read it then an exception will be thrown. The service documentation for the request content is
as follows '
The bytes to be stored.
'default CompletableFuture<PutObjectResponse> putObject(Consumer<PutObjectRequest.Builder> putObjectRequest, Path sourcePath)
Uploads an object to the specified path. Object sizes are limited to 25 MB for standard upload availability and 10 MB for streaming upload availability.
This is a convenience which creates an instance of the PutObjectRequest.Builder avoiding the need to
create one manually via PutObjectRequest.builder()
putObjectRequest - A Consumer that will call methods on PutObjectRequest.Builder to create a request.sourcePath - Path to file containing data to send to the service. File will be read entirely and may be read
multiple times in the event of a retry. If the file does not exist or the current user does not have
access to read it then an exception will be thrown. The service documentation for the request content is
as follows '
The bytes to be stored.
'default MediaStoreDataServiceClientConfiguration serviceClientConfiguration()
serviceClientConfiguration in interface AwsClientserviceClientConfiguration in interface SdkClientstatic MediaStoreDataAsyncClient create()
MediaStoreDataAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider.static MediaStoreDataAsyncClientBuilder builder()
MediaStoreDataAsyncClient.Copyright © 2023. All rights reserved.