org.shiftone.ooc.log
Class LogInvocationHandler
java.lang.Object
org.shiftone.ooc.log.LogInvocationHandler
- All Implemented Interfaces:
- java.lang.reflect.InvocationHandler
- public class LogInvocationHandler
- extends java.lang.Object
- implements java.lang.reflect.InvocationHandler
- Version:
- $Revision: 1.2 $
- Author:
- $Author: jeffdrost $
Constructor Summary |
LogInvocationHandler(java.lang.Object target,
java.lang.Class iface,
boolean infect)
|
Method Summary |
java.lang.Object |
doInvoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
handle invocations of the jdbc object, and forward them to the target object, logging along the way. |
static java.lang.Object |
getTracedProxy(java.lang.Object target,
java.lang.Class iface,
boolean infect)
Method getTracedProxy |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
|
static java.lang.Object |
safeGetTracedProxy(java.lang.Object target,
java.lang.Class iface,
boolean infect)
Method safeGetTracedProxy |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LogInvocationHandler
public LogInvocationHandler(java.lang.Object target,
java.lang.Class iface,
boolean infect)
invoke
public java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
- Specified by:
invoke
in interface java.lang.reflect.InvocationHandler
- Throws:
java.lang.Throwable
doInvoke
public java.lang.Object doInvoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
- handle invocations of the jdbc object, and forward them to the target object, logging along the way.
- Throws:
java.lang.Throwable
safeGetTracedProxy
public static java.lang.Object safeGetTracedProxy(java.lang.Object target,
java.lang.Class iface,
boolean infect)
- Method safeGetTracedProxy
- Parameters:
target
- .iface
- .
- Returns:
- .
getTracedProxy
public static java.lang.Object getTracedProxy(java.lang.Object target,
java.lang.Class iface,
boolean infect)
- Method getTracedProxy