org.jmonit.support.jdbc
Class JdbcMonitor

java.lang.Object
  extended by org.jmonit.support.jdbc.JdbcMonitor

public class JdbcMonitor
extends java.lang.Object

Author:
Nicolas De Loof

Constructor Summary
JdbcMonitor(Monitor monitor)
          Constructor
 
Method Summary
protected  java.lang.String generalizeSql(java.lang.String sql)
          Convert a SQL query to a "generic" query by removing any hard coded value.
 Monitor getCallableStatementMonitor(java.lang.String sql)
           
 Monitor getConnectionMonitor()
           
 Monitor getPreparedStatementMonitor(java.lang.String sql)
           
 Monitor getStatementMonitor(java.lang.String sql)
           
 void monitorSQLException(java.sql.SQLException sqle)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcMonitor

public JdbcMonitor(Monitor monitor)
Constructor

Parameters:
monitor - The monitor used as root for JDBC monitoring
Method Detail

getConnectionMonitor

public Monitor getConnectionMonitor()

getStatementMonitor

public Monitor getStatementMonitor(java.lang.String sql)
Parameters:
sql - SQL request
Returns:
a monitor for this statement

getPreparedStatementMonitor

public Monitor getPreparedStatementMonitor(java.lang.String sql)
Parameters:
sql - SQL request
Returns:
a monitor for this preapredStatement

getCallableStatementMonitor

public Monitor getCallableStatementMonitor(java.lang.String sql)
Parameters:
sql - SQL request
Returns:
a monitor for this callableStatement

monitorSQLException

public void monitorSQLException(java.sql.SQLException sqle)

generalizeSql

protected java.lang.String generalizeSql(java.lang.String sql)
Convert a SQL query to a "generic" query by removing any hard coded value. This makes the SQL look like a PreparedStatement.

Parameters:
sql - SQL query
Returns:
generalized SQL query


Copyright © 2007 Nicolas De Loof. All Rights Reserved.