FileDocCategorySizeDatePackage
PluginInterface.javaAPI DocAzureus 3.0.3.413294Fri Sep 07 09:14:08 BST 2007org.gudy.azureus2.plugins

PluginInterface

public interface PluginInterface
Defines the communication interface between Azureus and Plugins
author
Olivier

Fields Summary
Constructors Summary
Methods Summary
public voidaddColumnToMyTorrentsTable(java.lang.String columnName, org.gudy.azureus2.plugins.ui.tables.mytorrents.PluginMyTorrentsItemFactory factory)
(DEPRECATED) Adds a column to the My Torrents table.

param
columnName the key name of the column
param
factory the factory responsible of creating items. Azureus will look-up for MyTorrentsView.columnName into the lang files in order to find the localized displayName. (see i18n)
since
2.0.8.0
deprecated
use {@link org.gudy.azureus2.plugins.ui.tables.TableManager}

public voidaddColumnToPeersTable(java.lang.String columnName, org.gudy.azureus2.plugins.ui.tables.peers.PluginPeerItemFactory factory)
(DEPRECATED) Adds a column to the peers table.

param
columnName the key name of the column
param
factory the factory responsible of creating items. Azureus will look-up for PeersView.columnName into the lang files in order to find the localized displayName. (see i18n)
since
2.0.6.0
deprecated
use {@link org.gudy.azureus2.plugins.ui.tables.TableManager}

public voidaddConfigSection(org.gudy.azureus2.plugins.ui.config.ConfigSection section)
adds a ConfigSection to the config view.

In contrast to addConfigUIParameters, this gives you total control over a tab. Please be kind and use localizable text.

param
section ConfigSection to be added to the Config view
since
2.0.8.0

public voidaddConfigUIParameters(org.gudy.azureus2.plugins.ui.config.Parameter[] parameters, java.lang.String displayName)
adds a tab under the 'plugins' tab in the config view.
Use {@link #getPluginConfigUIFactory()} to get the {@link PluginConfigUIFactory} class, from which you can create different types of parameters.

param
parameters the Parameter(s) to be edited
param
displayName the under which it should display.
Azureus will look-up for ConfigView.section.plugins.displayName; into the lang files in order to find the localized displayName. (see i18n)
since
2.0.6.0

public voidaddEventListener(PluginEventListener l)

since
2.0.8.0

public voidaddListener(PluginListener l)

since
2.0.7.0

public voidaddView(PluginView view)
A Plugin might call this method to add a View to Azureus's views The View will be accessible from View > Plugins > View name

param
view The PluginView to be added
since
2.0.4.0
deprecated
use {@link org.gudy.azureus2.ui.swt.plugins.UISWTInstance#addView}

public voidfirePluginEvent(PluginEvent event)
Fire a plugin-specific event. See PluginEvent for details of type values to use

since
2403
param
event

public java.lang.StringgetAzureusName()
Retrieve the Application's name

return
the Application's name
since
2.1.0.0

public java.lang.StringgetAzureusVersion()
Retrieve the Application's version as a string.

return
Application's version. Typically in the following formats (regexp):
[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+
[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+_CVS
[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+_B[0-9]+
since
2.1.0.0

public ClientIDManagergetClientIDManager()

return
since
2.2.0.3

public org.gudy.azureus2.plugins.ui.config.ConfigSection[]getConfigSections()

return
List of ConfigSections for this plugin
since
2.5.0.1

public org.gudy.azureus2.plugins.network.ConnectionManagergetConnectionManager()
Get the connection manager.

since
2.2.0.3
return
manager

public org.gudy.azureus2.plugins.ddb.DistributedDatabasegetDistributedDatabase()
Get the distributed database

since
2.2.0.3
return

public org.gudy.azureus2.plugins.download.DownloadManagergetDownloadManager()
Gives access to the download manager

return
An object that allows management of downloads
since
2.0.7.0

public org.gudy.azureus2.plugins.ipc.IPCInterfacegetIPC()
get the inter-plugin-communcations interface for this plugin

return

public org.gudy.azureus2.plugins.ipfilter.IPFiltergetIPFilter()
Gives access to the IP filter

return
An object that allows access to IP Filtering
since
2.0.8.0

public org.gudy.azureus2.plugins.PluginInterfacegetLocalPluginInterface(java.lang.Class plugin, java.lang.String id)
Returns an initialised plugin instance with its own scope (e.g. for config params). Designed for loading secondary plugins directly from a primary one. Note - ensure that the bundled secondary plugins do *not* contain a plugin.properties as this will cause no end of problems.

param
plugin must implement Plugin
param
id the unique id of this plugin (used to scope config params etc)
return

public org.gudy.azureus2.plugins.logging.LoggergetLogger()
Gives access to the logger

return
The logger
since
2.0.7.0

public org.gudy.azureus2.plugins.messaging.MessageManagergetMessageManager()
Get the peer messaging manager.

since
2.2.0.3
return
manager

public org.gudy.azureus2.plugins.peers.protocol.PeerProtocolManagergetPeerProtocolManager()
Gives access to the peer protocol manager

return
An object that allows management of Peer Protocols
decprecated
2307 If you want to handle extensions plugin into the announce protocol itself
since
2.0.7.0

public org.gudy.azureus2.plugins.platform.PlatformManagergetPlatformManager()
Gets the platform manager that gives access to native functionality

return

public PlugingetPlugin()
Gives access to the plugin itself

return
since
2.1.0.0

public java.lang.ClassLoadergetPluginClassLoader()
gives access to the ClassLoader used to load the plugin

return
since
2.0.8.0

public org.gudy.azureus2.plugins.ui.config.PluginConfigUIFactorygetPluginConfigUIFactory()
gives acess to the plugin Config UI Factory

return
the PluginConfigUIFactory associated with this plugin

public java.lang.StringgetPluginDirectoryName()
gives access to the plugin installation path

return
the full path the plugin is installed in
since
2.0.4.0

public java.lang.StringgetPluginID()
Returns an identifier used to identify this particular plugin

return
since
2.1.0.0

public PluginManagergetPluginManager()
gives access to the plugin manager

return
since
2.1.0.0

public java.lang.StringgetPluginName()
Returns the value of plugin.name if it exists in the properties file, dirctory name otherwise

return
since
2.1.0.0

public java.util.PropertiesgetPluginProperties()
gives access to the plugin properties

return
the properties from the file plugin.properties
since
2.0.4.0

public java.lang.StringgetPluginVersion()
Returns the version number of the plugin it if can be deduced from either the name of the jar file it is loaded from or the properties file. null otherwise

return
Version number as a string, or null
since
2.1.0.0

public PluginConfiggetPluginconfig()
gives access to the plugin config interface

return
the PluginConfig object associated with this plugin

public org.gudy.azureus2.plugins.sharing.ShareManagergetShareManager()
Gives access to the sharing functionality

return
since
2.0.7.0

public org.gudy.azureus2.plugins.utils.ShortCutsgetShortCuts()
access to a set of convenience routines for doing things in a quicker, although less structured, fashion

return
since
2.1.0.0

public org.gudy.azureus2.plugins.torrent.TorrentManagergetTorrentManager()
Gives access to the torrent manager

return
An object to manage torrents
since
2.0.8.0

public org.gudy.azureus2.plugins.tracker.TrackergetTracker()
Gives access to the tracker functionality

return
The tracker
since
2.0.6.0

public UIManagergetUIManager()
access to UI extension features

return
since
2.1.0.0

public org.gudy.azureus2.plugins.update.UpdateManagergetUpdateManager()
access to the update manager used to update plugins. required for non-Azureus SF hosted plugins (SF ones are managed automatically)

return
since
2.1.0.0

public org.gudy.azureus2.plugins.utils.UtilitiesgetUtilities()
access to various utility functions

return
since
2.1.0.0

public booleanisBuiltIn()
Built-in plugins are those used internally by Azureus, for example the UPnP plugin

return

public booleanisDisabled()

public booleanisInitialisationThread()
Indicates whether or not the current thread is the one responsible for running plugin initialisation

return

public booleanisMandatory()
Whether or not this is a mandatory plugin. Mandatory plugins take priority over update checks, for example, over optional ones.

public booleanisOperational()
If a plugin fails to load properly (i.e. the construction of the plugin object fails) it is marked as non-operational (rather than not being present at all)

return
whether or not the plugin is operational or not
since
2.1.0.0

public booleanisShared()

since
2503/3005
return

public booleanisUnloadable()

since
2.1.0.0

public voidopenTorrentFile(java.lang.String fileName)
opens a torrent file given its name

param
fileName The Name of the file that azureus must open
since
2.0.4.0
deprecated
Use {@link DownloadManager#addDownload}

public voidopenTorrentURL(java.lang.String url)
opens a torrent file given the url it's at

param
url The String representation of the url pointing to a torrent file
since
2.0.4.0
deprecated
Use {@link DownloadManager#addDownload}

public voidreload()

since
2.1.0.0

public voidremoveConfigSection(org.gudy.azureus2.plugins.ui.config.ConfigSection section)

param
section
since
2.3.0.5

public voidremoveEventListener(PluginEventListener l)

since
2.0.8.0

public voidremoveListener(PluginListener l)

since
2.0.7.0

public voidsetDisabled(boolean disabled)

since
2.3.0.1
param
disabled

public voiduninstall()
Uninstall this plugin if it has been loaded from a plugin directory. Deletes the plugin directory

throws
PluginException

public voidunload()

since
2.1.0.0