|
Hyperic HQ Plugin API v. 5.8.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hyperic.hq.product.GenericPlugin
public abstract class GenericPlugin
Field Summary | |
---|---|
protected org.hyperic.util.config.ConfigResponse |
config
|
static String |
FILE_DELIM
|
static String |
FILE_DELIM_ESC
|
static String |
PROP_NAME
Key used to store value of XML resource name attribute. |
Constructor Summary | |
---|---|
GenericPlugin()
|
Method Summary | |
---|---|
protected void |
adjustClassPath(String installpath)
Any jars that exist relative to the given installpath will be added to the plugin's classpath. |
void |
configure(org.hyperic.util.config.ConfigResponse config)
|
protected String[] |
getAbsoluteFiles(String value,
String dir)
Expand a String to array of absolute file names. |
org.hyperic.util.config.ConfigResponse |
getConfig()
|
String |
getConfig(String key)
Shortcut, same as getConfig().getValue(key) |
org.hyperic.util.config.ConfigSchema |
getConfigSchema(TypeInfo info,
org.hyperic.util.config.ConfigResponse config)
The ConfigSchema used to render config options for this resource in the UI and client shell. |
org.hyperic.util.config.ConfigSchema |
getCustomPropertiesSchema()
|
org.hyperic.util.config.ConfigSchema |
getCustomPropertiesSchema(String name)
|
org.hyperic.util.config.ConfigSchema |
getCustomPropertiesSchema(TypeInfo info)
|
String |
getDefaultInstallPath()
|
protected org.apache.commons.logging.Log |
getLog()
Wrapper for LogFactory.getLog which uses the name returned by getLogName(). |
protected String |
getLogName()
Default name for getLog() method. |
String |
getManagerProperty(String key)
|
String |
getName()
Unique name used by PluginManager.getPlugin |
static String |
getPlatformName()
Method to assist with naming of resources. |
String |
getPluginClassName(String pluginType,
String resourceType)
|
PluginData |
getPluginData()
|
String |
getPluginProperty(String name)
Get a value defined by a <property> tag in the plugin's hq-plugin.xml |
String |
getPluginVersion()
|
ProductPlugin |
getProductPlugin()
Get the ProductPlugin that defined the TypeInfo for this plugin instance. |
Properties |
getProperties()
Get all properties defined using <property> at the top-level in the plugin's hq-plugin.xml |
static String |
getScriptExtension()
|
static String |
getScriptExtension(boolean isWin32)
|
String |
getScriptExtension(TypeInfo info)
|
TypeInfo |
getTypeInfo()
|
String |
getTypeNameProperty()
Shortcut, same as:
getTypeNameProperty(getTypeInfo().getName());
|
String |
getTypeNameProperty(String type)
Shortcut, same as:
getTypeProperty(type, PROP_NAME);
|
Properties |
getTypeProperties()
Get all properties defined using <property> within the resource tag (platform|server|service) for this type. |
String |
getTypeProperty(String name)
Shortcut, same as:
getTypeProperty(getTypeInfo().getName(), name);
|
String |
getTypeProperty(String type,
String name)
Get a value defined by a <property> tag in the plugin's hq-plugin.xml, within a <server> or <service> tag for this plugin's type. |
String |
getTypeProperty(TypeInfo type,
String name)
If name property is not found for the given type, try using the type's parent. |
void |
init(PluginManager manager)
Called when the plugin is loaded on the server and on the agent side. |
boolean |
isNetStatEnabled()
|
static boolean |
isWin32()
|
InputStream |
openResource(String name)
Wrapper around ClassLoader.getResource/getResourceAsStream to open a resource from this plugin's .jar file. |
void |
setData(PluginData data)
|
void |
setName(String name)
|
void |
setPluginVersion(String version)
|
void |
setTypeInfo(TypeInfo type)
|
void |
shutdown()
Called when the server or agent is shutdown. |
protected List |
toFileList(String value)
Expand a String to List of file names. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROP_NAME
protected org.hyperic.util.config.ConfigResponse config
public static final String FILE_DELIM
public static final String FILE_DELIM_ESC
Constructor Detail |
---|
public GenericPlugin()
Method Detail |
---|
public void setData(PluginData data)
public PluginData getPluginData()
protected List toFileList(String value)
value
- Comma delimited list of files
protected String[] getAbsoluteFiles(String value, String dir)
value
- Expanded using toFileList()dir
- Parent directory used to resolve relative file names.
public boolean isNetStatEnabled()
public static boolean isWin32()
public static String getPlatformName()
public String getName()
public void setName(String name)
public String getPluginVersion()
public void setPluginVersion(String version)
public TypeInfo getTypeInfo()
public void setTypeInfo(TypeInfo type)
public org.hyperic.util.config.ConfigSchema getConfigSchema(TypeInfo info, org.hyperic.util.config.ConfigResponse config)
info
- The TypeInfo of this plugin from ProductPlugin.getTypesconfig
- ConfigReponse of the parent resource (if any).
public org.hyperic.util.config.ConfigSchema getCustomPropertiesSchema(String name)
public org.hyperic.util.config.ConfigSchema getCustomPropertiesSchema(TypeInfo info)
public org.hyperic.util.config.ConfigSchema getCustomPropertiesSchema()
public String getManagerProperty(String key)
public String getPluginProperty(String name)
public Properties getProperties()
public Properties getTypeProperties()
public String getTypeProperty(String type, String name)
Same as:
getProperty(type + "." + name);
public String getTypeProperty(TypeInfo type, String name)
public String getTypeProperty(String name)
getTypeProperty(getTypeInfo().getName(), name);
public String getTypeNameProperty(String type)
getTypeProperty(type, PROP_NAME);
public String getTypeNameProperty()
getTypeNameProperty(getTypeInfo().getName());
public void init(PluginManager manager) throws PluginException
manager
- The plugin manager for this plugin type.
PluginException
public void shutdown() throws PluginException
PluginException
public org.hyperic.util.config.ConfigResponse getConfig()
public String getConfig(String key)
public void configure(org.hyperic.util.config.ConfigResponse config) throws PluginException
PluginException
public String getDefaultInstallPath()
public static String getScriptExtension()
public String getScriptExtension(TypeInfo info)
public static String getScriptExtension(boolean isWin32)
protected String getLogName()
protected org.apache.commons.logging.Log getLog()
public ProductPlugin getProductPlugin()
protected void adjustClassPath(String installpath)
public InputStream openResource(String name) throws IOException
IOException
public String getPluginClassName(String pluginType, String resourceType)
|
Hyperic HQ Plugin API v. 5.8.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |