Hyperic HQ Plugin API v. 2.5.dev

net.hyperic.hq.product
Class ControlPlugin

java.lang.Object
  extended bynet.hyperic.hq.product.GenericPlugin
      extended bynet.hyperic.hq.product.ControlPlugin
Direct Known Subclasses:
JDBCControlPlugin, ServerControlPlugin, Win32ControlPlugin

public abstract class ControlPlugin
extends GenericPlugin

Base class for control plugins.


Field Summary
protected static int DEFAULT_TIMEOUT
           
protected  ControlPluginManager manager
           
static java.lang.String PROP_TIMEOUT
           
static int RESULT_FAILURE
           
static int RESULT_SUCCESS
           
static java.lang.String STATE_RESTARTING
           
static java.lang.String STATE_STARTED
           
static java.lang.String STATE_STARTING
           
static java.lang.String STATE_STOPPED
           
static java.lang.String STATE_STOPPING
           
static java.lang.String STATE_UNKNOWN
           
 
Fields inherited from class net.hyperic.hq.product.GenericPlugin
config, FILE_DELIM, FILE_DELIM_ESC, PROP_NAME
 
Constructor Summary
ControlPlugin()
           
 
Method Summary
protected  java.lang.String detectState()
           
 void doAction(java.lang.String action)
          Invokes plugin method with the name of param action.
 java.util.List getActions()
           
 ConfigSchema getConfigSchema(TypeInfo info, ConfigResponse config)
          The ConfigSchema used to render config options for this resource in the UI and client shell.
 java.lang.String getErrorStr()
           
protected  ControlPluginManager getManager()
           
 int getResult()
           
 int getTimeout()
           
 int getTimeoutMillis()
           
 void init(PluginManager manager)
          Called when the plugin is loaded on the server and on the agent side.
protected  boolean isRunning()
           
 void setErrorStr(java.lang.String errorStr)
           
protected  void setManager(ControlPluginManager manager)
           
 void setResult(int result)
           
 void setTimeout(int val)
           
 void setTimeout(java.lang.String val)
           
protected  java.lang.String waitForState(java.lang.String wantedState)
           
 
Methods inherited from class net.hyperic.hq.product.GenericPlugin
configure, getAbsoluteFiles, getConfig, getConfig, getCustomPropertiesSchema, getCustomPropertiesSchema, getCustomPropertiesSchema, getDefaultInstallPath, getLog, getLogName, getName, getPlatformName, getPluginClassName, getProductPlugin, getProperties, getProperty, getTypeInfo, getTypeNameProperty, getTypeNameProperty, getTypeProperty, getTypeProperty, getTypeProperty, isWin32, openResource, setName, setTypeInfo, shutdown, toFileList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_TIMEOUT

public static final java.lang.String PROP_TIMEOUT
See Also:
Constant Field Values

DEFAULT_TIMEOUT

protected static final int DEFAULT_TIMEOUT
See Also:
Constant Field Values

STATE_UNKNOWN

public static final java.lang.String STATE_UNKNOWN
See Also:
Constant Field Values

STATE_STARTING

public static final java.lang.String STATE_STARTING
See Also:
Constant Field Values

STATE_STARTED

public static final java.lang.String STATE_STARTED
See Also:
Constant Field Values

STATE_STOPPING

public static final java.lang.String STATE_STOPPING
See Also:
Constant Field Values

STATE_STOPPED

public static final java.lang.String STATE_STOPPED
See Also:
Constant Field Values

STATE_RESTARTING

public static final java.lang.String STATE_RESTARTING
See Also:
Constant Field Values

RESULT_SUCCESS

public static final int RESULT_SUCCESS
See Also:
Constant Field Values

RESULT_FAILURE

public static final int RESULT_FAILURE
See Also:
Constant Field Values

manager

protected ControlPluginManager manager
Constructor Detail

ControlPlugin

public ControlPlugin()
Method Detail

getActions

public java.util.List getActions()

doAction

public void doAction(java.lang.String action)
              throws PluginException
Invokes plugin method with the name of param action.

Throws:
PluginException

isRunning

protected boolean isRunning()

getTimeout

public int getTimeout()

getTimeoutMillis

public int getTimeoutMillis()

setTimeout

public void setTimeout(int val)

setTimeout

public void setTimeout(java.lang.String val)

getManager

protected ControlPluginManager getManager()

setManager

protected void setManager(ControlPluginManager manager)

init

public void init(PluginManager manager)
          throws PluginException
Description copied from class: GenericPlugin
Called when the plugin is loaded on the server and on the agent side.

Overrides:
init in class GenericPlugin
Parameters:
manager - The plugin manager for this plugin type.
Throws:
PluginException

getResult

public int getResult()

setResult

public void setResult(int result)

getErrorStr

public java.lang.String getErrorStr()

setErrorStr

public void setErrorStr(java.lang.String errorStr)

detectState

protected java.lang.String detectState()

waitForState

protected java.lang.String waitForState(java.lang.String wantedState)

getConfigSchema

public ConfigSchema getConfigSchema(TypeInfo info,
                                    ConfigResponse config)
Description copied from class: GenericPlugin
The ConfigSchema used to render config options for this resource in the UI and client shell.

Overrides:
getConfigSchema in class GenericPlugin
Parameters:
info - The TypeInfo of this plugin from ProductPlugin.getTypes
config - ConfigReponse of the parent resource (if any).
Returns:
ConfigSchema for this resource.

Hyperic HQ Plugin API v. 2.5.dev

Copyright © 2004-2005 Hyperic LLC support@hyperic.net, All Rights Reserved.