org.lastbamboo.common.download
Interface SourceRanker

All Known Implementing Classes:
SourceRankerImpl

public interface SourceRanker

Interface for classes that rank available download sources.


Method Summary
 RangeDownloader getBestSource()
          Gets the best available source to download from.
 boolean hasMoreSources()
          Returns whether or not this ranker has more sources to download from.
 void onAvailable(RangeDownloader downloader)
          Notifies the ranker that the given source is available for work.
 void onFailed()
           
 

Method Detail

hasMoreSources

boolean hasMoreSources()
Returns whether or not this ranker has more sources to download from.

Returns:
true if this ranker has more sources, otherwise false.

getBestSource

RangeDownloader getBestSource()
Gets the best available source to download from. The best source will typically just be the fastest source.

Returns:
The best source to download from.

onAvailable

void onAvailable(RangeDownloader downloader)
Notifies the ranker that the given source is available for work. This will typically be called after a download worker has completed downloading its assigned range, for example.

Parameters:
downloader - The available downloader.

onFailed

void onFailed()


Copyright © 2013 LittleShoot. All Rights Reserved.