public class WebStartDownloader extends Object implements DownloadServiceListener
Modifier and Type | Class and Description |
---|---|
static class |
WebStartDownloader.Status
This enumeration contains the different Status on which
the downloading process of the jars can be.
|
Constructor and Description |
---|
WebStartDownloader()
Creates a default instance.
|
Modifier and Type | Method and Description |
---|---|
void |
downloadFailed(URL url,
String version) |
int |
getCurrentUpgradingPercentage()
Returns the completed percentage for the file being currently upgraded.
|
int |
getCurrentValidatingPercentage()
Returns the completed percentage for the file being currently validated.
|
int |
getDownloadPercentage()
Returns the current download percentage.
|
ApplicationException |
getException()
Returns the ApplicationException that has occurred during the download or
null if no exception occurred. |
WebStartDownloader.Status |
getStatus()
Returns the Status of the current download process.
|
LocalizableMessage |
getSummary()
Gets a summary message of the downloader's current progress.
|
boolean |
isFinished()
Returns
true if the install is finished and
false otherwise. |
void |
progress(URL url,
String version,
long readSoFar,
long total,
int overallPercent) |
void |
setSummary(LocalizableMessage summary)
Sets a summary message of the downloader's current progress.
|
void |
start(boolean forceDownload)
Starts the downloading of the jar files.
|
void |
upgradingArchive(URL url,
String version,
int patchPercent,
int overallPercent) |
void |
validating(URL url,
String version,
long entry,
long total,
int overallPercent) |
public WebStartDownloader()
public void start(boolean forceDownload)
true
the files will be re-downloaded even if they already
are on cache.
This method does not block the thread that calls it.forceDownload
- used to ignore the case and force download.public LocalizableMessage getSummary()
public void setSummary(LocalizableMessage summary)
summary
- String for showing the user progresspublic boolean isFinished()
true
if the install is finished and
false
otherwise.true
if the install is finished and
false
otherwise.public WebStartDownloader.Status getStatus()
public int getDownloadPercentage()
public int getCurrentValidatingPercentage()
public int getCurrentUpgradingPercentage()
public ApplicationException getException()
null
if no exception occurred.null
if no exception occurred.public void downloadFailed(URL url, String version)
downloadFailed
in interface DownloadServiceListener
public void progress(URL url, String version, long readSoFar, long total, int overallPercent)
progress
in interface DownloadServiceListener
public void upgradingArchive(URL url, String version, int patchPercent, int overallPercent)
upgradingArchive
in interface DownloadServiceListener
public void validating(URL url, String version, long entry, long total, int overallPercent)
validating
in interface DownloadServiceListener
Copyright © 2010-2015 ForgeRock AS. All Rights Reserved.