de.is24.util.monitoring.database
Class MonitoringDataSource.SqlLoggingInvocationHandler
java.lang.Object
de.is24.util.monitoring.database.MonitoringDataSource.SqlLoggingInvocationHandler
- All Implemented Interfaces:
- InvocationHandler
- Enclosing class:
- MonitoringDataSource
private static class MonitoringDataSource.SqlLoggingInvocationHandler
- extends Object
- implements InvocationHandler
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
wrappedObject
private final Object wrappedObject
preparedSql
private final String preparedSql
loggingFilters
final Set<com.google.common.base.Predicate<SQLException>> loggingFilters
MonitoringDataSource.SqlLoggingInvocationHandler
public MonitoringDataSource.SqlLoggingInvocationHandler(Set<com.google.common.base.Predicate<SQLException>> loggingFilters,
Object wrappedObject,
String preparedSql)
invoke
public Object invoke(Object proxy,
Method method,
Object[] arguments)
throws Throwable
- Specified by:
invoke in interface InvocationHandler
- Throws:
Throwable
logExecutedSqlIfApplicable
private void logExecutedSqlIfApplicable(Method method,
Object[] arguments,
InvocationTargetException iTE)
anExecuteMethodIsCalled
private boolean anExecuteMethodIsCalled(Method method)
determineExecutedSql
private String determineExecutedSql(Object[] arguments)
logExecutedSqlAtTheAppropriateLevel
private void logExecutedSqlAtTheAppropriateLevel(InvocationTargetException iTE,
String sql)
determineLogLevel
private org.apache.log4j.Level determineLogLevel(InvocationTargetException iTE)
Copyright © 2013 Immobilien Scout GmbH. All Rights Reserved.