public interface DownloadHandle
DownloadHandle
provides control over an asynchronous download and access to the resulting file when the it
is completed. Modifier and Type | Interface and Description |
---|---|
static interface |
DownloadHandle.DownloadProgressListener
Callback interface; when registered the completed method will be invoked when the download terminates for any
reason.
|
Modifier and Type | Method and Description |
---|---|
void |
discard()
Releases any resources that may be held by the handle.
|
java.util.concurrent.Future<DownloadResult> |
start(DownloadHandle.DownloadProgressListener listener)
Starts the download, reporting the result and progress to the supplied listeners.
|
void |
stop()
Pauses the download.
|
java.util.concurrent.Future<DownloadResult> start(DownloadHandle.DownloadProgressListener listener)
null
.void stop()
void discard()