Package com.biglybt.pif.download
Interface DownloadEventNotifier
-
- All Known Subinterfaces:
Download
- All Known Implementing Classes:
DownloadEventNotifierImpl
,DownloadImpl
,LWSDownload
,RPDownload
public interface DownloadEventNotifier
This interface defines what methods an object should have defined to be able to inform listener objects about various events which occur on a download. In previous versions of Azureus, theDownload
class was the only interface which defined these methods - nowDownloadManager.getGlobalDownloadEventNotifier()
supports these methods too.- Since:
- 3.0.0.9
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addActivationListener(DownloadActivationListener l)
Adds a listener that will be invoked when a request is made to activate a torrent.void
addAttributeListener(DownloadAttributeListener l, TorrentAttribute attr, int event_type)
Adds a listener that will be informed of when attributes on a download have been read / modified.void
addCompletionListener(DownloadCompletionListener l)
Adds a listener that will be informed when a download moves into a completed state.void
addDownloadWillBeRemovedListener(DownloadWillBeRemovedListener l)
Adds a listener that will be informed when a download is about to be removed.void
addListener(DownloadListener l)
Adds a listener that will be informed of changes to a download's state.void
addPeerListener(DownloadPeerListener l)
Adds a listener that will be informed of when peer managers have been added / removed for a download.void
addTrackerListener(DownloadTrackerListener l)
Adds a listener that will be informed when the latest announce/scrape results change.void
addTrackerListener(DownloadTrackerListener l, boolean immediateTrigger)
Adds a listener that will be informed when the latest announce/scrape results change.void
removeActivationListener(DownloadActivationListener l)
Removes a listener object added via theaddActivationListener(DownloadActivationListener)
method.void
removeAttributeListener(DownloadAttributeListener l, TorrentAttribute attr, int event_type)
Removes a listener object added via themethod.
void
removeCompletionListener(DownloadCompletionListener l)
Removes a listener object removed via theaddCompletionListener(DownloadCompletionListener)
method.void
removeDownloadWillBeRemovedListener(DownloadWillBeRemovedListener l)
Removes a listener object added via theaddDownloadWillBeRemovedListener(DownloadWillBeRemovedListener)
method.void
removeListener(DownloadListener l)
Removes a listener object added via theaddListener(DownloadListener)
method.void
removePeerListener(DownloadPeerListener l)
Removes a listener object added via theaddPeerListener(DownloadPeerListener)
method.void
removeTrackerListener(DownloadTrackerListener l)
Removes a listener object added via theaddTrackerListener(DownloadTrackerListener)
oraddTrackerListener(DownloadTrackerListener, boolean)
method.
-
-
-
Method Detail
-
addListener
void addListener(DownloadListener l)
Adds a listener that will be informed of changes to a download's state.- Parameters:
l
- The listener to add.- Since:
- 2.0.7.0
-
removeListener
void removeListener(DownloadListener l)
Removes a listener object added via theaddListener(DownloadListener)
method.- Parameters:
l
- The listener to remove.- Since:
- 2.0.7.0
-
addTrackerListener
void addTrackerListener(DownloadTrackerListener l)
Adds a listener that will be informed when the latest announce/scrape results change.Listener events will be immediately triggered after the listener has been added.
- Parameters:
l
- The listener to add.- Since:
- 2.0.7.0
-
addTrackerListener
void addTrackerListener(DownloadTrackerListener l, boolean immediateTrigger)
Adds a listener that will be informed when the latest announce/scrape results change.- Parameters:
l
- The listener to add.immediateTrigger
- Whether to immediately trigger listener's events.- Since:
- 2.4.0.3
-
removeTrackerListener
void removeTrackerListener(DownloadTrackerListener l)
Removes a listener object added via theaddTrackerListener(DownloadTrackerListener)
oraddTrackerListener(DownloadTrackerListener, boolean)
method.- Parameters:
l
- The listener to remove.- Since:
- 2.0.7.0
-
addDownloadWillBeRemovedListener
void addDownloadWillBeRemovedListener(DownloadWillBeRemovedListener l)
Adds a listener that will be informed when a download is about to be removed. This gives the implementor the opportunity to veto the removal.- Parameters:
l
- The listener to add.- Since:
- 2.0.7.0
-
removeDownloadWillBeRemovedListener
void removeDownloadWillBeRemovedListener(DownloadWillBeRemovedListener l)
Removes a listener object added via theaddDownloadWillBeRemovedListener(DownloadWillBeRemovedListener)
method.- Parameters:
l
- The listener to remove.- Since:
- 2.0.7.0
-
addActivationListener
void addActivationListener(DownloadActivationListener l)
Adds a listener that will be invoked when a request is made to activate a torrent.- Parameters:
l
- The listener to add.- Since:
- 2.4.0.3
-
removeActivationListener
void removeActivationListener(DownloadActivationListener l)
Removes a listener object added via theaddActivationListener(DownloadActivationListener)
method.- Parameters:
l
- The listener to remove.- Since:
- 2.4.0.3
-
addPeerListener
void addPeerListener(DownloadPeerListener l)
Adds a listener that will be informed of when peer managers have been added / removed for a download.- Parameters:
l
- The listener to add.- Since:
- 2.1.0.0
-
removePeerListener
void removePeerListener(DownloadPeerListener l)
Removes a listener object added via theaddPeerListener(DownloadPeerListener)
method.- Parameters:
l
- The listener to remove.- Since:
- 2.1.0.0
-
addAttributeListener
void addAttributeListener(DownloadAttributeListener l, TorrentAttribute attr, int event_type)
Adds a listener that will be informed of when attributes on a download have been read / modified.- Parameters:
l
- The listener to add.attr
- The torrent attribute to be notified about.event_type
- The type of event to be notified of, as defined onDownloadAttributeListener
.- Since:
- 3.0.3.5
-
removeAttributeListener
void removeAttributeListener(DownloadAttributeListener l, TorrentAttribute attr, int event_type)
Removes a listener object added via themethod.
- Parameters:
l
- The listener to remove.attr
- The torrent attribute which it registered with.event_type
- The type of event which it registered with.- Since:
- 3.0.3.5
-
addCompletionListener
void addCompletionListener(DownloadCompletionListener l)
Adds a listener that will be informed when a download moves into a completed state.- Parameters:
l
- The listener to add.- Since:
- 3.0.5.3
-
removeCompletionListener
void removeCompletionListener(DownloadCompletionListener l)
Removes a listener object removed via theaddCompletionListener(DownloadCompletionListener)
method.- Parameters:
l
- The listener to remove.- Since:
- 3.0.5.3
-
-