Package com.biglybt.pif
Interface PluginState
- All Known Implementing Classes:
PluginStateImpl
public interface PluginState
This object provides information the current state of the plugin, and
provides various mechanisms to query and control plugins and their integration
with the client at a low-level.
Most plugins will have no need to interact with this object - it is primarily
used by the client for plugin management.
- Since:
- 3.1.1.1
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if there was a problem loading or initialising the plugin.boolean
Built-in plugins are those used internally by the client, for example the UPnP plugin.boolean
Returns true if the plugin has been marked as disabled, and prevented from initialising.boolean
boolean
Returns true if the plugin is set to load at startup, false otherwise.boolean
Whether or not this is a mandatory plugin.boolean
Returns true if the plugin is running, returns false if the plugin isn't running for some reason.boolean
boolean
isShared()
boolean
boolean
void
reload()
void
setDisabled
(boolean disabled) Sets whether the plugin can be loaded or not.void
setLoadedAtStartup
(boolean load_at_startup) Sets whether the plugin is loaded at startup or not.void
setRestartPending
(boolean b) void
Uninstall this plugin if it has been loaded from a plugin directory.void
unload()
-
Method Details
-
isLoadedAtStartup
boolean isLoadedAtStartup()Returns true if the plugin is set to load at startup, false otherwise. -
setLoadedAtStartup
void setLoadedAtStartup(boolean load_at_startup) Sets whether the plugin is loaded at startup or not. -
hasFailed
boolean hasFailed()Returns true if there was a problem loading or initialising the plugin. -
isDisabled
boolean isDisabled()Returns true if the plugin has been marked as disabled, and prevented from initialising. -
setDisabled
void setDisabled(boolean disabled) Sets whether the plugin can be loaded or not. If you are trying to affect if the plugin can be loaded at startup - usesetLoadedAtStartup(boolean)
instead. This needs to be called prior to a plugin's initialisation to take effect.- Parameters:
disabled
-
-
isBuiltIn
boolean isBuiltIn()Built-in plugins are those used internally by the client, for example the UPnP plugin. -
isMandatory
boolean isMandatory()Whether or not this is a mandatory plugin. Mandatory plugins take priority over update checks, for example, over optional ones. -
isOperational
boolean isOperational()Returns true if the plugin is running, returns false if the plugin isn't running for some reason. -
isInitialisationComplete
boolean isInitialisationComplete() -
isRestartPending
boolean isRestartPending() -
setRestartPending
void setRestartPending(boolean b) -
uninstall
Uninstall this plugin if it has been loaded from a plugin directory. Deletes the plugin directory.- Throws:
PluginException
-
isUnloadable
boolean isUnloadable() -
isUnloaded
boolean isUnloaded() -
unload
- Throws:
PluginException
-
reload
- Throws:
PluginException
-