de.mud.jta
Class PluginLoader
java.lang.Object
|
+--de.mud.jta.PluginLoader
- All Implemented Interfaces:
- PluginBus
- Direct Known Subclasses:
- Common
- public class PluginLoader
- extends java.lang.Object
- implements PluginBus
The plugin loader tries to load the plugin by name and returns a
corresponding plugin object. It takes care of connecting filter
plugins
Maintainer: Matthias L. Jugel
- Version:
- $Id: PluginLoader.java,v 2.7 2002/05/06 07:24:20 leo Exp $
- Author:
- Matthias L. Jugel, Marcus Meißner
Field Summary |
static java.lang.String |
ID
holds the current version id |
Constructor Summary |
PluginLoader()
Create new plugin loader and set up with default plugin path. |
PluginLoader(java.util.Vector path)
Create new plugin loader and set up with specified plugin path. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ID
public static final java.lang.String ID
- holds the current version id
PluginLoader
public PluginLoader()
- Create new plugin loader and set up with default plugin path.
PluginLoader
public PluginLoader(java.util.Vector path)
- Create new plugin loader and set up with specified plugin path.
- Parameters:
path
- the default search path for plugins
addPlugin
public Plugin addPlugin(java.lang.String name,
java.lang.String id)
- Add a new plugin to the system and register the plugin load as its
communication bus. If the plugin is a filter plugin and if it is
not the first filter the last added filter will be set as its filter
source.
- Parameters:
name
- the string name of the plugin- Returns:
- the newly created plugin or null in case of an error
replacePlugin
public Plugin replacePlugin(java.lang.String name,
java.lang.String id)
- Replace a plugin with a new one, actually reloads the plugin.
- Parameters:
name
- name of plugin to be replacedid
- unique id- Returns:
- the newly loaded plugin
registerPluginListener
public void registerPluginListener(PluginListener l)
- Register a new plugin listener.
- Specified by:
registerPluginListener
in interface PluginBus
broadcast
public java.lang.Object broadcast(PluginMessage message)
- Implementation of the plugin bus. Broadcast a message to all
listeners we know of. The message takes care that the right
methods are called in the listeners.
- Specified by:
broadcast
in interface PluginBus
- Parameters:
message
- the plugin message to be sent- Returns:
- the answer to the sent message
getPlugins
public java.util.Map getPlugins()