de.scheisseichfindemalkeinen.queue
Interface IDownloadListener

All Known Implementing Classes:
Pic

public interface IDownloadListener

Interface of QueueData for downloads, so they will know, when they are allowed to start the download, after they requested a download-slot.


Method Summary
 boolean downloadAllowed()
          Allows a Pic to start the download The Pic should then return true, if it has really started the pic or false if not.
 java.lang.String getContainerURL()
          Returns the Container-URL of a listener Since QueueData contains counters for the connections per domain the removeListener-Method needs the Container-URL to decrause the counter for the domain of the Container-URL.
 

Method Detail

downloadAllowed

boolean downloadAllowed()
Allows a Pic to start the download The Pic should then return true, if it has really started the pic or false if not. If it does return a wrong value, QueueData would start too many downloads or would not increase the counter and would not increase the slots used.

Returns:
True/False

getContainerURL

java.lang.String getContainerURL()
Returns the Container-URL of a listener Since QueueData contains counters for the connections per domain the removeListener-Method needs the Container-URL to decrause the counter for the domain of the Container-URL. I could also check if the listener is a Pic and then cast to Pic, but i did it with this way.

Returns:
Container-URL