|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.lastbamboo.common.download.AbstractDownloader<T>
T - The downloader state type.public abstract class AbstractDownloader<T extends DownloaderState>
An abstract base class to help implement downloaders.
| Constructor Summary | |
|---|---|
AbstractDownloader()
Initializes this abstract base class. |
|
| Method Summary | |
|---|---|
void |
addListener(DownloaderListener<T> listener)
Adds a listener to be notified of events of this downloader. |
protected void |
fireStateChanged(T state)
Fires notification that this downloader's state has changed. |
long |
getStartTime()
Accessor the time the download started. |
void |
removeListener(DownloaderListener<T> listener)
Removes a listener that was being notified of events of this downloader. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.lastbamboo.common.download.Downloader |
|---|
getCompleteFile, getFinalName, getIncompleteFile, getSize, getState, isStarted, pause, resume, start, stop, write |
| Constructor Detail |
|---|
public AbstractDownloader()
| Method Detail |
|---|
protected final void fireStateChanged(T state)
state - The new state.public final void addListener(DownloaderListener<T> listener)
Downloader
addListener in interface Downloader<T extends DownloaderState>listener - The listener to be notified.public void removeListener(DownloaderListener<T> listener)
Downloader
removeListener in interface Downloader<T extends DownloaderState>listener - The listener to remove.public long getStartTime()
Downloader
getStartTime in interface Downloader<T extends DownloaderState>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||