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 aTransferListenerthat will be notified as part of this request.default DownloadRequest.TypedBuilder<T>getObjectRequest(Consumer<GetObjectRequest.Builder> getObjectRequestBuilder) TheGetObjectRequestrequest that should be used for the downloadgetObjectRequest(GetObjectRequest getObjectRequest) TheGetObjectRequestrequest 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.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Method Details
-
getObjectRequest
TheGetObjectRequestrequest 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) TheGetObjectRequestrequest that should be used for the downloadThis is a convenience method that creates an instance of the
GetObjectRequestbuilder, 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
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
Add 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
DownloadRequest.TypedBuilder<T> responseTransformer(AsyncResponseTransformer<GetObjectResponse, T> responseTransformer) Specifies theAsyncResponseTransformerthat 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:
-