org.gudy.azureus2.ui.swt.update
Class UpdateAutoDownloader

java.lang.Object
  extended by org.gudy.azureus2.ui.swt.update.UpdateAutoDownloader
All Implemented Interfaces:
ResourceDownloaderListener

public class UpdateAutoDownloader
extends java.lang.Object
implements ResourceDownloaderListener

Author:
TuxPaper

Nested Class Summary
static interface UpdateAutoDownloader.cbCompletion
           
 
Constructor Summary
UpdateAutoDownloader(Update[] updates, UpdateAutoDownloader.cbCompletion completionCallback)
           
 
Method Summary
 boolean completed(ResourceDownloader downloader, java.io.InputStream data)
           
 void failed(ResourceDownloader downloader, ResourceDownloaderException e)
           
 void reportActivity(ResourceDownloader downloader, java.lang.String activity)
           
 void reportAmountComplete(ResourceDownloader downloader, long amount)
           
 void reportPercentComplete(ResourceDownloader downloader, int percentage)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateAutoDownloader

public UpdateAutoDownloader(Update[] updates,
                            UpdateAutoDownloader.cbCompletion completionCallback)
Parameters:
us -
Method Detail

completed

public boolean completed(ResourceDownloader downloader,
                         java.io.InputStream data)
Specified by:
completed in interface ResourceDownloaderListener
Returns:
return true if the completed download is OK. If false is returned then if there are alternative download sources they will be tried. If there are no other sources then the download will be "failed"

failed

public void failed(ResourceDownloader downloader,
                   ResourceDownloaderException e)
Specified by:
failed in interface ResourceDownloaderListener

reportActivity

public void reportActivity(ResourceDownloader downloader,
                           java.lang.String activity)
Specified by:
reportActivity in interface ResourceDownloaderListener

reportAmountComplete

public void reportAmountComplete(ResourceDownloader downloader,
                                 long amount)
Specified by:
reportAmountComplete in interface ResourceDownloaderListener

reportPercentComplete

public void reportPercentComplete(ResourceDownloader downloader,
                                  int percentage)
Specified by:
reportPercentComplete in interface ResourceDownloaderListener