public static interface DownloadRequest.UntypedBuilder
DownloadRequest.builder() return an DownloadRequest.UntypedBuilder, where the builder is not yet
parameterized with the generic type associated with DownloadRequest. This prevents the otherwise awkward syntax of
having to explicitly cast the builder type, e.g.,
DownloadRequest.<ResponseBytes<GetObjectResponse>>builder()
Instead, the type may be inferred as part of specifying the responseTransformer(AsyncResponseTransformer)
parameter, at which point the builder chain will return a new DownloadRequest.TypedBuilder.| Modifier and Type | Method and Description |
|---|---|
DownloadRequest.UntypedBuilder |
addTransferListener(TransferListener transferListener)
Adds a
TransferListener that will be notified as part of this request. |
default DownloadRequest.UntypedBuilder |
getObjectRequest(Consumer<GetObjectRequest.Builder> getObjectRequestBuilder)
The
GetObjectRequest request that should be used for the download |
DownloadRequest.UntypedBuilder |
getObjectRequest(GetObjectRequest getObjectRequest)
The
GetObjectRequest request that should be used for the download |
<T> DownloadRequest.TypedBuilder<T> |
responseTransformer(AsyncResponseTransformer<GetObjectResponse,T> responseTransformer)
Specifies the
AsyncResponseTransformer that should be used for the download. |
DownloadRequest.UntypedBuilder |
transferListeners(Collection<TransferListener> transferListeners)
The
TransferListeners that will be notified as part of this request. |
DownloadRequest.UntypedBuilder getObjectRequest(GetObjectRequest getObjectRequest)
GetObjectRequest request that should be used for the downloadgetObjectRequest - the getObject requestgetObjectRequest(Consumer)default DownloadRequest.UntypedBuilder getObjectRequest(Consumer<GetObjectRequest.Builder> getObjectRequestBuilder)
GetObjectRequest request that should be used for the download
This is a convenience method that creates an instance of the GetObjectRequest builder, avoiding the need to
create one manually via GetObjectRequest.builder().
getObjectRequestBuilder - the getObject requestgetObjectRequest(GetObjectRequest)DownloadRequest.UntypedBuilder transferListeners(Collection<TransferListener> transferListeners)
TransferListeners that will be notified as part of this request. This method overrides and replaces any
transferListeners that have already been set. Add an optional request override configuration.transferListeners - the collection of transferListenersTransferListenerDownloadRequest.UntypedBuilder addTransferListener(TransferListener transferListener)
TransferListener that will be notified as part of this request.transferListener - the transferListener to addTransferListener<T> DownloadRequest.TypedBuilder<T> responseTransformer(AsyncResponseTransformer<GetObjectResponse,T> responseTransformer)
AsyncResponseTransformer that should be used for the download. This method also infers the
generic type of DownloadRequest to create, inferred from the second type parameter of the provided AsyncResponseTransformer. E.g, specifying AsyncResponseTransformer.toBytes() would result in inferring the
type of the DownloadRequest to be of ResponseBytes<GetObjectResponse>. See the static factory methods
available in AsyncResponseTransformer.T - the type of DownloadRequest to createresponseTransformer - the AsyncResponseTransformerAsyncResponseTransformerCopyright © 2023. All rights reserved.