Interface PresignedDownloadRequest.UntypedBuilder
- Enclosing class:
- PresignedDownloadRequest<ReturnT>
public static interface PresignedDownloadRequest.UntypedBuilder
Initial calls to
PresignedDownloadRequest.builder() return an PresignedDownloadRequest.UntypedBuilder, where the builder is not yet
parameterized with the generic type associated with PresignedDownloadRequest.
This prevents the otherwise awkward syntax of having to explicitly cast the builder type, e.g.,
PresignedDownloadRequest.<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 PresignedDownloadRequest.TypedBuilder.-
Method Summary
Modifier and TypeMethodDescriptionaddTransferListener(TransferListener transferListener) Adds aTransferListenerthat will be notified as part of this request.presignedUrlDownloadRequest(Consumer<PresignedUrlDownloadRequest.Builder> presignedUrlDownloadRequestBuilder) ThePresignedUrlDownloadRequestrequest that should be used for the downloadpresignedUrlDownloadRequest(PresignedUrlDownloadRequest presignedUrlDownloadRequest) ThePresignedUrlDownloadRequestrequest that should be used for the downloadresponseTransformer(AsyncResponseTransformer<GetObjectResponse, T> responseTransformer) Specifies theAsyncResponseTransformerthat should be used for the download.transferListeners(Collection<TransferListener> transferListeners) TheTransferListeners that will be notified as part of this request.
-
Method Details
-
presignedUrlDownloadRequest
PresignedDownloadRequest.UntypedBuilder presignedUrlDownloadRequest(PresignedUrlDownloadRequest presignedUrlDownloadRequest) ThePresignedUrlDownloadRequestrequest that should be used for the download- Parameters:
presignedUrlDownloadRequest- the presigned URL download request- Returns:
- a reference to this object so that method calls can be chained together.
- See Also:
-
presignedUrlDownloadRequest
default PresignedDownloadRequest.UntypedBuilder presignedUrlDownloadRequest(Consumer<PresignedUrlDownloadRequest.Builder> presignedUrlDownloadRequestBuilder) ThePresignedUrlDownloadRequestrequest that should be used for the downloadThis is a convenience method that creates an instance of the
PresignedUrlDownloadRequestbuilder, avoiding the need to create one manually viaPresignedUrlDownloadRequest.builder().- Parameters:
presignedUrlDownloadRequestBuilder- the presigned URL download request- Returns:
- a reference to this object so that method calls can be chained together.
- See Also:
-
transferListeners
PresignedDownloadRequest.UntypedBuilder transferListeners(Collection<TransferListener> transferListeners) TheTransferListeners 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.- Parameters:
transferListeners- the collection of transferListeners- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
addTransferListener
Adds aTransferListenerthat will be notified as part of this request.- Parameters:
transferListener- the transferListener to add- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
responseTransformer
<T> PresignedDownloadRequest.TypedBuilder<T> responseTransformer(AsyncResponseTransformer<GetObjectResponse, T> responseTransformer) Specifies theAsyncResponseTransformerthat should be used for the download. This method also infers the generic type ofPresignedDownloadRequestto create, inferred from the second type parameter of the providedAsyncResponseTransformer. E.g, specifyingAsyncResponseTransformer.toBytes()would result in inferring the type of thePresignedDownloadRequestto be ofResponseBytes<GetObjectResponse>. See the static factory methods available inAsyncResponseTransformer.- Type Parameters:
T- the type ofPresignedDownloadRequestto create- Parameters:
responseTransformer- the AsyncResponseTransformer- Returns:
- a reference to this object so that method calls can be chained together.
- See Also:
-