xmlBlaster 2.1.0 API

org.xmlBlaster.util.plugin
Class PluginRegistry

java.lang.Object
  extended by org.xmlBlaster.util.plugin.PluginRegistry

public class PluginRegistry
extends java.lang.Object

One instance of this class is used to keep track of all cached plugins.

Author:
Michele Laghi

Field Summary
private static java.util.logging.Logger log
           
private static java.lang.String ME
           
private  java.util.Hashtable plugins
          key=pluginId String, value=I_Plugin
 
Constructor Summary
PluginRegistry(Global glob)
           
 
Method Summary
 I_Plugin getPlugin(java.lang.String id)
          Gets the plugin which has previously been registered with the given id.
 I_Driver[] getPluginsOfInterfaceI_Driver()
          Returns the plugins which are implementing the interface I_Driver.
 java.util.Vector getPluginsOfInterfaceI_Queue()
          Returns the plugins which are implementing the interface I_Queue.
 boolean register(java.lang.String id, I_Plugin plugin)
          Registers the plugin into this registry.
 I_Plugin unRegister(java.lang.String id)
          unregisters the specified plugin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ME

private static java.lang.String ME

log

private static java.util.logging.Logger log

plugins

private java.util.Hashtable plugins
key=pluginId String, value=I_Plugin

Constructor Detail

PluginRegistry

public PluginRegistry(Global glob)
Method Detail

getPlugin

public I_Plugin getPlugin(java.lang.String id)
Gets the plugin which has previously been registered with the given id.

Parameters:
id - the key under which the plugin to get has been registered.
Returns:
I_Plugin the plugin associated to the given key. If there is no such plugin, then null is returned.

register

public boolean register(java.lang.String id,
                        I_Plugin plugin)
Registers the plugin into this registry.

Parameters:
id - the key to use to register this plugin
plugin - the plugin to register
Returns:
boolean 'true' if the registration was successful. 'false' if the plugin was already registered.

unRegister

public I_Plugin unRegister(java.lang.String id)
unregisters the specified plugin.

Parameters:
id - the id under which the plugin has been registered.
Returns:
I_Plugin the plugin which has been unregistered or null if none was found.

getPluginsOfInterfaceI_Driver

public I_Driver[] getPluginsOfInterfaceI_Driver()
Returns the plugins which are implementing the interface I_Driver. Depending on the current run level not all drivers my be visible.

Returns:
Vector with matching I_Driver entries

getPluginsOfInterfaceI_Queue

public java.util.Vector getPluginsOfInterfaceI_Queue()
Returns the plugins which are implementing the interface I_Queue.

Returns:
Vector with matching I_Queue entries

xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.