Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 5.8.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hyperic.hq.product
Class ControlPlugin

    java.lang.Object
      org.hyperic.hq.product.GenericPlugin
          org.hyperic.hq.product.ControlPlugin

Direct Known Subclasses:
  JDBCControlPlugin, MxControlPlugin, ProcessControlPlugin, ServerControlPlugin, Win32ControlPlugin

    public abstract class ControlPlugin

extends GenericPlugin

Base class for control plugins.

Field Summary
`protected static int` | `DEFAULT_TIMEOUT`
`protected ControlPluginManager` | `manager`
`static String` | `PROP_TIMEOUT`
`static int` | `RESULT_FAILURE`
`static int` | `RESULT_SUCCESS`
`static String` | `STATE_RESTARTING`
`static String` | `STATE_STARTED`
`static String` | `STATE_STARTING`
`static String` | `STATE_STOPPED`
`static String` | `STATE_STOPPING`
`static String` | `STATE_UNKNOWN`

Fields inherited from class org.hyperic.hq.product.GenericPlugin
`config, FILE_DELIM, FILE_DELIM_ESC, PROP_NAME`

Constructor Summary
`ControlPlugin()`

Method Summary
`protected String` | `detectState()`
`void` | `doAction(String action)`
`void` | `doAction(String action, ControlSendCommandResult_args resultsMetadata)`
`void` | `doAction(String action, String[] args)` Invokes plugin method with the name of param action.
`void` | `doAction(String action, String[] args, ControlSendCommandResult_args resultsMetadata)`
`List<String>` | `getActions()`
`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.
`protected ControlPluginManager` | `getManager()`
`String` | `getMessage()`
`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()`
`protected void` | `setExceptionMessage(Throwable t)`
`protected void` | `setManager(ControlPluginManager manager)`
`void` | `setMessage(String message)`
`void` | `setResult(int result)`
`void` | `setTimeout(int val)`
`void` | `setTimeout(String val)`
`protected String` | `waitForState(String wantedState)`

Methods inherited from class org.hyperic.hq.product.GenericPlugin
`adjustClassPath, configure, getAbsoluteFiles, getConfig, getConfig, getCustomPropertiesSchema, getCustomPropertiesSchema, getCustomPropertiesSchema, getDefaultInstallPath, getLog, getLogName, getManagerProperty, getName, getPlatformName, getPluginClassName, getPluginData, getPluginProperty, getPluginVersion, getProductPlugin, getProperties, getScriptExtension, getScriptExtension, getScriptExtension, getTypeInfo, getTypeNameProperty, getTypeNameProperty, getTypeProperties, getTypeProperty, getTypeProperty, getTypeProperty, isNetStatEnabled, isWin32, openResource, setData, setName, setPluginVersion, 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 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 String STATE_UNKNOWN

See Also:
  Constant Field Values

### STATE_STARTING

    public static final String STATE_STARTING

See Also:
  Constant Field Values

### STATE_STARTED

    public static final String STATE_STARTED

See Also:
  Constant Field Values

### STATE_STOPPING

    public static final String STATE_STOPPING

See Also:
  Constant Field Values

### STATE_STOPPED

    public static final String STATE_STOPPED

See Also:
  Constant Field Values

### STATE_RESTARTING

    public static final 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 List<String> getActions()

### setExceptionMessage

    protected void setExceptionMessage(Throwable t)

### doAction

    public void doAction(String action,
                         ControlSendCommandResult_args resultsMetadata)
                  throws PluginException

  Throws:
    `PluginException`

### doAction

    public void doAction(String action)
                  throws PluginException

  Throws:
    `PluginException`

### doAction

    public void doAction(String action,
                         String[] args,
                         ControlSendCommandResult_args resultsMetadata)
                  throws PluginException

  Throws:
    `PluginException`

### doAction

    public void doAction(String action,
                         String[] args)
                  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(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)

### getMessage

    public String getMessage()

### setMessage

    public void setMessage(String message)

### detectState

    protected String detectState()

### waitForState

    protected String waitForState(String wantedState)

### getConfigSchema

    public org.hyperic.util.config.ConfigSchema getConfigSchema(TypeInfo info,
                                                                org.hyperic.util.config.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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 5.8.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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