public class PluginEnvironment extends Object implements Reloadable
The PluginEnvironment also keeps a reference to the PluginRegistry because this allows it to add and remove Plugins as child resource loaders of the registry.
Constructor and Description |
---|
PluginEnvironment(PluginLoader loader,
PluginRegistry registry)
Constructs an unloaded PluginEnvironment from the given PluginLoader and PluginRegistry.
|
PluginEnvironment(Plugin plugin,
PluginLoader loader,
PluginRegistry registry)
Constructs a PluginEnvironment representing the given loaded Plugin.
|
Modifier and Type | Method and Description |
---|---|
PluginLoader |
getLoader()
Gets the PluginLoader which loaded the Plugin in this environment.
|
Plugin |
getPlugin()
Gets the Plugin represented by this environment.
|
String |
getPluginName() |
boolean |
isLoaded()
Returns true if this environment has been loaded, false otherwise.
|
boolean |
isReloadable()
Returns a boolean indicating whether or not this PluginEnvironment is truly reloadable.
|
boolean |
isReloadNeeded()
Indicates whether or not a reload of this environment is needed.
|
void |
load()
Loads the plugin from the PluginLoader.
|
void |
reload()
Reloads the environment by effectively executing an unload() followed by a load().
|
void |
setSuppressStartupFailure(boolean suppressStartupFailure)
By default, startup failure is suppressed.
|
void |
unload()
Unloads the plugin.
|
public PluginEnvironment(PluginLoader loader, PluginRegistry registry)
public PluginEnvironment(Plugin plugin, PluginLoader loader, PluginRegistry registry)
public boolean isLoaded()
public boolean isReloadable()
isReloadable
in interface Reloadable
public boolean isReloadNeeded()
isReloadNeeded
in interface Reloadable
public void reload() throws Exception
reload
in interface Reloadable
Exception
public void load() throws Exception
Exception
public void unload() throws Exception
Exception
public String getPluginName()
public Plugin getPlugin()
public PluginLoader getLoader()
public void setSuppressStartupFailure(boolean suppressStartupFailure)
Copyright © 2005–2014 The Kuali Foundation. All rights reserved.