org.gudy.azureus2.pluginsimpl.local
Class PluginStateImpl

java.lang.Object
  extended by org.gudy.azureus2.pluginsimpl.local.PluginStateImpl
All Implemented Interfaces:
PluginState

public class PluginStateImpl
extends java.lang.Object
implements PluginState


Constructor Summary
PluginStateImpl(PluginInterfaceImpl pi, PluginInitializer initialiser)
           
 
Method Summary
 boolean hasFailed()
          Returns true if there was a problem loading or initialising the plugin.
 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 isInitialisationComplete()
           
 boolean isLoadedAtStartup()
          Returns true if the plugin is set to load at startup, false otherwise.
 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()
           
 boolean isUnloaded()
           
 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 uninstall()
          Uninstall this plugin if it has been loaded from a plugin directory.
 void unload()
           
protected  void unload(boolean for_reload)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginStateImpl

public PluginStateImpl(PluginInterfaceImpl pi,
                       PluginInitializer initialiser)
Method Detail

setLoadedAtStartup

public void setLoadedAtStartup(boolean load_at_startup)
Description copied from interface: PluginState
Sets whether the plugin is loaded at startup or not.

Specified by:
setLoadedAtStartup in interface PluginState

isLoadedAtStartup

public boolean isLoadedAtStartup()
Description copied from interface: PluginState
Returns true if the plugin is set to load at startup, false otherwise.

Specified by:
isLoadedAtStartup in interface PluginState

hasFailed

public boolean hasFailed()
Description copied from interface: PluginState
Returns true if there was a problem loading or initialising the plugin.

Specified by:
hasFailed in interface PluginState

setDisabled

public void setDisabled(boolean _disabled)
Description copied from interface: PluginState
Sets whether the plugin can be loaded or not. If you are trying to affect if the plugin can be loaded at startup - use PluginState.setLoadedAtStartup(boolean) instead. This needs to be called prior to a plugin's initialisation to take effect.

Specified by:
setDisabled in interface PluginState

isDisabled

public boolean isDisabled()
Description copied from interface: PluginState
Returns true if the plugin has been marked as disabled, and prevented from initialising.

Specified by:
isDisabled in interface PluginState

isBuiltIn

public boolean isBuiltIn()
Description copied from interface: PluginState
Built-in plugins are those used internally by Azureus, for example the UPnP plugin.

Specified by:
isBuiltIn in interface PluginState

isMandatory

public boolean isMandatory()
Description copied from interface: PluginState
Whether or not this is a mandatory plugin. Mandatory plugins take priority over update checks, for example, over optional ones.

Specified by:
isMandatory in interface PluginState

isOperational

public boolean isOperational()
Description copied from interface: PluginState
Returns true if the plugin is running, returns false if the plugin isn't running for some reason.

Specified by:
isOperational in interface PluginState

isShared

public boolean isShared()
Specified by:
isShared in interface PluginState

isInitialisationComplete

public boolean isInitialisationComplete()
Specified by:
isInitialisationComplete in interface PluginState

reload

public void reload()
            throws PluginException
Specified by:
reload in interface PluginState
Throws:
PluginException

uninstall

public void uninstall()
               throws PluginException
Description copied from interface: PluginState
Uninstall this plugin if it has been loaded from a plugin directory. Deletes the plugin directory.

Specified by:
uninstall in interface PluginState
Throws:
PluginException

isUnloaded

public boolean isUnloaded()
Specified by:
isUnloaded in interface PluginState

unload

public void unload()
            throws PluginException
Specified by:
unload in interface PluginState
Throws:
PluginException

unload

protected void unload(boolean for_reload)
               throws PluginException
Throws:
PluginException

isUnloadable

public boolean isUnloadable()
Specified by:
isUnloadable in interface PluginState