public class DefaultEventListener extends JdbcEventListener
JdbcEventListener
must always be applied as the first listener.
It populates the information objects StatementInformation
, PreparedStatementInformation
,
CallableStatementInformation
and ResultSetInformation
Modifier and Type | Field and Description |
---|---|
static DefaultEventListener |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
void |
onAfterAddBatch(StatementInformation statementInformation,
long timeElapsedNanos,
String sql,
SQLException e)
This callback method is executed after the
Statement.addBatch(String) or
Statement.addBatch(String) method is invoked. |
void |
onAfterCallableStatementSet(CallableStatementInformation statementInformation,
String parameterName,
Object value,
SQLException e)
This callback method is executed after any of the
CallableStatement .set* methods are invoked. |
void |
onAfterExecute(PreparedStatementInformation statementInformation,
long timeElapsedNanos,
SQLException e)
This callback method is executed after any the
PreparedStatement.execute() methods are invoked. |
void |
onAfterExecute(StatementInformation statementInformation,
long timeElapsedNanos,
String sql,
SQLException e)
This callback method is executed after any the
Statement.execute(String) methods are invoked. |
void |
onAfterExecuteBatch(StatementInformation statementInformation,
long timeElapsedNanos,
int[] updateCounts,
SQLException e)
This callback method is executed after the
Statement.executeBatch() method is invoked. |
void |
onAfterExecuteQuery(PreparedStatementInformation statementInformation,
long timeElapsedNanos,
SQLException e)
This callback method is executed after the
PreparedStatement.executeQuery() method is invoked. |
void |
onAfterExecuteQuery(StatementInformation statementInformation,
long timeElapsedNanos,
String sql,
SQLException e)
This callback method is executed after the
Statement.executeQuery(String) method is invoked. |
void |
onAfterExecuteUpdate(PreparedStatementInformation statementInformation,
long timeElapsedNanos,
int rowCount,
SQLException e)
This callback method is executed after the
PreparedStatement.executeUpdate() method is invoked. |
void |
onAfterExecuteUpdate(StatementInformation statementInformation,
long timeElapsedNanos,
String sql,
int rowCount,
SQLException e)
This callback method is executed after any of the
Statement.executeUpdate(String) methods are invoked. |
void |
onAfterGetResultSet(StatementInformation statementInformation,
long timeElapsedNanos,
SQLException e)
This callback method is executed after the
Statement.getResultSet() method is invoked. |
void |
onAfterPreparedStatementSet(PreparedStatementInformation statementInformation,
int parameterIndex,
Object value,
SQLException e)
This callback method is executed after any of the
PreparedStatement .set* methods are invoked. |
void |
onAfterResultSetNext(ResultSetInformation resultSetInformation,
long timeElapsedNanos,
boolean hasNext,
SQLException e)
This callback method is executed after the
ResultSet.next() method is invoked. |
onAfterAddBatch, onAfterCommit, onAfterConnectionClose, onAfterResultSetClose, onAfterResultSetGet, onAfterResultSetGet, onAfterRollback, onBeforeAddBatch, onBeforeAddBatch, onBeforeCommit, onBeforeExecute, onBeforeExecute, onBeforeExecuteBatch, onBeforeExecuteQuery, onBeforeExecuteQuery, onBeforeExecuteUpdate, onBeforeExecuteUpdate, onBeforeResultSetNext, onBeforeRollback, onConnectionWrapped
public static final DefaultEventListener INSTANCE
public void onAfterAddBatch(StatementInformation statementInformation, long timeElapsedNanos, String sql, SQLException e)
JdbcEventListener
Statement.addBatch(String)
or
Statement.addBatch(String)
method is invoked.onAfterAddBatch
in class JdbcEventListener
statementInformation
- The meta information about the Statement
being invokedtimeElapsedNanos
- The execution time of the execute callsql
- The SQL string provided to the execute methode
- The SQLException
which may be triggered by the call (null
if
there was no exception).public void onAfterExecute(PreparedStatementInformation statementInformation, long timeElapsedNanos, SQLException e)
JdbcEventListener
PreparedStatement.execute()
methods are invoked.onAfterExecute
in class JdbcEventListener
statementInformation
- The meta information about the Statement
being invokedtimeElapsedNanos
- The execution time of the execute calle
- The SQLException
which may be triggered by the call (null
if
there was no exception).public void onAfterExecute(StatementInformation statementInformation, long timeElapsedNanos, String sql, SQLException e)
JdbcEventListener
Statement.execute(String)
methods are invoked.onAfterExecute
in class JdbcEventListener
statementInformation
- The meta information about the Statement
being invokedtimeElapsedNanos
- The execution time of the execute callsql
- The SQL string provided to the execute methode
- The SQLException
which may be triggered by the call (null
if
there was no exception).public void onAfterExecuteBatch(StatementInformation statementInformation, long timeElapsedNanos, int[] updateCounts, SQLException e)
JdbcEventListener
Statement.executeBatch()
method is invoked.onAfterExecuteBatch
in class JdbcEventListener
statementInformation
- The meta information about the Statement
being invokedtimeElapsedNanos
- The execution time of the execute callupdateCounts
- An array of update counts or null if an exception was throwne
- The SQLException
which may be triggered by the call (null
if
there was no exception).public void onAfterExecuteUpdate(PreparedStatementInformation statementInformation, long timeElapsedNanos, int rowCount, SQLException e)
JdbcEventListener
PreparedStatement.executeUpdate()
method is invoked.onAfterExecuteUpdate
in class JdbcEventListener
statementInformation
- The meta information about the Statement
being invokedtimeElapsedNanos
- The execution time of the execute callrowCount
- Either the row count for SQL Data Manipulation Language (DML) statements or 0 for SQL
statements that return nothing or if an exception was throwne
- The SQLException
which may be triggered by the call (null
if
there was no exception).public void onAfterExecuteUpdate(StatementInformation statementInformation, long timeElapsedNanos, String sql, int rowCount, SQLException e)
JdbcEventListener
Statement.executeUpdate(String)
methods are invoked.onAfterExecuteUpdate
in class JdbcEventListener
statementInformation
- The meta information about the Statement
being invokedtimeElapsedNanos
- The execution time of the execute callsql
- The SQL string provided to the execute methodrowCount
- Either the row count for SQL Data Manipulation Language (DML) statements or 0 for SQL
statements that return nothing or if an exception was throwne
- The SQLException
which may be triggered by the call (null
if
there was no exception).public void onAfterExecuteQuery(PreparedStatementInformation statementInformation, long timeElapsedNanos, SQLException e)
JdbcEventListener
PreparedStatement.executeQuery()
method is invoked.onAfterExecuteQuery
in class JdbcEventListener
statementInformation
- The meta information about the Statement
being invokedtimeElapsedNanos
- The execution time of the execute calle
- The SQLException
which may be triggered by the call (null
if
there was no exception).public void onAfterExecuteQuery(StatementInformation statementInformation, long timeElapsedNanos, String sql, SQLException e)
JdbcEventListener
Statement.executeQuery(String)
method is invoked.onAfterExecuteQuery
in class JdbcEventListener
statementInformation
- The meta information about the Statement
being invokedtimeElapsedNanos
- The execution time of the execute callsql
- The SQL string provided to the execute methode
- The SQLException
which may be triggered by the call (null
if
there was no exception).public void onAfterGetResultSet(StatementInformation statementInformation, long timeElapsedNanos, SQLException e)
JdbcEventListener
Statement.getResultSet()
method is invoked.onAfterGetResultSet
in class JdbcEventListener
statementInformation
- The meta information about the Statement
being invokedtimeElapsedNanos
- The execution time of the execute calle
- The SQLException
which may be triggered by the call (null
if
there was no exception).public void onAfterResultSetNext(ResultSetInformation resultSetInformation, long timeElapsedNanos, boolean hasNext, SQLException e)
JdbcEventListener
ResultSet.next()
method is invoked.onAfterResultSetNext
in class JdbcEventListener
resultSetInformation
- The meta information about the ResultSet
being invokedtimeElapsedNanos
- The execution time of the execute callhasNext
- The return value of ResultSet.next()
e
- The SQLException
which may be triggered by the call (null
if
there was no exception).public void onAfterCallableStatementSet(CallableStatementInformation statementInformation, String parameterName, Object value, SQLException e)
JdbcEventListener
CallableStatement
.set* methods are invoked.onAfterCallableStatementSet
in class JdbcEventListener
statementInformation
- The meta information about the Statement
being invokedparameterName
- The name of the parametervalue
- the column value; if the value is SQL NULL, the value returned is nulle
- The SQLException
which may be triggered by the call (null
if
there was no exception).public void onAfterPreparedStatementSet(PreparedStatementInformation statementInformation, int parameterIndex, Object value, SQLException e)
JdbcEventListener
PreparedStatement
.set* methods are invoked.onAfterPreparedStatementSet
in class JdbcEventListener
statementInformation
- The meta information about the Statement
being invokedparameterIndex
- The first parameter is 1, the second is 2, ...value
- the column value; if the value is SQL NULL, the value returned is nulle
- The SQLException
which may be triggered by the call (null
if
there was no exception).Copyright © 2002-2016 P6Spy. All Rights Reserved.