triptracker.testing.compress
Class DBDebugProxy

java.lang.Object
  extended by triptracker.testing.compress.DebugProxy
      extended by triptracker.testing.compress.DBDebugProxy
All Implemented Interfaces:
InvocationHandler

public class DBDebugProxy
extends DebugProxy

Proxy class for logging database

Author:
Jan Magne Tjensvold <janmagne at broadpark dot no>

Field Summary
 
Fields inherited from class triptracker.testing.compress.DebugProxy
debugEnabled, history, methods, obj
 
Constructor Summary
protected DBDebugProxy(Statement obj)
          Creates an object of the super proxy class.
 
Method Summary
 Object invoke(Object proxy, Method method, Object[] args)
          Captures all calls to the SQL query methods in order to print their arguments to stdout.
static Statement proxyFor(Statement obj)
           
 
Methods inherited from class triptracker.testing.compress.DebugProxy
clearHistory, getHistory, isDebugEnabled, proxyFor, setDebugEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBDebugProxy

protected DBDebugProxy(Statement obj)
Creates an object of the super proxy class.

Parameters:
obj - points to the object to create a proxy for.
Method Detail

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Captures all calls to the SQL query methods in order to print their arguments to stdout.

Specified by:
invoke in interface InvocationHandler
Overrides:
invoke in class DebugProxy
Parameters:
proxy - is a reference to the proxy object.
method - points to a method object describing the method being called.
args - is the arguments for the method call.
Returns:
the actual return value from the method call.
Throws:
Throwable
See Also:
InvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])

proxyFor

public static Statement proxyFor(Statement obj)


Copyright © 2006 Team Trip Tracker. All Rights Reserved.