Class PluginStateImpl
java.lang.Object
com.biglybt.pifimpl.local.PluginStateImpl
- All Implemented Interfaces:
PluginState
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean(package private) booleanprivate PluginInitializer(package private) booleanprivate PluginInterfaceImpl(package private) boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if there was a problem loading or initialising the plugin.booleanBuilt-in plugins are those used internally by the client, for example the UPnP plugin.booleanReturns true if the plugin has been marked as disabled, and prevented from initialising.booleanbooleanReturns true if the plugin is set to load at startup, false otherwise.booleanWhether or not this is a mandatory plugin.booleanReturns true if the plugin is running, returns false if the plugin isn't running for some reason.booleanbooleanisShared()booleanbooleanvoidreload()voidsetDisabled(boolean _disabled) Sets whether the plugin can be loaded or not.voidsetLoadedAtStartup(boolean load_at_startup) Sets whether the plugin is loaded at startup or not.(package private) voidsetOperational(boolean b, boolean reloading) voidsetRestartPending(boolean b) voidUninstall this plugin if it has been loaded from a plugin directory.voidunload()protected voidunload(boolean for_reload)
-
Field Details
-
pi
-
initialiser
-
disabled
private boolean disabled -
operational
boolean operational -
failed
boolean failed -
restart_pending
boolean restart_pending
-
-
Constructor Details
-
PluginStateImpl
-
-
Method Details
-
setLoadedAtStartup
public void setLoadedAtStartup(boolean load_at_startup) Description copied from interface:PluginStateSets whether the plugin is loaded at startup or not.- Specified by:
setLoadedAtStartupin interfacePluginState
-
isLoadedAtStartup
public boolean isLoadedAtStartup()Description copied from interface:PluginStateReturns true if the plugin is set to load at startup, false otherwise.- Specified by:
isLoadedAtStartupin interfacePluginState
-
hasFailed
public boolean hasFailed()Description copied from interface:PluginStateReturns true if there was a problem loading or initialising the plugin.- Specified by:
hasFailedin interfacePluginState
-
setDisabled
public void setDisabled(boolean _disabled) Description copied from interface:PluginStateSets whether the plugin can be loaded or not. If you are trying to affect if the plugin can be loaded at startup - usePluginState.setLoadedAtStartup(boolean)instead. This needs to be called prior to a plugin's initialisation to take effect.- Specified by:
setDisabledin interfacePluginState- Parameters:
_disabled-
-
isDisabled
public boolean isDisabled()Description copied from interface:PluginStateReturns true if the plugin has been marked as disabled, and prevented from initialising.- Specified by:
isDisabledin interfacePluginState
-
isBuiltIn
public boolean isBuiltIn()Description copied from interface:PluginStateBuilt-in plugins are those used internally by the client, for example the UPnP plugin.- Specified by:
isBuiltInin interfacePluginState
-
isMandatory
public boolean isMandatory()Description copied from interface:PluginStateWhether or not this is a mandatory plugin. Mandatory plugins take priority over update checks, for example, over optional ones.- Specified by:
isMandatoryin interfacePluginState
-
setOperational
void setOperational(boolean b, boolean reloading) -
isOperational
public boolean isOperational()Description copied from interface:PluginStateReturns true if the plugin is running, returns false if the plugin isn't running for some reason.- Specified by:
isOperationalin interfacePluginState
-
isInitialisationComplete
public boolean isInitialisationComplete()- Specified by:
isInitialisationCompletein interfacePluginState
-
isRestartPending
public boolean isRestartPending()- Specified by:
isRestartPendingin interfacePluginState
-
setRestartPending
public void setRestartPending(boolean b) - Specified by:
setRestartPendingin interfacePluginState
-
reload
- Specified by:
reloadin interfacePluginState- Throws:
PluginException
-
uninstall
Description copied from interface:PluginStateUninstall this plugin if it has been loaded from a plugin directory. Deletes the plugin directory.- Specified by:
uninstallin interfacePluginState- Throws:
PluginException
-
isUnloaded
public boolean isUnloaded()- Specified by:
isUnloadedin interfacePluginState
-
unload
- Specified by:
unloadin interfacePluginState- Throws:
PluginException
-
unload
- Throws:
PluginException
-
isUnloadable
public boolean isUnloadable()- Specified by:
isUnloadablein interfacePluginState
-