public class DownloadCallbackGroup<T> extends CallbackGroup<T> implements DownloadCallback<T>
| Constructor and Description |
|---|
DownloadCallbackGroup(DownloadCallback<T>[] callbacks) |
| Modifier and Type | Method and Description |
|---|---|
void |
retry(Throwable e,
int current,
int max)
Calls when download failed and the downloader will retry the download task.
|
void |
updateProgress(long done,
long total)
Calls when the progress of the download operation updated.
|
cancelled, done, failedpublic DownloadCallbackGroup(DownloadCallback<T>[] callbacks)
public void updateProgress(long done,
long total)
DownloadCallbackupdateProgress in interface DownloadCallback<T>done - the bytes downloadedtotal - the total bytes, -1 if unknownpublic void retry(Throwable e, int current, int max)
DownloadCallback
Notes: Callback.failed(Throwable) will be called only when the download failed and the downloader won't retry
it any more. If the downloader will retry the download task, this method will be called, instead of
Callback.failed(Throwable).
retry in interface DownloadCallback<T>e - the cause of download failurecurrent - the retry count (1 for the first, max-1 for the latest)max - the max number of triesCopyright © 2016. All rights reserved.