public class DownloadLaunchRunnable extends Object implements Runnable, ProcessCallback
DownloadTask to download.
else:
create single first connection and use FetchDataTask to fetch data from the
connection.
We use DownloadStatusCallback to handle all events sync to DB/filesystem and callback to
user.| Modifier and Type | Class and Description |
|---|---|
static class |
DownloadLaunchRunnable.Builder |
| Modifier and Type | Method and Description |
|---|---|
int |
getId() |
String |
getTempFilePath() |
boolean |
isAlive() |
boolean |
isRetry(Exception exception) |
void |
onCompleted(DownloadRunnable doneRunnable,
long startOffset,
long endOffset) |
void |
onError(Exception exception) |
void |
onProgress(long increaseBytes) |
void |
onRetry(Exception exception) |
void |
pause() |
void |
pending() |
void |
run() |
void |
syncProgressFromCache() |
public void pause()
public void pending()
public void onProgress(long increaseBytes)
onProgress in interface ProcessCallbackpublic void onCompleted(DownloadRunnable doneRunnable, long startOffset, long endOffset)
onCompleted in interface ProcessCallbackpublic boolean isRetry(Exception exception)
isRetry in interface ProcessCallbackpublic void onError(Exception exception)
onError in interface ProcessCallbackpublic void onRetry(Exception exception)
onRetry in interface ProcessCallbackpublic void syncProgressFromCache()
syncProgressFromCache in interface ProcessCallbackpublic int getId()
public boolean isAlive()
public String getTempFilePath()