org.jmonit.features
Class DefaultPluginManager

java.lang.Object
  extended by org.jmonit.features.DefaultPluginManager
All Implemented Interfaces:
PluginManager

public class DefaultPluginManager
extends java.lang.Object
implements PluginManager

Default implementation of PluginManager.

Author:
Nicolas De Loof

Constructor Summary
DefaultPluginManager()
          Constructor
 
Method Summary
<T> Factory<T>
getFactory(java.lang.Class<T> feature)
          
 java.lang.Class getFeature(java.lang.String name)
          Retrieve a feature by name.
 java.util.Collection<java.lang.Class> getFeatures(java.lang.String tag)
          
protected  void readConfiguration()
           
protected  void readFeatureGroupsConfiguration(java.util.Properties config)
           
protected  void registerFeatures(java.util.Properties config)
           
 void registerPlugin(Factory factory, java.lang.Class role)
          Register a plugin factory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPluginManager

public DefaultPluginManager()
Constructor

Method Detail

readFeatureGroupsConfiguration

protected void readFeatureGroupsConfiguration(java.util.Properties config)

readConfiguration

protected void readConfiguration()
                          throws java.lang.Exception
Throws:
java.lang.Exception

registerFeatures

protected void registerFeatures(java.util.Properties config)
                         throws java.lang.Exception
Throws:
java.lang.Exception

registerPlugin

public void registerPlugin(Factory factory,
                           java.lang.Class role)
Register a plugin factory

Specified by:
registerPlugin in interface PluginManager
Parameters:
factory - the factory
role - TODO
See Also:
PluginManager.registerPlugin(org.jmonit.spi.Factory, Class)

getFactory

public <T> Factory<T> getFactory(java.lang.Class<T> feature)

Specified by:
getFactory in interface PluginManager
See Also:
PluginManager.getFactory(java.lang.Class)

getFeatures

public java.util.Collection<java.lang.Class> getFeatures(java.lang.String tag)

Specified by:
getFeatures in interface PluginManager
Parameters:
tag - a name for a group of features
Returns:
all features in the group
See Also:
PluginManager.getFeatures(java.lang.String)

getFeature

public java.lang.Class getFeature(java.lang.String name)
Retrieve a feature by name. The name can be a short name (simple class name) of a standard jMonit plugin (from org.jmonit.plugins package) or a fully qualified class name for custom plugins.

Specified by:
getFeature in interface PluginManager
Returns:
plublic API class for the feature
See Also:
PluginManager.getFeature(java.lang.String)


Copyright © 2007 Nicolas De Loof. All Rights Reserved.