Class ShareHosterPlugin
- java.lang.Object
-
- com.biglybt.plugin.sharing.hoster.ShareHosterPlugin
-
- All Implemented Interfaces:
Plugin
,PluginListener
,ShareManagerListener
public class ShareHosterPlugin extends java.lang.Object implements Plugin, PluginListener, ShareManagerListener
-
-
Field Summary
Fields Modifier and Type Field Description private Download
download_being_removed
private DownloadManager
download_manager
private LoggerChannel
log
private PluginInterface
plugin_interface
private java.util.Map<ShareResource,Download>
resource_dl_map
private java.util.Map<ShareResource,TrackerTorrent>
resource_tt_map
private ShareManager
share_manager
private TagManager
tag_manager
private java.util.Map<Taggable,ShareResource>
taggable_map
private TrackerTorrent
torrent_being_removed
private Tracker
tracker
-
Constructor Summary
Constructors Constructor Description ShareHosterPlugin()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private Download
addDownload(ShareResource resource, Torrent torrent, java.io.File torrent_file, java.io.File data_file)
protected void
canResourceBeDeleted(ShareResource resource)
void
closedownComplete()
void
closedownInitiated()
private java.util.Set<Tag>
decodeTags(java.lang.String tags_str)
protected void
initialise()
void
initializationComplete()
void
initialize(PluginInterface _plugin_interface)
This method is called when the Plugin is loaded by the clientstatic void
load(PluginInterface plugin_interface)
void
reportCurrentTask(java.lang.String task_description)
void
reportProgress(int percent_complete)
void
resourceAdded(ShareResource resource)
void
resourceDeleted(ShareResource resource)
void
resourceModified(ShareResource old_resource, ShareResource new_resource)
-
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
-
log
private LoggerChannel log
-
tracker
private Tracker tracker
-
share_manager
private ShareManager share_manager
-
download_manager
private DownloadManager download_manager
-
tag_manager
private final TagManager tag_manager
-
resource_dl_map
private java.util.Map<ShareResource,Download> resource_dl_map
-
resource_tt_map
private java.util.Map<ShareResource,TrackerTorrent> resource_tt_map
-
taggable_map
private java.util.Map<Taggable,ShareResource> taggable_map
-
download_being_removed
private Download download_being_removed
-
torrent_being_removed
private TrackerTorrent torrent_being_removed
-
-
Method Detail
-
load
public static void load(PluginInterface plugin_interface)
-
initialize
public void initialize(PluginInterface _plugin_interface)
Description copied from interface:Plugin
This method is called when the Plugin is loaded by the client- Specified by:
initialize
in interfacePlugin
- Parameters:
_plugin_interface
- the interface that the plugin must use to communicate with the client
-
initializationComplete
public void initializationComplete()
- Specified by:
initializationComplete
in interfacePluginListener
-
initialise
protected void initialise()
-
closedownInitiated
public void closedownInitiated()
- Specified by:
closedownInitiated
in interfacePluginListener
-
closedownComplete
public void closedownComplete()
- Specified by:
closedownComplete
in interfacePluginListener
-
resourceAdded
public void resourceAdded(ShareResource resource)
- Specified by:
resourceAdded
in interfaceShareManagerListener
-
addDownload
private Download addDownload(ShareResource resource, Torrent torrent, java.io.File torrent_file, java.io.File data_file) throws DownloadException
- Throws:
DownloadException
-
decodeTags
private java.util.Set<Tag> decodeTags(java.lang.String tags_str)
-
canResourceBeDeleted
protected void canResourceBeDeleted(ShareResource resource) throws ShareResourceDeletionVetoException
-
resourceModified
public void resourceModified(ShareResource old_resource, ShareResource new_resource)
- Specified by:
resourceModified
in interfaceShareManagerListener
-
resourceDeleted
public void resourceDeleted(ShareResource resource)
- Specified by:
resourceDeleted
in interfaceShareManagerListener
-
reportProgress
public void reportProgress(int percent_complete)
- Specified by:
reportProgress
in interfaceShareManagerListener
-
reportCurrentTask
public void reportCurrentTask(java.lang.String task_description)
- Specified by:
reportCurrentTask
in interfaceShareManagerListener
-
-