Class RunEverythingPlugin
- java.lang.Object
-
- com.biglybt.plugin.startstoprules.always.RunEverythingPlugin
-
- All Implemented Interfaces:
DownloadListener
,DownloadManagerListener
,DownloadTrackerListener
,Plugin
public class RunEverythingPlugin extends java.lang.Object implements Plugin, DownloadManagerListener, DownloadListener, DownloadTrackerListener
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
RunEverythingPlugin.downloadData
-
Field Summary
Fields Modifier and Type Field Description private boolean
closing
private java.util.Map
downloads
private Monitor
downloads_mon
private LoggerChannel
logger
private PluginInterface
plugin_interface
private Semaphore
work_sem
-
Constructor Summary
Constructors Constructor Description RunEverythingPlugin()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
announceResult(DownloadAnnounceResult result)
An announce result has been returned from the trackerprotected void
checkRules()
void
downloadAdded(Download download)
void
downloadRemoved(Download download)
void
initialize(PluginInterface _pi)
This method is called when the Plugin is loaded by the clientstatic void
load(PluginInterface _plugin_interface)
protected void
log(java.lang.String str)
void
positionChanged(Download download, int oldPosition, int newPosition)
Position of download has changed.protected void
processLoop()
protected void
processSupport()
void
scrapeResult(DownloadScrapeResult result)
A scrape result has been returned from a trackervoid
stateChanged(Download download, int old_state, int new_state)
The Download's state has changed.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.biglybt.pif.Plugin
getInitialProperties
-
-
-
-
Field Detail
-
plugin_interface
private PluginInterface plugin_interface
-
logger
private LoggerChannel logger
-
downloads
private java.util.Map downloads
-
downloads_mon
private Monitor downloads_mon
-
work_sem
private Semaphore work_sem
-
closing
private volatile boolean closing
-
-
Method Detail
-
load
public static void load(PluginInterface _plugin_interface)
-
initialize
public void initialize(PluginInterface _pi)
Description copied from interface:Plugin
This method is called when the Plugin is loaded by the client- Specified by:
initialize
in interfacePlugin
- Parameters:
_pi
- the interface that the plugin must use to communicate with the client
-
downloadAdded
public void downloadAdded(Download download)
- Specified by:
downloadAdded
in interfaceDownloadManagerListener
-
downloadRemoved
public void downloadRemoved(Download download)
- Specified by:
downloadRemoved
in interfaceDownloadManagerListener
-
scrapeResult
public void scrapeResult(DownloadScrapeResult result)
Description copied from interface:DownloadTrackerListener
A scrape result has been returned from a tracker- Specified by:
scrapeResult
in interfaceDownloadTrackerListener
- Parameters:
result
- Information about the scrape
-
announceResult
public void announceResult(DownloadAnnounceResult result)
Description copied from interface:DownloadTrackerListener
An announce result has been returned from the tracker- Specified by:
announceResult
in interfaceDownloadTrackerListener
- Parameters:
result
- Information about the announce
-
stateChanged
public void stateChanged(Download download, int old_state, int new_state)
Description copied from interface:DownloadListener
The Download's state has changed. This is also triggered if the user toggles the Force Start on/off.- Specified by:
stateChanged
in interfaceDownloadListener
-
positionChanged
public void positionChanged(Download download, int oldPosition, int newPosition)
Description copied from interface:DownloadListener
Position of download has changed.- Specified by:
positionChanged
in interfaceDownloadListener
- Parameters:
download
- object in which the position has changedoldPosition
- position that the download used to be atnewPosition
- position that the download is now at
-
checkRules
protected void checkRules()
-
processLoop
protected void processLoop()
-
processSupport
protected void processSupport()
-
log
protected void log(java.lang.String str)
-
-