org.hyperic.hq.product
Class PluginManager
java.lang.Object
org.hyperic.hq.product.PluginManager
- Direct Known Subclasses:
- AutoinventoryPluginManager, ControlPluginManager, LiveDataPluginManager, MeasurementPluginManager, ProductPluginManager, RtPluginManager, TrackEventPluginManager
public abstract class PluginManager
- extends Object
This class implements common functionality of the GenericPluginManager
interface:
- maintain a registry of plugins
- shutdown() propagated to all plugins
Method Summary |
protected String |
classNotFoundMessage(NoClassDefFoundError e)
|
GenericPlugin |
createPlugin(String name,
GenericPlugin pluginType)
|
GenericPlugin |
createPlugin(String name,
GenericPlugin pluginType,
org.hyperic.util.config.ConfigResponse config)
|
GenericPlugin |
createPlugin(String name,
String type,
org.hyperic.util.config.ConfigResponse config)
|
org.hyperic.util.config.ConfigSchema |
getConfigSchema(String pluginName,
String platformName,
String typeName,
TypeInfo info,
org.hyperic.util.config.ConfigResponse config)
|
org.hyperic.util.config.ConfigSchema |
getConfigSchema(String plugin,
TypeInfo info,
org.hyperic.util.config.ConfigResponse config)
|
abstract String |
getName()
|
PluginManager |
getParent()
|
GenericPlugin |
getPlatformPlugin(String name)
|
GenericPlugin |
getPlatformPlugin(String os,
String name)
|
Map |
getPlatformPlugins()
|
Map |
getPlatformPlugins(String os)
|
GenericPlugin |
getPlugin(String name)
|
PluginInfo |
getPluginInfo(String name)
|
Map<String,GenericPlugin> |
getPlugins()
|
List |
getPlugins(PluginInfo info)
|
Properties |
getProperties()
|
String |
getProperty(String key)
|
String |
getProperty(String key,
String defVal)
|
void |
init(PluginManager parent)
|
boolean |
isPropertyEnabled(String key)
|
boolean |
isPropertyEnabled(String key,
boolean defVal)
|
boolean |
isRegistered(String name)
|
protected void |
mergeConfigSchema(PluginManager pm,
org.hyperic.util.config.ConfigSchema schema,
TypeInfo info,
org.hyperic.util.config.ConfigResponse config)
|
void |
registerPlugin(GenericPlugin plugin)
|
void |
registerPlugin(GenericPlugin plugin,
org.hyperic.util.config.ConfigResponse response)
|
void |
registerPlugin(String name,
GenericPlugin plugin)
|
void |
removePlugin(String name)
|
void |
setPluginInfo(String name,
PluginInfo info)
|
void |
shutdown()
|
void |
updatePlugin(GenericPlugin plugin,
org.hyperic.util.config.ConfigResponse response)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
plugins
protected Map<String,GenericPlugin> plugins
log
protected org.apache.commons.logging.Log log
PluginManager
public PluginManager()
PluginManager
public PluginManager(Properties props)
getName
public abstract String getName()
init
public void init(PluginManager parent)
throws PluginException
- Throws:
PluginException
shutdown
public void shutdown()
throws PluginException
- Throws:
PluginException
getProperties
public Properties getProperties()
getProperty
public String getProperty(String key,
String defVal)
getProperty
public String getProperty(String key)
isPropertyEnabled
public boolean isPropertyEnabled(String key,
boolean defVal)
isPropertyEnabled
public boolean isPropertyEnabled(String key)
getParent
public PluginManager getParent()
mergeConfigSchema
protected void mergeConfigSchema(PluginManager pm,
org.hyperic.util.config.ConfigSchema schema,
TypeInfo info,
org.hyperic.util.config.ConfigResponse config)
getConfigSchema
public org.hyperic.util.config.ConfigSchema getConfigSchema(String plugin,
TypeInfo info,
org.hyperic.util.config.ConfigResponse config)
throws PluginNotFoundException
- Throws:
PluginNotFoundException
getConfigSchema
public org.hyperic.util.config.ConfigSchema getConfigSchema(String pluginName,
String platformName,
String typeName,
TypeInfo info,
org.hyperic.util.config.ConfigResponse config)
throws PluginNotFoundException
- Throws:
PluginNotFoundException
getPlugin
public GenericPlugin getPlugin(String name)
throws PluginNotFoundException
- Throws:
PluginNotFoundException
getPlatformPlugin
public GenericPlugin getPlatformPlugin(String name)
throws PluginNotFoundException
- Throws:
PluginNotFoundException
getPlatformPlugin
public GenericPlugin getPlatformPlugin(String os,
String name)
throws PluginNotFoundException
- Throws:
PluginNotFoundException
removePlugin
public void removePlugin(String name)
throws PluginException,
PluginNotFoundException
- Throws:
PluginException
PluginNotFoundException
isRegistered
public boolean isRegistered(String name)
registerPlugin
public void registerPlugin(GenericPlugin plugin)
throws PluginException,
PluginExistsException
- Throws:
PluginException
PluginExistsException
registerPlugin
public void registerPlugin(String name,
GenericPlugin plugin)
throws PluginException,
PluginExistsException
- Throws:
PluginException
PluginExistsException
registerPlugin
public void registerPlugin(GenericPlugin plugin,
org.hyperic.util.config.ConfigResponse response)
throws PluginException,
PluginExistsException
- Throws:
PluginException
PluginExistsException
updatePlugin
public void updatePlugin(GenericPlugin plugin,
org.hyperic.util.config.ConfigResponse response)
throws PluginException,
PluginNotFoundException
- Throws:
PluginException
PluginNotFoundException
createPlugin
public GenericPlugin createPlugin(String name,
String type,
org.hyperic.util.config.ConfigResponse config)
throws PluginException,
PluginExistsException,
PluginNotFoundException
- Throws:
PluginException
PluginExistsException
PluginNotFoundException
createPlugin
public GenericPlugin createPlugin(String name,
GenericPlugin pluginType)
throws PluginException,
PluginExistsException
- Throws:
PluginException
PluginExistsException
createPlugin
public GenericPlugin createPlugin(String name,
GenericPlugin pluginType,
org.hyperic.util.config.ConfigResponse config)
throws PluginException,
PluginExistsException
- Throws:
PluginException
PluginExistsException
getPlugins
public Map<String,GenericPlugin> getPlugins()
getPlatformPlugins
public Map getPlatformPlugins(String os)
- Returns:
- Map of plugins registered for the given platform.
getPlatformPlugins
public Map getPlatformPlugins()
- Returns:
- Map of plugins registered for the current platform.
getPlugins
public List getPlugins(PluginInfo info)
setPluginInfo
public void setPluginInfo(String name,
PluginInfo info)
getPluginInfo
public PluginInfo getPluginInfo(String name)
classNotFoundMessage
protected String classNotFoundMessage(NoClassDefFoundError e)
Copyright © 2004-2010 Hyperic, Inc. support@hyperic.net, All Rights Reserved.