| java.lang.Object edu.iu.uis.eden.plugin.PluginEnvironment
PluginEnvironment | public class PluginEnvironment implements Reloadable(Code) | | A PluginEnvironment represents a Plugin and the PluginLoader from which it was loaded.
Grouping these together allows us to execute a reload of the Plugin since the Plugin
itself is not responsible for handling how it's own loading or reloading.
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.
author: ewestfal |
Method Summary | |
public PluginLoader | getLoader() Gets the PluginLoader which loaded the Plugin in this environment. | public Plugin | getPlugin() Gets the Plugin represented by this environment. | public boolean | isLoaded() Returns true if this environment has been loaded, false otherwise. | public synchronized boolean | isReloadNeeded() Indicates whether or not a reload of this environment is needed. | public boolean | isReloadable() Returns a boolean indicating whether or not this PluginEnvironment is truly reloadable. | public synchronized void | load() Loads the plugin from the PluginLoader. | public synchronized void | reload() Reloads the environment by effectively executing an unload() followed by a load(). | public void | setSupressStartupFailure(boolean supressStartupFailure) By default, startup failure is supressed. | public synchronized void | unload() Unloads the plugin. |
PluginEnvironment | public PluginEnvironment(PluginLoader loader, PluginRegistry registry)(Code) | | Constructs an unloaded PluginEnvironment from the given PluginLoader and PluginRegistry.
The environment will not be loaded until the first time that load() is executed.
|
PluginEnvironment | public PluginEnvironment(Plugin plugin, PluginLoader loader, PluginRegistry registry)(Code) | | Constructs a PluginEnvironment representing the given loaded Plugin. Environments created
in this manner will indicate that they are loaded from the moment they are constructed.
|
getLoader | public PluginLoader getLoader()(Code) | | Gets the PluginLoader which loaded the Plugin in this environment.
|
getPlugin | public Plugin getPlugin()(Code) | | Gets the Plugin represented by this environment. May be null if this environment has not
yet been loaded.
|
isLoaded | public boolean isLoaded()(Code) | | Returns true if this environment has been loaded, false otherwise. If this method returns
false then getPlugin() may return null if the environment was never loaded after construction.
|
isReloadNeeded | public synchronized boolean isReloadNeeded()(Code) | | Indicates whether or not a reload of this environment is needed. If this method
returns true, it should continue to return true until a reload() is executed.
|
isReloadable | public boolean isReloadable()(Code) | | Returns a boolean indicating whether or not this PluginEnvironment is truly reloadable.
This will return false if the Plugin represents a plugin which can not be reloaded
(like the institutional plugin).
|
load | public synchronized void load() throws Exception(Code) | | Loads the plugin from the PluginLoader. This will also start the Plugin and add it
to the PluginRegistry's resoure loaders.
|
reload | public synchronized void reload() throws Exception(Code) | | Reloads the environment by effectively executing an unload() followed by a load().
|
setSupressStartupFailure | public void setSupressStartupFailure(boolean supressStartupFailure)(Code) | | By default, startup failure is supressed. If it is indicated that startup failure
supression is not desired, then startup errors will be thrown directly from calls to
load().
|
unload | public synchronized void unload() throws Exception(Code) | | Unloads the plugin. The effectively shuts the plugin down and removes it from the
PluginRegistry's resource loaders.
throws: Exception - |
|
|