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 classclassclassclassclassclassclassclass -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a listener that will be invoked when a request is made to activate a torrent.voidaddAttributeListener(DownloadAttributeListener listener, TorrentAttribute ta, int event_type) Adds a listener that will be informed of when attributes on a download have been read / modified.voidAdds a listener that will be informed when a download moves into a completed state.voidAdds a listener that will be informed when a download is about to be removed.voidAdds a listener that will be informed of changes to a download's state.voidAdds a listener that will be informed of when peer managers have been added / removed for a download.voidAdds a listener that will be informed when the latest announce/scrape results change.voidaddTrackerListener(DownloadTrackerListener l, boolean immediateTrigger) Adds a listener that will be informed when the latest announce/scrape results change.private MapgetAttributeListenerMap(int event_type) voidRemoves a listener object added via theDownloadEventNotifier.addActivationListener(DownloadActivationListener)method.voidremoveAttributeListener(DownloadAttributeListener listener, TorrentAttribute ta, int event_type) voidRemoves a listener object removed via theDownloadEventNotifier.addCompletionListener(DownloadCompletionListener)method.voidRemoves a listener object added via theDownloadEventNotifier.addDownloadWillBeRemovedListener(DownloadWillBeRemovedListener)method.voidRemoves a listener object added via theDownloadEventNotifier.addListener(DownloadListener)method.voidRemoves a listener object added via theDownloadEventNotifier.addPeerListener(DownloadPeerListener)method.voidRemoves 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:DownloadEventNotifierAdds a listener that will be invoked when a request is made to activate a torrent.- Specified by:
addActivationListenerin interfaceDownloadEventNotifier- Parameters:
l- The listener to add.
-
addCompletionListener
Description copied from interface:DownloadEventNotifierAdds a listener that will be informed when a download moves into a completed state.- Specified by:
addCompletionListenerin interfaceDownloadEventNotifier- Parameters:
l- The listener to add.
-
addDownloadWillBeRemovedListener
Description copied from interface:DownloadEventNotifierAdds 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:
addDownloadWillBeRemovedListenerin interfaceDownloadEventNotifier- Parameters:
l- The listener to add.
-
addListener
Description copied from interface:DownloadEventNotifierAdds a listener that will be informed of changes to a download's state.- Specified by:
addListenerin interfaceDownloadEventNotifier- Parameters:
l- The listener to add.
-
addPeerListener
Description copied from interface:DownloadEventNotifierAdds a listener that will be informed of when peer managers have been added / removed for a download.- Specified by:
addPeerListenerin interfaceDownloadEventNotifier- Parameters:
l- The listener to add.
-
addTrackerListener
Description copied from interface:DownloadEventNotifierAdds 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:
addTrackerListenerin interfaceDownloadEventNotifier- Parameters:
l- The listener to add.
-
addTrackerListener
Description copied from interface:DownloadEventNotifierAdds a listener that will be informed when the latest announce/scrape results change.- Specified by:
addTrackerListenerin interfaceDownloadEventNotifier- Parameters:
l- The listener to add.immediateTrigger- Whether to immediately trigger listener's events.
-
removeActivationListener
Description copied from interface:DownloadEventNotifierRemoves a listener object added via theDownloadEventNotifier.addActivationListener(DownloadActivationListener)method.- Specified by:
removeActivationListenerin interfaceDownloadEventNotifier- Parameters:
l- The listener to remove.
-
removeCompletionListener
Description copied from interface:DownloadEventNotifierRemoves a listener object removed via theDownloadEventNotifier.addCompletionListener(DownloadCompletionListener)method.- Specified by:
removeCompletionListenerin interfaceDownloadEventNotifier- Parameters:
l- The listener to remove.
-
removeDownloadWillBeRemovedListener
Description copied from interface:DownloadEventNotifierRemoves a listener object added via theDownloadEventNotifier.addDownloadWillBeRemovedListener(DownloadWillBeRemovedListener)method.- Specified by:
removeDownloadWillBeRemovedListenerin interfaceDownloadEventNotifier- Parameters:
l- The listener to remove.
-
removeListener
Description copied from interface:DownloadEventNotifierRemoves a listener object added via theDownloadEventNotifier.addListener(DownloadListener)method.- Specified by:
removeListenerin interfaceDownloadEventNotifier- Parameters:
l- The listener to remove.
-
removePeerListener
Description copied from interface:DownloadEventNotifierRemoves a listener object added via theDownloadEventNotifier.addPeerListener(DownloadPeerListener)method.- Specified by:
removePeerListenerin interfaceDownloadEventNotifier- Parameters:
l- The listener to remove.
-
removeTrackerListener
Description copied from interface:DownloadEventNotifierRemoves a listener object added via theDownloadEventNotifier.addTrackerListener(DownloadTrackerListener)orDownloadEventNotifier.addTrackerListener(DownloadTrackerListener, boolean)method.- Specified by:
removeTrackerListenerin interfaceDownloadEventNotifier- Parameters:
l- The listener to remove.
-
addAttributeListener
public void addAttributeListener(DownloadAttributeListener listener, TorrentAttribute ta, int event_type) Description copied from interface:DownloadEventNotifierAdds a listener that will be informed of when attributes on a download have been read / modified.- Specified by:
addAttributeListenerin 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:DownloadEventNotifierRemoves 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:
removeAttributeListenerin interfaceDownloadEventNotifier
-
getAttributeListenerMap
-