Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.hq.product
Class JDBCControlPlugin

java.lang.Object
  extended by org.hyperic.hq.product.GenericPlugin
      extended by org.hyperic.hq.product.ControlPlugin
          extended by org.hyperic.hq.product.JDBCControlPlugin

public abstract class JDBCControlPlugin
extends ControlPlugin


Field Summary
protected  java.lang.String index
           
protected  java.lang.String password
           
protected  java.lang.String table
           
protected  java.lang.String url
           
protected  java.lang.String user
           
 
Fields inherited from class org.hyperic.hq.product.ControlPlugin
DEFAULT_TIMEOUT, manager, PROP_TIMEOUT, RESULT_FAILURE, RESULT_SUCCESS, STATE_RESTARTING, STATE_STARTED, STATE_STARTING, STATE_STOPPED, STATE_STOPPING, STATE_UNKNOWN
 
Fields inherited from class org.hyperic.hq.product.GenericPlugin
config, FILE_DELIM, FILE_DELIM_ESC, PROP_NAME
 
Constructor Summary
JDBCControlPlugin()
           
 
Method Summary
 void configure(ConfigResponse config)
           
abstract  void doAction(java.lang.String action)
           
 void doAction(java.lang.String action, java.lang.String[] args)
          Invokes plugin method with the name of param action.
 void execute(java.lang.String query)
           
 void executeQuery(java.lang.String query)
           
protected abstract  java.sql.Connection getConnection(java.lang.String url, java.lang.String user, java.lang.String password)
          The plugin must preform the DriverManager.getConnection so its ClassLoader is used to find the driver.
protected abstract  java.lang.Class getDriver()
          The plugin must preform the Class.forName so its ClassLoader is used to find the driver.
 boolean isRunning()
           
 
Methods inherited from class org.hyperic.hq.product.ControlPlugin
detectState, getActions, getConfigSchema, getManager, getMessage, getResult, getTimeout, getTimeoutMillis, init, setManager, setMessage, setResult, setTimeout, setTimeout, waitForState
 
Methods inherited from class org.hyperic.hq.product.GenericPlugin
adjustClassPath, getAbsoluteFiles, getConfig, getConfig, getCustomPropertiesSchema, getCustomPropertiesSchema, getCustomPropertiesSchema, getDefaultInstallPath, getLog, getLogName, getManagerProperty, getName, getPlatformName, getPluginClassName, getPluginData, getPluginProperty, getProductPlugin, getProperties, getScriptExtension, getScriptExtension, getScriptExtension, getTypeInfo, getTypeNameProperty, getTypeNameProperty, getTypeProperties, getTypeProperty, getTypeProperty, getTypeProperty, isNetStatEnabled, isWin32, openResource, setData, setName, setTypeInfo, shutdown, toFileList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

url

protected java.lang.String url

user

protected java.lang.String user

password

protected java.lang.String password

table

protected java.lang.String table

index

protected java.lang.String index
Constructor Detail

JDBCControlPlugin

public JDBCControlPlugin()
Method Detail

configure

public void configure(ConfigResponse config)
               throws PluginException
Overrides:
configure in class GenericPlugin
Throws:
PluginException

isRunning

public boolean isRunning()
Overrides:
isRunning in class ControlPlugin

getDriver

protected abstract java.lang.Class getDriver()
                                      throws java.lang.ClassNotFoundException
The plugin must preform the Class.forName so its ClassLoader is used to find the driver.

Throws:
java.lang.ClassNotFoundException

doAction

public void doAction(java.lang.String action,
                     java.lang.String[] args)
              throws PluginException
Description copied from class: ControlPlugin
Invokes plugin method with the name of param action.

Overrides:
doAction in class ControlPlugin
Throws:
PluginException

getConnection

protected abstract java.sql.Connection getConnection(java.lang.String url,
                                                     java.lang.String user,
                                                     java.lang.String password)
                                              throws java.sql.SQLException
The plugin must preform the DriverManager.getConnection so its ClassLoader is used to find the driver.

Throws:
java.sql.SQLException

doAction

public abstract void doAction(java.lang.String action)
                       throws PluginException
Overrides:
doAction in class ControlPlugin
Throws:
PluginException

execute

public void execute(java.lang.String query)
             throws PluginException
Throws:
PluginException

executeQuery

public void executeQuery(java.lang.String query)
                  throws PluginException
Throws:
PluginException

Hyperic HQ Plugin API v. 4.4.0.2

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