|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 PluginInterface
public boolean isOperational()
PluginInterface
isOperational
in interface PluginInterface
public java.lang.Object getInitializerKey()
public PluginManager getPluginManager()
PluginInterface
getPluginManager
in interface PluginInterface
public java.lang.String getApplicationName()
PluginInterface
getApplicationName
in interface PluginInterface
public java.lang.String getAzureusName()
PluginInterface
getAzureusName
in interface PluginInterface
public java.lang.String getAzureusVersion()
PluginInterface
getAzureusVersion
in interface PluginInterface
public 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 PluginInterface
section
- ConfigSection to be added to the Config viewpublic void removeConfigSection(ConfigSection section)
removeConfigSection
in interface PluginInterface
public ConfigSection[] getConfigSections()
getConfigSections
in interface PluginInterface
public void openTorrentFile(java.lang.String fileName)
PluginInterface
openTorrentFile
in interface PluginInterface
fileName
- The Name of the file that azureus must openpublic void openTorrentURL(java.lang.String url)
PluginInterface
openTorrentURL
in interface PluginInterface
url
- 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 PluginInterface
public void setPluginVersion(java.lang.String version)
public java.lang.String getPluginVersion()
PluginInterface
getPluginVersion
in interface PluginInterface
public java.lang.String getPluginID()
PluginInterface
getPluginID
in interface PluginInterface
public boolean isMandatory()
PluginInterface
isMandatory
in interface PluginInterface
public boolean isBuiltIn()
PluginInterface
isBuiltIn
in interface PluginInterface
public java.util.Properties getPluginProperties()
PluginInterface
getPluginProperties
in interface PluginInterface
public java.lang.String getPluginDirectoryName()
PluginInterface
PluginConfig.getPluginUserFile(String)
instead.
getPluginDirectoryName
in interface PluginInterface
public java.lang.String getPerUserPluginDirectoryName()
PluginInterface
getPerUserPluginDirectoryName
in interface PluginInterface
public void setPluginDirectoryName(java.lang.String name)
public void addConfigUIParameters(Parameter[] parameters, java.lang.String displayName)
PluginInterface
PluginInterface.getPluginConfigUIFactory()
to get the
PluginConfigUIFactory
class, from which you can create different
types of parameters.
addConfigUIParameters
in interface PluginInterface
parameters
- the Parameter(s) to be editeddisplayName
- the under which it should display.public PluginConfig getPluginconfig()
PluginInterface
getPluginconfig
in interface PluginInterface
public PluginConfigUIFactory getPluginConfigUIFactory()
PluginInterface
getPluginConfigUIFactory
in interface PluginInterface
public java.lang.String getPluginConfigKey()
public Tracker getTracker()
PluginInterface
getTracker
in interface PluginInterface
public ShareManager getShareManager() throws ShareException
PluginInterface
getShareManager
in interface PluginInterface
ShareException
public DownloadManager getDownloadManager()
PluginInterface
getDownloadManager
in interface PluginInterface
public MainlineDHTManager getMainlineDHTManager()
PluginInterface
getMainlineDHTManager
in interface PluginInterface
public TorrentManager getTorrentManager()
PluginInterface
getTorrentManager
in interface PluginInterface
public Logger getLogger()
PluginInterface
getLogger
in interface PluginInterface
public IPFilter getIPFilter()
PluginInterface
getIPFilter
in interface PluginInterface
public Utilities getUtilities()
PluginInterface
getUtilities
in interface PluginInterface
public ShortCuts getShortCuts()
PluginInterface
getShortCuts
in interface PluginInterface
public UIManager getUIManager()
PluginInterface
getUIManager
in interface PluginInterface
public UpdateManager getUpdateManager()
PluginInterface
getUpdateManager
in interface PluginInterface
protected void unloadSupport()
public boolean isUnloadable()
isUnloadable
in interface PluginInterface
public void reload() throws PluginException
reload
in interface PluginInterface
PluginException
public void unload() throws PluginException
unload
in interface PluginInterface
PluginException
public void uninstall() throws PluginException
PluginInterface
uninstall
in interface PluginInterface
PluginException
public boolean isInitialisationThread()
PluginInterface
isInitialisationThread
in interface PluginInterface
public ClientIDManager getClientIDManager()
getClientIDManager
in interface PluginInterface
public ConnectionManager getConnectionManager()
PluginInterface
getConnectionManager
in interface PluginInterface
public MessageManager getMessageManager()
PluginInterface
getMessageManager
in interface PluginInterface
public DistributedDatabase getDistributedDatabase()
PluginInterface
getDistributedDatabase
in interface PluginInterface
public PlatformManager getPlatformManager()
PluginInterface
getPlatformManager
in interface PluginInterface
protected 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 PluginInterface
plugin_class
- must implement Pluginid
- the unique id of this plugin (used to scope config params etc)
PluginException
public IPCInterfaceImpl getIPC()
PluginInterface
getIPC
in interface PluginInterface
public boolean isShared()
isShared
in interface PluginInterface
protected void destroy()
public void addListener(PluginListener l)
addListener
in interface PluginInterface
public void removeListener(PluginListener l)
removeListener
in interface PluginInterface
public void addEventListener(PluginEventListener l)
addEventListener
in interface PluginInterface
public void removeEventListener(PluginEventListener l)
removeEventListener
in interface PluginInterface
public void firePluginEvent(PluginEvent event)
PluginInterface
firePluginEvent
in interface PluginInterface
protected void firePluginEventSupport(PluginEvent event)
protected void generateEvidence(IndentWriter writer)
public boolean isDisabled()
PluginInterface
isDisabled
in interface PluginInterface
public 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 PluginInterface
public PluginState getPluginState()
PluginInterface
getPluginState
in interface PluginInterface
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |