Methods Summary |
---|
private void | allDownloadsComplete()
boolean bRequiresRestart = false;
boolean bHadMandatoryUpdates = false;
for (int i = 0; i < updates.length; i++) {
Update update = updates[i];
// updates with no downloaders exist for admin purposes only
if ( update.getDownloaders().length > 0){
if (update.getRestartRequired() != Update.RESTART_REQUIRED_NO) {
bRequiresRestart = true;
}
if ( update.isMandatory()){
bHadMandatoryUpdates = true;
}
}
}
completionCallback.allUpdatesComplete(bRequiresRestart,bHadMandatoryUpdates);
|
public boolean | completed(org.gudy.azureus2.plugins.utils.resourcedownloader.ResourceDownloader downloader, java.io.InputStream data)
downloader.removeListener(this);
if (!nextUpdate()) {
// fire in another thread so completed function can exit
AEThread thread = new AEThread("AllDownloadsComplete", true) {
public void runSupport() {
allDownloadsComplete();
}
};
thread.start();
}
return true;
|
public void | failed(org.gudy.azureus2.plugins.utils.resourcedownloader.ResourceDownloader downloader, org.gudy.azureus2.plugins.utils.resourcedownloader.ResourceDownloaderException e)
downloader.removeListener(this);
iterDownloaders.remove();
nextUpdate();
|
private boolean | nextUpdate()
if (iterDownloaders.hasNext()) {
ResourceDownloader downloader = (ResourceDownloader) iterDownloaders.next();
downloader.addListener(this);
downloader.asyncDownload();
return true;
}
return false;
|
public void | reportActivity(org.gudy.azureus2.plugins.utils.resourcedownloader.ResourceDownloader downloader, java.lang.String activity)
|
public void | reportAmountComplete(org.gudy.azureus2.plugins.utils.resourcedownloader.ResourceDownloader downloader, long amount)
|
public void | reportPercentComplete(org.gudy.azureus2.plugins.utils.resourcedownloader.ResourceDownloader downloader, int percentage)
|
private void | start()
for (int i = 0; i < updates.length; i++) {
Update update = updates[i];
ResourceDownloader[] rds = update.getDownloaders();
for (int j = 0; j < rds.length; j++) {
ResourceDownloader rd = rds[j];
downloaders.add(rd);
}
}
iterDownloaders = downloaders.iterator();
nextUpdate();
|