bitronix.tm.resource.jdbc
Class BaseProxyHandlerClass
java.lang.Object
bitronix.tm.resource.jdbc.BaseProxyHandlerClass
- All Implemented Interfaces:
- java.lang.reflect.InvocationHandler
- Direct Known Subclasses:
- JdbcCallableStatementHandle, JdbcConnectionHandle, JdbcPreparedStatementHandle, JdbcResultSetHandle, JdbcStatementHandle, JdbcUncachedPreparedStatementHandle, LrcConnectionHandle, LrcXAConnection
public abstract class BaseProxyHandlerClass
- extends java.lang.Object
- implements java.lang.reflect.InvocationHandler
Base class for Proxy InvocationHandlers. Maintains a method cache
for swift delegation to either the overridden methods (implemented
in a sub-class of this class) or the underlying delegate class'
methods. Makes proxying an interface almost completely painless.
- Author:
- brettw
|
Method Summary |
abstract java.lang.Object |
getProxiedDelegate()
Must be implemented by the sub-class of this class. |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
Implementation of the InvocationHandler interface. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BaseProxyHandlerClass
public BaseProxyHandlerClass()
invoke
public java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
- Implementation of the InvocationHandler interface.
- Specified by:
invoke in interface java.lang.reflect.InvocationHandler
- Throws:
java.lang.Throwable- See Also:
InvocationHandler
getProxiedDelegate
public abstract java.lang.Object getProxiedDelegate()
throws java.lang.Exception
- Must be implemented by the sub-class of this class. This method
should return the "true" object to be delegated to in the case
that the method is not overridden by the sub-class.
- Returns:
- the true delegate object
- Throws:
java.lang.Exception - can throw any exception if desired
Copyright © 2006-2018 Bitronix Software. All Rights Reserved.