org.logicalcobwebs.proxool
Class ProxyDatabaseMetaData
java.lang.Object
org.logicalcobwebs.proxool.AbstractDatabaseMetaData
org.logicalcobwebs.proxool.ProxyDatabaseMetaData
- All Implemented Interfaces:
- Callback, InvocationHandler, MethodInterceptor
- class ProxyDatabaseMetaData
- extends AbstractDatabaseMetaData
- implements MethodInterceptor, InvocationHandler
Delegates to a normal Coonection for everything but the close()
method (when it puts itself back into the pool instead).
- Version:
- $Revision: 1.6 $, $Date: 2003/12/12 19:29:47 $
- Author:
- billhorsman, $Author: billhorsman $ (current maintainer)
Method Summary |
java.lang.Object |
intercept(java.lang.Object obj,
java.lang.reflect.Method method,
java.lang.Object[] args,
MethodProxy proxy)
All generated proxied methods call this method instead of the original method. |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LOG
private static final Log LOG
GET_CONNECTION_METHOD
private static final java.lang.String GET_CONNECTION_METHOD
- See Also:
- Constant Field Values
EQUALS_METHOD
private static final java.lang.String EQUALS_METHOD
- See Also:
- Constant Field Values
FINALIZE_METHOD
private static final java.lang.String FINALIZE_METHOD
- See Also:
- Constant Field Values
ProxyDatabaseMetaData
public ProxyDatabaseMetaData(java.sql.Connection connection,
ProxyConnectionIF proxyConnection)
throws java.sql.SQLException
intercept
public java.lang.Object intercept(java.lang.Object obj,
java.lang.reflect.Method method,
java.lang.Object[] args,
MethodProxy proxy)
throws java.lang.Throwable
- Description copied from interface:
MethodInterceptor
- All generated proxied methods call this method instead of the original method.
The original method may either be invoked by normal reflection using the Method object,
or by using the MethodProxy (faster).
- Specified by:
intercept
in interface MethodInterceptor
- Parameters:
obj
- "this", the enhanced objectmethod
- intercepted Methodargs
- argument array; primitive types are wrappedproxy
- used to invoke super (non-intercepted method); may be called
as many times as needed
- Returns:
- any value compatible with the signature of the proxied method. Method returning void will ignore this value.
- Throws:
java.lang.Throwable
- any exception may be thrown; if so, super method will not be invoked- See Also:
MethodProxy
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 InvocationHandler
- Throws:
java.lang.Throwable
- See Also:
java.lang.reflect.InvocationHandler#invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object)