Celtix User APIs

org.objectweb.celtix.application
Class ApplicationPluginManager

java.lang.Object
  extended by org.objectweb.celtix.application.ApplicationPluginManager
All Implemented Interfaces:
PluginManager

public class ApplicationPluginManager
extends Object
implements PluginManager


Constructor Summary
ApplicationPluginManager()
           
 
Method Summary
 Configuration getConfiguration()
          Returns the Configuration.
 Object getPlugin(String className)
          Returns the plugin object with the given classname.
 Object getPluginByName(String pluginName)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationPluginManager

public ApplicationPluginManager()
Method Detail

getPlugin

public Object getPlugin(String className)
                 throws PluginException
Description copied from interface: PluginManager
Returns the plugin object with the given classname.

Specified by:
getPlugin in interface PluginManager
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.

getPluginByName

public Object getPluginByName(String pluginName)
                       throws PluginException
Description copied from interface: PluginManager
Returns the plugin object with the given name.

Specified by:
getPluginByName in interface PluginManager
Parameters:
pluginName - - the name of the plugin.
Returns:
Object - the plugin.
Throws:
PluginException - - if there is a circular dependency loading dependent objects of the plugin.

registerPlugin

public void registerPlugin(Object plugin)
                    throws PluginException
Description copied from interface: PluginManager
Registers a plugin object with the bus.

Specified by:
registerPlugin in interface PluginManager
Parameters:
plugin - - the plugin to register.
Throws:
PluginException - if the given plugin is already registered.

unloadPlugin

public void unloadPlugin(Object plugin)
                  throws PluginException
Description copied from interface: PluginManager
Unload a plugin object after it has been explicitly unregistered.

Specified by:
unloadPlugin in interface PluginManager
Parameters:
plugin - - the plugin to unload.
Throws:
PluginException - if the given plugin is still registered.

unregisterPlugin

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

Specified by:
unregisterPlugin in interface PluginManager
Parameters:
plugin - - the plugin to unregister.
Throws:
PluginException - if the given plugin is not registered.

getPluginClassLoader

public ClassLoader getPluginClassLoader()
Description copied from interface: PluginManager
Get the plugin class loader.

Specified by:
getPluginClassLoader in interface PluginManager
Returns:
ClassLoader

getConfiguration

public Configuration getConfiguration()
Description copied from interface: PluginManager
Returns the Configuration.

Specified by:
getConfiguration in interface PluginManager
Returns:
Configuration

Celtix User APIs