ecologylab.generic
Interface Downloadable

All Known Implementing Classes:
DownloadableFileToDisk, ZipDownload

public interface Downloadable

Objects that implement this interface can be passed to a DownloadProcessor.

Author:
andruid

Method Summary
 void downloadDone()
          Call to notify the object that its download is completed;
 void handleIoError()
          Called in case an IO error happens.
 boolean handleTimeout()
          Called in case a timeout happens.
 boolean isDownloadDone()
          Called to inquire on the status of a download.
 boolean isRecycled()
          True if the Downloadable has been recycled, and thus should not be downloaded.
 void performDownload()
          Called to start download.
 

Method Detail

performDownload

void performDownload()
                     throws java.lang.Exception
Called to start download.

Throws:
java.lang.Exception

isDownloadDone

boolean isDownloadDone()
Called to inquire on the status of a download.

Returns:
true if the download is complete.

handleTimeout

boolean handleTimeout()
Called in case a timeout happens.

Returns:
true, if the object is able to abort the download and release resources.

handleIoError

void handleIoError()
Called in case an IO error happens.


downloadDone

void downloadDone()
Call to notify the object that its download is completed;


isRecycled

boolean isRecycled()
True if the Downloadable has been recycled, and thus should not be downloaded.

Returns: