Hyperic HQ Plugin API v. 4.5.3.1

org.hyperic.hq.product
Class ProductPluginManager

java.lang.Object
  extended by org.hyperic.hq.product.PluginManager
      extended by org.hyperic.hq.product.ProductPluginManager

public class ProductPluginManager
extends PluginManager

This class is a manager for ProductPlugin implementations and is also a manager of plugin managers.


Field Summary
static File PLUGIN_PROPERTIES_FILE
           
static String PROP_PDK_DIR
           
static String PROPERTY_PREFIX
           
 
Fields inherited from class org.hyperic.hq.product.PluginManager
plugins
 
Constructor Summary
ProductPluginManager()
           
ProductPluginManager(File file)
           
ProductPluginManager(Properties props)
           
 
Method Summary
 void addPluginTypes(TypeInfo[] types, ProductPlugin plugin)
           
 ServerDetector getAutoinventoryPlugin(String name)
           
 AutoinventoryPluginManager getAutoinventoryPluginManager()
           
 ConfigTrackPluginManager getConfigTrackPluginManager()
           
 ControlPlugin getControlPlugin(String name)
           
 ControlPluginManager getControlPluginManager()
           
 LiveDataPluginManager getLiveDataPluginManager()
           
 LogTrackPluginManager getLogTrackPluginManager()
           
 MeasurementPlugin getMeasurementPlugin(String name)
           
 MeasurementPluginManager getMeasurementPluginManager()
           
 String getName()
           
static String getNameFromFile(String file)
          Derive plugin name from file name-plugin.ext
static String getPdkDir()
           
static String getPdkPluginsDir()
           
static String getPdkWorkDir()
           
 PluginManager getPluginManager(String type)
           
 ProductPlugin getProductPlugin(String name)
           
static String getPropertyKey(String plugin, String key)
           
 boolean getRegisterTypes()
           
 RtPlugin getRtPlugin(String name)
           
 RtPluginManager getRtPluginManager()
           
 TypeInfo getTypeInfo(String platform, String name)
          Find TypeInfo for the given platform and type name.
 void init()
           
protected  void initPluginManagers(Properties props)
           
 boolean isClient()
           
 boolean isLoadablePluginName(String name)
           
 int registerCustomPlugins(String startDir)
           
 String registerPluginJar(String jarName)
          registerPluginJar() without mapping types.
 String registerPluginJar(String jarName, ClassLoader resourceLoader)
          Load a product plugin jar.
 int registerPlugins(String path)
           
 void removePluginJar(String jarName)
           
 void removePluginTypes(List<TypeInfo> typeInfos)
           
static void setPdkDir(String dir)
           
static void setPdkPluginsDir(String dir)
           
static void setPdkWorkDir(String dir)
           
 void setProperty(String key, String value)
           
 void setRegisterTypes(boolean registerTypes)
          If true creates a mapping of the ProductPlugin TypeInfos, only needed on the server side.
 void shutdown()
           
 void updatePluginJar(String jarName)
           
 
Methods inherited from class org.hyperic.hq.product.PluginManager
classNotFoundMessage, createPlugin, createPlugin, createPlugin, getConfigSchema, getParent, getPlatformPlugin, getPlatformPlugin, getPlatformPlugins, getPlatformPlugins, getPlugin, getPluginInfo, getPlugins, getPlugins, getProperties, getProperty, getProperty, init, isPropertyEnabled, isPropertyEnabled, isRegistered, mergeConfigSchema, registerPlugin, registerPlugin, registerPlugin, removePlugin, setPluginInfo, updatePlugin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_PDK_DIR

public static final String PROP_PDK_DIR
See Also:
Constant Field Values

PLUGIN_PROPERTIES_FILE

public static final File PLUGIN_PROPERTIES_FILE

PROPERTY_PREFIX

public static final String PROPERTY_PREFIX
See Also:
Constant Field Values
Constructor Detail

ProductPluginManager

public ProductPluginManager()

ProductPluginManager

public ProductPluginManager(File file)

ProductPluginManager

public ProductPluginManager(Properties props)
Method Detail

setRegisterTypes

public void setRegisterTypes(boolean registerTypes)
If true creates a mapping of the ProductPlugin TypeInfos, only needed on the server side.


getRegisterTypes

public boolean getRegisterTypes()

getPropertyKey

public static String getPropertyKey(String plugin,
                                    String key)

getName

public String getName()
Specified by:
getName in class PluginManager

getNameFromFile

public static String getNameFromFile(String file)
Derive plugin name from file name-plugin.ext


getTypeInfo

public TypeInfo getTypeInfo(String platform,
                            String name)
Find TypeInfo for the given platform and type name.

Parameters:
platform - The platform name, e.g. "Linux"
name - The type name, e.g. "Apache 2.0"

getPdkDir

public static String getPdkDir()

setPdkDir

public static void setPdkDir(String dir)

getPdkPluginsDir

public static String getPdkPluginsDir()

setPdkPluginsDir

public static void setPdkPluginsDir(String dir)

getPdkWorkDir

public static String getPdkWorkDir()

setPdkWorkDir

public static void setPdkWorkDir(String dir)

init

public void init()
          throws PluginException
Throws:
PluginException

initPluginManagers

protected void initPluginManagers(Properties props)
                           throws PluginException
Throws:
PluginException

shutdown

public void shutdown()
              throws PluginException
Overrides:
shutdown in class PluginManager
Throws:
PluginException

getMeasurementPluginManager

public MeasurementPluginManager getMeasurementPluginManager()

getControlPluginManager

public ControlPluginManager getControlPluginManager()

getAutoinventoryPluginManager

public AutoinventoryPluginManager getAutoinventoryPluginManager()

getRtPluginManager

public RtPluginManager getRtPluginManager()

getLogTrackPluginManager

public LogTrackPluginManager getLogTrackPluginManager()

getConfigTrackPluginManager

public ConfigTrackPluginManager getConfigTrackPluginManager()

getLiveDataPluginManager

public LiveDataPluginManager getLiveDataPluginManager()

getMeasurementPlugin

public MeasurementPlugin getMeasurementPlugin(String name)

getControlPlugin

public ControlPlugin getControlPlugin(String name)

getAutoinventoryPlugin

public ServerDetector getAutoinventoryPlugin(String name)

getRtPlugin

public RtPlugin getRtPlugin(String name)

getProductPlugin

public ProductPlugin getProductPlugin(String name)

isLoadablePluginName

public boolean isLoadablePluginName(String name)

registerPluginJar

public String registerPluginJar(String jarName)
                         throws PluginException,
                                PluginExistsException
registerPluginJar() without mapping types.

Parameters:
jarName - The name of the jar file on disk.
Throws:
PluginException
PluginExistsException
See Also:
registerPluginJar(String jarName,ClassLoader resourceLoader)

registerCustomPlugins

public int registerCustomPlugins(String startDir)

registerPlugins

public int registerPlugins(String path)

registerPluginJar

public String registerPluginJar(String jarName,
                                ClassLoader resourceLoader)
                         throws PluginException,
                                PluginExistsException
Load a product plugin jar. Registers the product plugin, as defined by the Main-Class jar manifest attribute which must be a class which implements the ProductPlugin interface. Registers plugins supported for each plugin type (control, measurement, responsetime) as returned by the ProductPlugin.getPlugin method.

Parameters:
jarName - The name of the jar file on disk.
resourceLoader - ClassLoader used to find jar resources.
Returns:
The name of the product plugin as returned by ProductPlugin.getName.
Throws:
PluginException
PluginExistsException
See Also:
ProductPlugin

addPluginTypes

public void addPluginTypes(TypeInfo[] types,
                           ProductPlugin plugin)
                    throws PluginExistsException
Throws:
PluginExistsException

removePluginTypes

public void removePluginTypes(List<TypeInfo> typeInfos)

removePluginJar

public void removePluginJar(String jarName)
                     throws PluginException
Throws:
PluginException

updatePluginJar

public void updatePluginJar(String jarName)
                     throws PluginException
Throws:
PluginException

getPluginManager

public PluginManager getPluginManager(String type)
                               throws PluginException
Throws:
PluginException

setProperty

public void setProperty(String key,
                        String value)

isClient

public boolean isClient()

Hyperic HQ Plugin API v. 4.5.3.1

Copyright © 2004-2010 Hyperic, Inc. support@hyperic.net, All Rights Reserved.