Class AbstractSQLPlugin
java.lang.Object
javax.management.StandardMBean
wt.jmx.core.StandardMBean
wt.jmx.core.SelfAwareMBean
com.ptc.customersupport.mbeans.AbstractPlugin
com.ptc.customersupport.mbeans.plugins.AbstractSQLPlugin
- All Implemented Interfaces:
PluginMBean,SQLPluginMBean,DynamicMBean,MBeanRegistration,BaseObjectNamed,SelfEmailingMBean
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
Supported API: true
Extendable: true
-
Method Summary
Modifier and TypeMethodDescriptionhandleResults(List<wt.tools.sql.SQLResult> results) Abstract method that must be provided to actually do something with the results of the script that was executed.Methods inherited from class wt.jmx.core.SelfAwareMBean
deregister, destroy, getBaseObjectName, getObjectName, getObjectNameOnPreRegister, getOwnerMBean, getSelfAwareMBean, init, isInited, isRegistered, isStarted, onDestroy, onInit, onStart, onStop, postDeregister, postRegister, preDeregister, preRegister, register, register, register, resetObjectName, setOwnerMBean, start, stopMethods inherited from class wt.jmx.core.StandardMBean
cacheMBeanInfo, cacheMBeanInfoInInstance, createMBeanInfo, emailThisMBean, getAttributes, getCachedInstanceMBeanInfo, getCachedMBeanInfo, getDescription, getDescription, getDescription, getDescription, getImpact, getMBeanInfo, getParameterName, setAttributesMethods inherited from class javax.management.StandardMBean
getAttribute, getClassName, getConstructors, getDescription, getDescription, getDescription, getImplementation, getImplementationClass, getMBeanInterface, getParameterName, invoke, setAttribute, setImplementationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.ptc.customersupport.mbeans.PluginMBean
areDbCredentialsNeeded, areWindchillCredentialsNeeded, getClusterAware, getCompressOutput, getConfigFileName, getDateRangeUsed, getDescription, getDisplayName, getMBeanName, getName, getPluginType, getPluginVersion, setClusterAware, setCompressOutput, setDatabaseCredentials, setDateRangeUsed, setDisplayName, setMBeanNameMethods inherited from interface wt.jmx.core.mbeans.SelfEmailingMBean
emailThisMBean
-
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
-