public final class DefaultFileDownload extends Object implements FileDownload
| Constructor and Description |
|---|
DefaultFileDownload(CompletableFuture<CompletedFileDownload> completedFileDownloadFuture,
TransferProgress progress,
Supplier<DownloadFileRequest> requestSupplier,
ResumableFileDownload resumedDownload) |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<CompletedFileDownload> |
completionFuture() |
ResumableFileDownload |
pause()
Pause the current download operation and returns the information that can
be used to resume the download at a later time.
|
TransferProgress |
progress()
The stateful
TransferProgress associated with this transfer. |
String |
toString() |
public DefaultFileDownload(CompletableFuture<CompletedFileDownload> completedFileDownloadFuture, TransferProgress progress, Supplier<DownloadFileRequest> requestSupplier, ResumableFileDownload resumedDownload)
public TransferProgress progress()
ObjectTransferTransferProgress associated with this transfer.progress in interface ObjectTransferpublic ResumableFileDownload pause()
FileDownload
The information object is serializable for persistent storage until it should be resumed.
See ResumableFileDownload for supported formats.
pause in interface FileDownloadResumableFileDownload that can be used to resume the download.public CompletableFuture<CompletedFileDownload> completionFuture()
completionFuture in interface FileDownloadcompletionFuture in interface TransferCopyright © 2023. All rights reserved.