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,
java.lang.String sql,
java.sql.SQLException e)
This callback method is executed after the
Statement.addBatch(String) or
Statement.addBatch(String) method is invoked. |
void |
onAfterCallableStatementSet(CallableStatementInformation statementInformation,
java.lang.String parameterName,
java.lang.Object value,
java.sql.SQLException e)
This callback method is executed after any of the
CallableStatement.set* methods are invoked. |
void |
onAfterExecute(PreparedStatementInformation statementInformation,
long timeElapsedNanos,
java.sql.SQLException e)
This callback method is executed after any the
PreparedStatement.execute() methods are invoked. |
void |
onAfterExecute(StatementInformation statementInformation,
long timeElapsedNanos,
java.lang.String sql,
java.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,
java.sql.SQLException e)
This callback method is executed after the
Statement.executeBatch() method is invoked. |
void |
onAfterExecuteQuery(PreparedStatementInformation statementInformation,
long timeElapsedNanos,
java.sql.SQLException e)
This callback method is executed after the
PreparedStatement.executeQuery() method is invoked. |
void |
onAfterExecuteQuery(StatementInformation statementInformation,
long timeElapsedNanos,
java.lang.String sql,
java.sql.SQLException e)
This callback method is executed after the
Statement.executeQuery(String) method is invoked. |
void |
onAfterExecuteUpdate(PreparedStatementInformation statementInformation,
long timeElapsedNanos,
int rowCount,
java.sql.SQLException e)
This callback method is executed after the
PreparedStatement.executeUpdate() method is invoked. |
void |
onAfterExecuteUpdate(StatementInformation statementInformation,
long timeElapsedNanos,
java.lang.String sql,
int rowCount,
java.sql.SQLException e)
This callback method is executed after any of the
Statement.executeUpdate(String) methods are invoked. |
void |
onAfterGetResultSet(StatementInformation statementInformation,
long timeElapsedNanos,
java.sql.SQLException e)
This callback method is executed after the
Statement.getResultSet() method is invoked. |
void |
onAfterPreparedStatementSet(PreparedStatementInformation statementInformation,
int parameterIndex,
java.lang.Object value,
java.sql.SQLException e)
This callback method is executed after any of the
PreparedStatement.set* methods are invoked. |
void |
onAfterResultSetNext(ResultSetInformation resultSetInformation,
long timeElapsedNanos,
boolean hasNext,
java.sql.SQLException e)
This callback method is executed after the
ResultSet.next() method is invoked. |
onAfterAddBatch, onAfterCommit, onAfterConnectionClose, onAfterGetConnection, onAfterResultSetClose, onAfterResultSetGet, onAfterResultSetGet, onAfterRollback, onAfterSetAutoCommit, onAfterStatementClose, onBeforeAddBatch, onBeforeAddBatch, onBeforeCommit, onBeforeExecute, onBeforeExecute, onBeforeExecuteBatch, onBeforeExecuteQuery, onBeforeExecuteQuery, onBeforeExecuteUpdate, onBeforeExecuteUpdate, onBeforeGetConnection, onBeforeResultSetNext, onBeforeRollback, onBeforeSetAutoCommit, onConnectionWrappedpublic static final DefaultEventListener INSTANCE
public void onAfterAddBatch(StatementInformation statementInformation, long timeElapsedNanos, java.lang.String sql, java.sql.SQLException e)
JdbcEventListenerStatement.addBatch(String) or
Statement.addBatch(String) method is invoked.onAfterAddBatch in class JdbcEventListenerstatementInformation - 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, java.sql.SQLException e)
JdbcEventListenerPreparedStatement.execute() methods are invoked.onAfterExecute in class JdbcEventListenerstatementInformation - 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, java.lang.String sql, java.sql.SQLException e)
JdbcEventListenerStatement.execute(String) methods are invoked.onAfterExecute in class JdbcEventListenerstatementInformation - 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, java.sql.SQLException e)
JdbcEventListenerStatement.executeBatch() method is invoked.onAfterExecuteBatch in class JdbcEventListenerstatementInformation - 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, java.sql.SQLException e)
JdbcEventListenerPreparedStatement.executeUpdate() method is invoked.onAfterExecuteUpdate in class JdbcEventListenerstatementInformation - 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, java.lang.String sql, int rowCount, java.sql.SQLException e)
JdbcEventListenerStatement.executeUpdate(String) methods are invoked.onAfterExecuteUpdate in class JdbcEventListenerstatementInformation - 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, java.sql.SQLException e)
JdbcEventListenerPreparedStatement.executeQuery() method is invoked.onAfterExecuteQuery in class JdbcEventListenerstatementInformation - 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, java.lang.String sql, java.sql.SQLException e)
JdbcEventListenerStatement.executeQuery(String) method is invoked.onAfterExecuteQuery in class JdbcEventListenerstatementInformation - 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, java.sql.SQLException e)
JdbcEventListenerStatement.getResultSet() method is invoked.onAfterGetResultSet in class JdbcEventListenerstatementInformation - 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, java.sql.SQLException e)
JdbcEventListenerResultSet.next() method is invoked.onAfterResultSetNext in class JdbcEventListenerresultSetInformation - 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, java.lang.String parameterName, java.lang.Object value, java.sql.SQLException e)
JdbcEventListenerCallableStatement.set* methods are invoked.onAfterCallableStatementSet in class JdbcEventListenerstatementInformation - 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, java.lang.Object value, java.sql.SQLException e)
JdbcEventListenerPreparedStatement.set* methods are invoked.onAfterPreparedStatementSet in class JdbcEventListenerstatementInformation - 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).