Celtix User APIs

org.objectweb.celtix.plugins
Interface PluginManager

All Known Implementing Classes:
ApplicationPluginManager

public interface PluginManager

Provides methods for registering, unregistering and obtaining plugin objects.


Method Summary
 Configuration getConfiguration()
          Returns the Configuration.
 Object getPlugin(String className)
          Returns the plugin object with the given classname.
 Object getPluginByName(String name)
          Returns the plugin object with the given name.
 ClassLoader getPluginClassLoader()
          Get the plugin class loader.
 void registerPlugin(Object plugin)
          Registers a plugin object with the bus.
 void unloadPlugin(Object plugin)
          Unload a plugin object after it has been explicitly unregistered.
 void unregisterPlugin(Object plugin)
          Explicitly unregister the given plugin object from the bus.
 

Method Detail

getPluginClassLoader

ClassLoader getPluginClassLoader()
Get the plugin class loader.

Returns:
ClassLoader

getConfiguration

Configuration getConfiguration()
Returns the Configuration.

Returns:
Configuration

getPluginByName

Object getPluginByName(String name)
                       throws PluginException
Returns the plugin object with the given name.

Parameters:
name - - the name of the plugin.
Returns:
Object - the plugin.
Throws:
PluginException - - if there is a circular dependency loading dependent objects of the plugin.

getPlugin

Object getPlugin(String className)
                 throws PluginException
Returns the plugin object with the given classname.

Parameters:
className - - the class name of the plugin.
Returns:
Object - the plugin.
Throws:
PluginException - - if there is a circular dependency loading dependent objects of the plugin.

registerPlugin

void registerPlugin(Object plugin)
                    throws PluginException
Registers a plugin object with the bus.

Parameters:
plugin - - the plugin to register.
Throws:
PluginException - if the given plugin is already registered.

unregisterPlugin

void unregisterPlugin(Object plugin)
                      throws PluginException
Explicitly unregister the given plugin object from the bus. A plugin must be unregistered before it can be unloaded.

Parameters:
plugin - - the plugin to unregister.
Throws:
PluginException - if the given plugin is not registered.

unloadPlugin

void unloadPlugin(Object plugin)
                  throws PluginException
Unload a plugin object after it has been explicitly unregistered.

Parameters:
plugin - - the plugin to unload.
Throws:
PluginException - if the given plugin is still registered.

Celtix User APIs