Package com.biglybt.pif
Class PluginManager
java.lang.Object
com.biglybt.pif.PluginManager
- Direct Known Subclasses:
PluginManagerImpl
This class allows the client to be started as an embedded component and also allows plugins to
be dynamically registered
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
Where the client is 'installed'.static final String
Set this to "true" (String) if you want to disable any native platform support String valuestatic final String
Parent folder that contains the downloads directory String valuestatic final String
Property Key: Allow multiple instances.static final String
Where the the client config (i.e. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
executeCloseAction
(String action) abstract void
firePluginEvent
(int event_type) abstract PluginInterface
returns the default plugin interface that can be used to access plugin functionality without an explicit pluginstatic PluginManagerDefaults
abstract PluginInstaller
abstract PluginInterface
abstract PluginInterface
getPluginInterfaceByClass
(Class class_object, boolean operational) Returns the plugin interface with a given class, or null if not found.abstract PluginInterface
getPluginInterfaceByClass
(String class_name) abstract PluginInterface
getPluginInterfaceByClass
(String class_name, boolean operational) Returns the plugin interface with a given class name, or null if not found.abstract PluginInterface
returns the plugin interface with a given id, or null if not foundabstract PluginInterface
getPluginInterfaceByID
(String id, boolean operational) Returns the plugin interface with a given id, or null if not found.abstract PluginInterface[]
Gets the current set of registered plugins.abstract PluginInterface[]
Gets the current set of registered plugins.abstract PluginInterface[]
getPlugins
(boolean expect_partial_result) abstract List
<PluginInterface> getPluginsWithMethod
(String name, Class<?>[] parameters) *since 5201abstract boolean
abstract boolean
final void
abstract void
refreshPluginList
(boolean initialise) static void
registerPlugin
(Plugin plugin, String id) static void
registerPlugin
(Plugin plugin, String id, String config_key) static void
registerPlugin
(Class<? extends Plugin> plugin_class) Programatic plugin registration interfacestatic void
restarts the client and performs any Update actions defined via the plugin "update" interface.static void
startClient
(String ui, Properties properties, PluginManager.StartClientListener startClientListener) Starts client.static void
Shuts down the client
-
Field Details
-
PR_MULTI_INSTANCE
Property Key: Allow multiple instances. Normally the client will only permit a single instance to run per machine. Values for this key are: "true" or "false"- Since:
- 2.0.7.0
- See Also:
-
PR_USER_DIRECTORY
Where the the client config (i.e. per-user type) state is stored String value- Since:
- 4.9.0.1
- See Also:
-
PR_APP_DIRECTORY
Where the client is 'installed'. For embedded use you probably want to set config and app dir to a shared per-user location String value- Since:
- 4.9.0.1
- See Also:
-
PR_DOC_DIRECTORY
Parent folder that contains the downloads directory String value- Since:
- 4.9.0.1
- See Also:
-
PR_DISABLE_NATIVE_SUPPORT
Set this to "true" (String) if you want to disable any native platform support String value- Since:
- 4.9.0.1
- See Also:
-
CA_QUIT_VUZE
- See Also:
-
CA_SLEEP
- See Also:
-
CA_HIBERNATE
- See Also:
-
CA_SHUTDOWN
- See Also:
-
-
Constructor Details
-
PluginManager
public PluginManager()
-
-
Method Details
-
getDefaults
-
startClient
public static void startClient(String ui, Properties properties, PluginManager.StartClientListener startClientListener) throws PluginException Starts client.With the exception of null ui, method does not return until client is closed.
- Parameters:
ui
- "swt", "console", "telnet", etcproperties
-- Throws:
PluginException
-
stopClient
Shuts down the client- Throws:
PluginException
- Since:
- 2.0.8.0
-
restartClient
restarts the client and performs any Update actions defined via the plugin "update" interface. Currently only works for SWT UIs.- Throws:
PluginException
- Since:
- 2.1.0.0
-
registerPlugin
Programatic plugin registration interface- Parameters:
plugin_class
- this must implement Plugin- Since:
- 2.0.6.0
-
registerPlugin
-
registerPlugin
-
getPluginInterfaceByID
Returns the plugin interface with a given id, or null if not found.- Parameters:
id
-operational
- If true, only return a PluginInterface if the plugin is operational (i.e. is running).- Since:
- 3.1.1.1
-
getPluginInterfaceByClass
Returns the plugin interface with a given class name, or null if not found.- Parameters:
class_name
-operational
- If true, only return a PluginInterface if the plugin is operational (i.e. is running).- Since:
- 3.1.1.1
-
getPluginInterfaceByClass
Returns the plugin interface with a given class, or null if not found.- Parameters:
class_object
-operational
- If true, only return a PluginInterface if the plugin is operational (i.e. is running).- Since:
- 3.1.1.1
-
getPluginInterfaces
Gets the current set of registered plugins. During initialisation this will probably give partial results as plugin initialisation is non-deterministic.- Returns:
- Since:
- 2.1.0.0
-
getDefaultPluginInterface
returns the default plugin interface that can be used to access plugin functionality without an explicit plugin- Returns:
- null if unavailable
-
getPlugins
Gets the current set of registered plugins. During initialisation this will probably give partial results as plugin initialisation is non-deterministic.- Returns:
- Since:
- 2.1.0.0
-
getPlugins
-
firePluginEvent
public abstract void firePluginEvent(int event_type) -
getPluginInstaller
-
refreshPluginList
public final void refreshPluginList() -
refreshPluginList
public abstract void refreshPluginList(boolean initialise) - Since:
- 3.1.1.1
-
isSilentRestartEnabled
public abstract boolean isSilentRestartEnabled() -
isInitialized
public abstract boolean isInitialized() -
executeCloseAction
- Parameters:
action
- one of the above CA_- Throws:
PluginException
- Since:
- 5701
-
getPluginInterfaceByID
returns the plugin interface with a given id, or null if not found- Parameters:
id
-- Returns:
- Since:
- 2.1.0.0
-
getPluginInterfaceByClass
- Since:
- 2.1.0.0
-
getPluginInterfaceByClass
-
getPluginsWithMethod
*since 5201
-