|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gudy.azureus2.pluginsimpl.local.PluginInterfaceImpl
public final class PluginInterfaceImpl
| Nested Class Summary | |
|---|---|
protected class |
PluginInterfaceImpl.propertyWrapper
|
| Field Summary | |
|---|---|
protected java.util.List |
children
|
protected java.lang.ClassLoader |
class_loader
|
| Constructor Summary | |
|---|---|
protected |
PluginInterfaceImpl(Plugin _plugin,
PluginInitializer _initialiser,
java.lang.Object _initialiser_key,
java.lang.ClassLoader _class_loader,
java.util.List<java.io.File> _verified_files,
java.lang.String _key,
java.util.Properties _props,
java.lang.String _pluginDir,
java.lang.String _plugin_id,
java.lang.String _plugin_version)
|
| Method Summary | |
|---|---|
void |
addConfigSection(ConfigSection section)
adds a ConfigSection to the config view. |
void |
addConfigUIParameters(Parameter[] parameters,
java.lang.String displayName)
adds a tab under the 'plugins' tab in the config view. Use PluginInterface.getPluginConfigUIFactory() to get the
PluginConfigUIFactory class, from which you can create different
types of parameters. |
void |
addEventListener(PluginEventListener l)
|
void |
addListener(PluginListener l)
|
protected void |
closedownComplete()
|
protected void |
closedownInitiated()
|
protected void |
destroy()
|
protected void |
fireInitComplete(PluginListener listener)
|
void |
firePluginEvent(PluginEvent event)
Fire a plugin-specific event. |
protected void |
firePluginEventSupport(PluginEvent event)
|
protected void |
generateEvidence(IndentWriter writer)
|
java.lang.String |
getApplicationName()
Returns the name of the application that the user sees - if you need to display the name of the program, you should use this method. |
java.lang.String |
getAzureusName()
Retrieve the name of the application. |
java.lang.String |
getAzureusVersion()
Retrieve the Application's version as a string. |
ClientIDManager |
getClientIDManager()
|
ConfigSection[] |
getConfigSections()
|
ConnectionManager |
getConnectionManager()
Get the connection manager. |
DistributedDatabase |
getDistributedDatabase()
Get the distributed database |
DownloadManager |
getDownloadManager()
Gives access to the download manager |
java.lang.Object |
getInitializerKey()
|
IPCInterfaceImpl |
getIPC()
get the inter-plugin-communcations interface for this plugin |
IPFilter |
getIPFilter()
Gives access to the IP filter |
PluginInterface |
getLocalPluginInterface(java.lang.Class plugin_class,
java.lang.String id)
Returns an initialised plugin instance with its own scope (e.g. |
Logger |
getLogger()
Gives access to the logger |
MainlineDHTManager |
getMainlineDHTManager()
Returns the manager object for registering plugins that connect to the Mainline DHT. |
MessageManager |
getMessageManager()
Get the peer messaging manager. |
java.lang.String |
getPerUserPluginDirectoryName()
gives access to the per-user plugin directory. |
PlatformManager |
getPlatformManager()
Gets the platform manager that gives access to native functionality |
Plugin |
getPlugin()
Gives access to the plugin itself |
java.lang.ClassLoader |
getPluginClassLoader()
gives access to the ClassLoader used to load the plugin |
PluginConfig |
getPluginconfig()
gives access to the plugin config interface |
java.lang.String |
getPluginConfigKey()
|
PluginConfigUIFactory |
getPluginConfigUIFactory()
gives access to the plugin Config UI Factory |
java.lang.String |
getPluginDirectoryName()
Gives access to the plugin installation path - note, if you want to use this path to store data files in, it would be better for you to use PluginConfig.getPluginUserFile(String) instead. |
java.lang.String |
getPluginID()
Returns an identifier used to identify this particular plugin |
PluginManager |
getPluginManager()
gives access to the plugin manager |
java.lang.String |
getPluginName()
Returns the value of "plugin.name" if it exists in the properties file, otherwise the directory name is returned. |
java.util.Properties |
getPluginProperties()
gives access to the plugin properties |
PluginState |
getPluginState()
Returns an object that provides information the current state of the plugin, and provides various mechanisms to query and control plugins and their integration with Azureus at a low-level. |
java.lang.String |
getPluginVersion()
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. |
ShareManager |
getShareManager()
Gives access to the sharing functionality |
ShortCuts |
getShortCuts()
access to a set of convenience routines for doing things in a quicker, although less structured, fashion |
TorrentManager |
getTorrentManager()
Gives access to the torrent manager |
Tracker |
getTracker()
Gives access to the tracker functionality |
UIManager |
getUIManager()
access to UI extension features |
UpdateManager |
getUpdateManager()
access to the update manager used to update plugins. |
Utilities |
getUtilities()
access to various utility functions |
protected void |
initialisationComplete()
|
boolean |
isBuiltIn()
Built-in plugins are those used internally by Azureus, for example the UPnP plugin |
boolean |
isDisabled()
Returns true if the plugin has been marked as disabled, and prevented from initialising. |
boolean |
isInitialisationThread()
Indicates whether or not the current thread is the one responsible for running plugin initialisation |
boolean |
isMandatory()
Whether or not this is a mandatory plugin. |
boolean |
isOperational()
Returns true if the plugin is running, returns false if the plugin isn't running for some reason. |
boolean |
isShared()
|
boolean |
isUnloadable()
|
void |
openTorrentFile(java.lang.String fileName)
Deprecated. |
void |
openTorrentURL(java.lang.String url)
Deprecated. |
void |
reload()
|
void |
removeConfigSection(ConfigSection section)
|
void |
removeEventListener(PluginEventListener l)
|
void |
removeListener(PluginListener l)
|
void |
setDisabled(boolean disabled)
Sets whether the plugin can be loaded or not. |
void |
setPluginDirectoryName(java.lang.String name)
|
void |
setPluginName(java.lang.String name)
|
void |
setPluginVersion(java.lang.String version)
|
void |
uninstall()
Uninstall this plugin if it has been loaded from a plugin directory. |
void |
unload()
|
protected void |
unloadSupport()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.ClassLoader class_loader
protected java.util.List children
| Constructor Detail |
|---|
protected PluginInterfaceImpl(Plugin _plugin,
PluginInitializer _initialiser,
java.lang.Object _initialiser_key,
java.lang.ClassLoader _class_loader,
java.util.List<java.io.File> _verified_files,
java.lang.String _key,
java.util.Properties _props,
java.lang.String _pluginDir,
java.lang.String _plugin_id,
java.lang.String _plugin_version)
throws PluginException
PluginException| Method Detail |
|---|
public Plugin getPlugin()
PluginInterface
getPlugin in interface PluginInterfacepublic boolean isOperational()
PluginInterface
isOperational in interface PluginInterfacepublic java.lang.Object getInitializerKey()
public PluginManager getPluginManager()
PluginInterface
getPluginManager in interface PluginInterfacepublic java.lang.String getApplicationName()
PluginInterface
getApplicationName in interface PluginInterfacepublic java.lang.String getAzureusName()
PluginInterface
getAzureusName in interface PluginInterfacepublic java.lang.String getAzureusVersion()
PluginInterface
getAzureusVersion in interface PluginInterfacepublic void addConfigSection(ConfigSection section)
PluginInterface
In contrast to addConfigUIParameters, this gives you total control over
a tab. Please be kind and use localizable text.
addConfigSection in interface PluginInterfacesection - ConfigSection to be added to the Config viewpublic void removeConfigSection(ConfigSection section)
removeConfigSection in interface PluginInterfacepublic ConfigSection[] getConfigSections()
getConfigSections in interface PluginInterfacepublic void openTorrentFile(java.lang.String fileName)
PluginInterface
openTorrentFile in interface PluginInterfacefileName - The Name of the file that azureus must openpublic void openTorrentURL(java.lang.String url)
PluginInterface
openTorrentURL in interface PluginInterfaceurl - The String representation of the url pointing to a torrent filepublic void setPluginName(java.lang.String name)
public java.lang.String getPluginName()
PluginInterface
getPluginName in interface PluginInterfacepublic void setPluginVersion(java.lang.String version)
public java.lang.String getPluginVersion()
PluginInterface
getPluginVersion in interface PluginInterfacepublic java.lang.String getPluginID()
PluginInterface
getPluginID in interface PluginInterfacepublic boolean isMandatory()
PluginInterface
isMandatory in interface PluginInterfacepublic boolean isBuiltIn()
PluginInterface
isBuiltIn in interface PluginInterfacepublic java.util.Properties getPluginProperties()
PluginInterface
getPluginProperties in interface PluginInterfacepublic java.lang.String getPluginDirectoryName()
PluginInterfacePluginConfig.getPluginUserFile(String) instead.
getPluginDirectoryName in interface PluginInterfacepublic java.lang.String getPerUserPluginDirectoryName()
PluginInterface
getPerUserPluginDirectoryName in interface PluginInterfacepublic void setPluginDirectoryName(java.lang.String name)
public void addConfigUIParameters(Parameter[] parameters,
java.lang.String displayName)
PluginInterfacePluginInterface.getPluginConfigUIFactory() to get the
PluginConfigUIFactory class, from which you can create different
types of parameters.
addConfigUIParameters in interface PluginInterfaceparameters - the Parameter(s) to be editeddisplayName - the under which it should display.public PluginConfig getPluginconfig()
PluginInterface
getPluginconfig in interface PluginInterfacepublic PluginConfigUIFactory getPluginConfigUIFactory()
PluginInterface
getPluginConfigUIFactory in interface PluginInterfacepublic java.lang.String getPluginConfigKey()
public Tracker getTracker()
PluginInterface
getTracker in interface PluginInterface
public ShareManager getShareManager()
throws ShareException
PluginInterface
getShareManager in interface PluginInterfaceShareExceptionpublic DownloadManager getDownloadManager()
PluginInterface
getDownloadManager in interface PluginInterfacepublic MainlineDHTManager getMainlineDHTManager()
PluginInterface
getMainlineDHTManager in interface PluginInterfacepublic TorrentManager getTorrentManager()
PluginInterface
getTorrentManager in interface PluginInterfacepublic Logger getLogger()
PluginInterface
getLogger in interface PluginInterfacepublic IPFilter getIPFilter()
PluginInterface
getIPFilter in interface PluginInterfacepublic Utilities getUtilities()
PluginInterface
getUtilities in interface PluginInterfacepublic ShortCuts getShortCuts()
PluginInterface
getShortCuts in interface PluginInterfacepublic UIManager getUIManager()
PluginInterface
getUIManager in interface PluginInterfacepublic UpdateManager getUpdateManager()
PluginInterface
getUpdateManager in interface PluginInterfaceprotected void unloadSupport()
public boolean isUnloadable()
isUnloadable in interface PluginInterface
public void reload()
throws PluginException
reload in interface PluginInterfacePluginException
public void unload()
throws PluginException
unload in interface PluginInterfacePluginException
public void uninstall()
throws PluginException
PluginInterface
uninstall in interface PluginInterfacePluginExceptionpublic boolean isInitialisationThread()
PluginInterface
isInitialisationThread in interface PluginInterfacepublic ClientIDManager getClientIDManager()
getClientIDManager in interface PluginInterfacepublic ConnectionManager getConnectionManager()
PluginInterface
getConnectionManager in interface PluginInterfacepublic MessageManager getMessageManager()
PluginInterface
getMessageManager in interface PluginInterfacepublic DistributedDatabase getDistributedDatabase()
PluginInterface
getDistributedDatabase in interface PluginInterfacepublic PlatformManager getPlatformManager()
PluginInterface
getPlatformManager in interface PluginInterfaceprotected void initialisationComplete()
protected void fireInitComplete(PluginListener listener)
protected void closedownInitiated()
protected void closedownComplete()
public java.lang.ClassLoader getPluginClassLoader()
PluginInterface
getPluginClassLoader in interface PluginInterface
public PluginInterface getLocalPluginInterface(java.lang.Class plugin_class,
java.lang.String id)
throws PluginException
PluginInterface
getLocalPluginInterface in interface PluginInterfaceplugin_class - must implement Pluginid - the unique id of this plugin (used to scope config params etc)
PluginExceptionpublic IPCInterfaceImpl getIPC()
PluginInterface
getIPC in interface PluginInterfacepublic boolean isShared()
isShared in interface PluginInterfaceprotected void destroy()
public void addListener(PluginListener l)
addListener in interface PluginInterfacepublic void removeListener(PluginListener l)
removeListener in interface PluginInterfacepublic void addEventListener(PluginEventListener l)
addEventListener in interface PluginInterfacepublic void removeEventListener(PluginEventListener l)
removeEventListener in interface PluginInterfacepublic void firePluginEvent(PluginEvent event)
PluginInterface
firePluginEvent in interface PluginInterfaceprotected void firePluginEventSupport(PluginEvent event)
protected void generateEvidence(IndentWriter writer)
public boolean isDisabled()
PluginInterface
isDisabled in interface PluginInterfacepublic void setDisabled(boolean disabled)
PluginInterface#setLoadedAtStartup(boolean) instead. This needs
to be called prior to a plugin's initialisation to take effect.
setDisabled in interface PluginInterfacepublic PluginState getPluginState()
PluginInterface
getPluginState in interface PluginInterface
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||