Class AbstractSQLPlugin

All Implemented Interfaces:
PluginMBean, SQLPluginMBean, DynamicMBean, MBeanRegistration, BaseObjectNamed, SelfEmailingMBean

public abstract class AbstractSQLPlugin extends AbstractPlugin implements SQLPluginMBean
Abstract class that handles basic functionality for plugins that execute SQL scripts. Uses SQLCommandTool to actually call and execute a script, which looks in the file path /db/sql for the script. All concrete subclasses will have to implement the handleResults() method to actually process the information that was returned from the script. Typically that plugin should write the information to a file in the correct output directory.

Supported API: true

Extendable: true
  • Method Details

    • handleResults

      protected abstract Map<String,Object> handleResults(List<wt.tools.sql.SQLResult> results) throws SQLException
      Abstract method that must be provided to actually do something with the results of the script that was executed.
      Parameters:
      results - List of SQLResult objects to process
      Returns:
      Map<String,Object> The return type is a Map that contains an inner Map. Map<String, Map<String, String>>. The "inner" Map<String, String> is a Map that contains the plugin execution status. The outer Map<String, Object> is a Map that contains which server the plugin executed on. This allows the plugin framework to report information across the cluster for each plugin executed.
      Throws:
      SQLException -

      Supported API: true