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 Reloadablepublic boolean isReloadNeeded()
isReloadNeeded in interface Reloadablepublic void reload() throws Exception
reload in interface ReloadableExceptionpublic void load() throws Exception
Exceptionpublic void unload() throws Exception
Exceptionpublic String getPluginName()
public Plugin getPlugin()
public PluginLoader getLoader()
public void setSuppressStartupFailure(boolean suppressStartupFailure)
Copyright © 2005–2015 The Kuali Foundation. All rights reserved.