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 ofDownloadRequest.UntypedBuilder. This builder's type is inferred as part of specifyingDownloadRequest.UntypedBuilder.responseTransformer(AsyncResponseTransformer), after which this builder can be used to construct aDownloadRequestwith the same generic type.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description DownloadRequest.TypedBuilder<T>addTransferListener(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 downloadDownloadRequest.TypedBuilder<T>getObjectRequest(GetObjectRequest getObjectRequest)TheGetObjectRequestrequest that should be used for the downloadDownloadRequest.TypedBuilder<T>responseTransformer(AsyncResponseTransformer<GetObjectResponse,T> responseTransformer)Specifies theAsyncResponseTransformerthat should be used for the download.DownloadRequest.TypedBuilder<T>transferListeners(Collection<TransferListener> transferListeners)TheTransferListeners 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 Detail
-
getObjectRequest
DownloadRequest.TypedBuilder<T> getObjectRequest(GetObjectRequest 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(Consumer)
-
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:
getObjectRequest(GetObjectRequest)
-
transferListeners
DownloadRequest.TypedBuilder<T> 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:
TransferListener
-
addTransferListener
DownloadRequest.TypedBuilder<T> addTransferListener(TransferListener transferListener)
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:
TransferListener
-
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:
AsyncResponseTransformer
-
-