Interface DownloadRequest.TypedBuilder<T>
- All Superinterfaces:
Buildable
,CopyableBuilder<DownloadRequest.TypedBuilder<T>,
,DownloadRequest<T>> SdkBuilder<DownloadRequest.TypedBuilder<T>,
DownloadRequest<T>>
- Enclosing class:
DownloadRequest<ReturnT>
public static interface DownloadRequest.TypedBuilder<T>
extends CopyableBuilder<DownloadRequest.TypedBuilder<T>,DownloadRequest<T>>
The type-parameterized version of
DownloadRequest.UntypedBuilder
. This builder's type is inferred as part of specifying DownloadRequest.UntypedBuilder.responseTransformer(AsyncResponseTransformer)
, after which this builder can be used to construct a DownloadRequest
with the same generic type.-
Method Summary
Modifier and TypeMethodDescriptionaddTransferListener
(TransferListener transferListener) Add aTransferListener
that will be notified as part of this request.default DownloadRequest.TypedBuilder
<T> getObjectRequest
(Consumer<GetObjectRequest.Builder> getObjectRequestBuilder) TheGetObjectRequest
request that should be used for the downloadgetObjectRequest
(GetObjectRequest getObjectRequest) TheGetObjectRequest
request that should be used for the downloadresponseTransformer
(AsyncResponseTransformer<GetObjectResponse, T> responseTransformer) Specifies theAsyncResponseTransformer
that should be used for the download.transferListeners
(Collection<TransferListener> transferListeners) TheTransferListener
s that will be notified as part of this request.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Method Details
-
getObjectRequest
TheGetObjectRequest
request that should be used for the download- Parameters:
getObjectRequest
- the getObject request- Returns:
- a reference to this object so that method calls can be chained together.
- See Also:
-
getObjectRequest
default DownloadRequest.TypedBuilder<T> getObjectRequest(Consumer<GetObjectRequest.Builder> getObjectRequestBuilder) TheGetObjectRequest
request that should be used for the downloadThis is a convenience method that creates an instance of the
GetObjectRequest
builder, avoiding the need to create one manually viaGetObjectRequest.builder()
.- Parameters:
getObjectRequestBuilder
- the getObject request- Returns:
- a reference to this object so that method calls can be chained together.
- See Also:
-
transferListeners
TheTransferListener
s 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
Add aTransferListener
that 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
DownloadRequest.TypedBuilder<T> responseTransformer(AsyncResponseTransformer<GetObjectResponse, T> responseTransformer) Specifies theAsyncResponseTransformer
that should be used for the download. The generic type used is constrained by theDownloadRequest.UntypedBuilder.responseTransformer(AsyncResponseTransformer)
that was previously used to create thisDownloadRequest.TypedBuilder
.- Parameters:
responseTransformer
- the AsyncResponseTransformer- Returns:
- a reference to this object so that method calls can be chained together.
- See Also:
-