Class DownloadEventNotifierImpl
java.lang.Object
com.biglybt.pifimpl.local.download.DownloadEventNotifierImpl
- All Implemented Interfaces:
DownloadEventNotifier
This is an implementation of DownloadEventNotifier to be simplify life for
plugins if they want to register event listeners across all downloads managed
by the client.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
class
class
class
class
class
class
class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a listener that will be invoked when a request is made to activate a torrent.void
addAttributeListener
(DownloadAttributeListener listener, TorrentAttribute ta, int event_type) Adds a listener that will be informed of when attributes on a download have been read / modified.void
Adds a listener that will be informed when a download moves into a completed state.void
Adds a listener that will be informed when a download is about to be removed.void
Adds a listener that will be informed of changes to a download's state.void
Adds a listener that will be informed of when peer managers have been added / removed for a download.void
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.private Map
getAttributeListenerMap
(int event_type) void
Removes a listener object added via theDownloadEventNotifier.addActivationListener(DownloadActivationListener)
method.void
removeAttributeListener
(DownloadAttributeListener listener, TorrentAttribute ta, int event_type) void
Removes a listener object removed via theDownloadEventNotifier.addCompletionListener(DownloadCompletionListener)
method.void
Removes a listener object added via theDownloadEventNotifier.addDownloadWillBeRemovedListener(DownloadWillBeRemovedListener)
method.void
Removes a listener object added via theDownloadEventNotifier.addListener(DownloadListener)
method.void
Removes a listener object added via theDownloadEventNotifier.addPeerListener(DownloadPeerListener)
method.void
Removes a listener object added via theDownloadEventNotifier.addTrackerListener(DownloadTrackerListener)
orDownloadEventNotifier.addTrackerListener(DownloadTrackerListener, boolean)
method.
-
Field Details
-
download_activation_notifier
-
download_notifier
-
download_peer_notifier
-
download_tracker_notifier
-
download_tracker_notifier_instant
-
download_will_be_removed_notifier
-
download_completion_notifier
-
dm
-
read_attribute_listeners
-
write_attribute_listeners
-
-
Constructor Details
-
DownloadEventNotifierImpl
-
-
Method Details
-
addActivationListener
Description copied from interface:DownloadEventNotifier
Adds a listener that will be invoked when a request is made to activate a torrent.- Specified by:
addActivationListener
in interfaceDownloadEventNotifier
- Parameters:
l
- The listener to add.
-
addCompletionListener
Description copied from interface:DownloadEventNotifier
Adds a listener that will be informed when a download moves into a completed state.- Specified by:
addCompletionListener
in interfaceDownloadEventNotifier
- Parameters:
l
- The listener to add.
-
addDownloadWillBeRemovedListener
Description copied from interface:DownloadEventNotifier
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.- Specified by:
addDownloadWillBeRemovedListener
in interfaceDownloadEventNotifier
- Parameters:
l
- The listener to add.
-
addListener
Description copied from interface:DownloadEventNotifier
Adds a listener that will be informed of changes to a download's state.- Specified by:
addListener
in interfaceDownloadEventNotifier
- Parameters:
l
- The listener to add.
-
addPeerListener
Description copied from interface:DownloadEventNotifier
Adds a listener that will be informed of when peer managers have been added / removed for a download.- Specified by:
addPeerListener
in interfaceDownloadEventNotifier
- Parameters:
l
- The listener to add.
-
addTrackerListener
Description copied from interface:DownloadEventNotifier
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.
- Specified by:
addTrackerListener
in interfaceDownloadEventNotifier
- Parameters:
l
- The listener to add.
-
addTrackerListener
Description copied from interface:DownloadEventNotifier
Adds a listener that will be informed when the latest announce/scrape results change.- Specified by:
addTrackerListener
in interfaceDownloadEventNotifier
- Parameters:
l
- The listener to add.immediateTrigger
- Whether to immediately trigger listener's events.
-
removeActivationListener
Description copied from interface:DownloadEventNotifier
Removes a listener object added via theDownloadEventNotifier.addActivationListener(DownloadActivationListener)
method.- Specified by:
removeActivationListener
in interfaceDownloadEventNotifier
- Parameters:
l
- The listener to remove.
-
removeCompletionListener
Description copied from interface:DownloadEventNotifier
Removes a listener object removed via theDownloadEventNotifier.addCompletionListener(DownloadCompletionListener)
method.- Specified by:
removeCompletionListener
in interfaceDownloadEventNotifier
- Parameters:
l
- The listener to remove.
-
removeDownloadWillBeRemovedListener
Description copied from interface:DownloadEventNotifier
Removes a listener object added via theDownloadEventNotifier.addDownloadWillBeRemovedListener(DownloadWillBeRemovedListener)
method.- Specified by:
removeDownloadWillBeRemovedListener
in interfaceDownloadEventNotifier
- Parameters:
l
- The listener to remove.
-
removeListener
Description copied from interface:DownloadEventNotifier
Removes a listener object added via theDownloadEventNotifier.addListener(DownloadListener)
method.- Specified by:
removeListener
in interfaceDownloadEventNotifier
- Parameters:
l
- The listener to remove.
-
removePeerListener
Description copied from interface:DownloadEventNotifier
Removes a listener object added via theDownloadEventNotifier.addPeerListener(DownloadPeerListener)
method.- Specified by:
removePeerListener
in interfaceDownloadEventNotifier
- Parameters:
l
- The listener to remove.
-
removeTrackerListener
Description copied from interface:DownloadEventNotifier
Removes a listener object added via theDownloadEventNotifier.addTrackerListener(DownloadTrackerListener)
orDownloadEventNotifier.addTrackerListener(DownloadTrackerListener, boolean)
method.- Specified by:
removeTrackerListener
in interfaceDownloadEventNotifier
- Parameters:
l
- The listener to remove.
-
addAttributeListener
public void addAttributeListener(DownloadAttributeListener listener, TorrentAttribute ta, int event_type) Description copied from interface:DownloadEventNotifier
Adds a listener that will be informed of when attributes on a download have been read / modified.- Specified by:
addAttributeListener
in interfaceDownloadEventNotifier
- Parameters:
listener
- The listener to add.ta
- The torrent attribute to be notified about.event_type
- The type of event to be notified of, as defined onDownloadAttributeListener
.
-
removeAttributeListener
public void removeAttributeListener(DownloadAttributeListener listener, TorrentAttribute ta, int event_type) Description copied from interface:DownloadEventNotifier
Removes a listener object added via theinvalid input: 'method. @param l The listener to remove. @param attr The torrent attribute which it registered with. @param event_type The type of event which it registered with. @since 3.0.3.5'
- Specified by:
removeAttributeListener
in interfaceDownloadEventNotifier
-
getAttributeListenerMap
-