ca.uhn.cache.proxy
Class CachingInvocationHandler

java.lang.Object
  extended byca.uhn.cache.proxy.CachingInvocationHandler
All Implemented Interfaces:
java.lang.reflect.InvocationHandler

public class CachingInvocationHandler
extends java.lang.Object
implements java.lang.reflect.InvocationHandler

InvocationHandler used to make a Proxy cache the results of method calls. INCOMPLETE AND UNTESTED. This is a draft implementation. We don't need it right now, so we'll come back to it as needed.

Version:
$Revision: 1.1 $ updated on $Date: 2005/01/24 22:53:24 $ by $Author: bryan_tripp $
Author:
Bryan Tripp

Constructor Summary
CachingInvocationHandler(java.lang.Object theTarget, IMethodAdapter[] theAdapters, ISemanticCache theCache)
           
 
Method Summary
 java.lang.Object invoke(java.lang.Object theProxy, java.lang.reflect.Method theMethod, java.lang.Object[] theArgs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingInvocationHandler

public CachingInvocationHandler(java.lang.Object theTarget,
                                IMethodAdapter[] theAdapters,
                                ISemanticCache theCache)
Parameters:
theTarget - an object that has a query method that we want to cache results of
theAdapters - an adapter corresponding to each cached method
theCache - the cache
Method Detail

invoke

public java.lang.Object invoke(java.lang.Object theProxy,
                               java.lang.reflect.Method theMethod,
                               java.lang.Object[] theArgs)
                        throws java.lang.Throwable
Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Throws:
java.lang.Throwable
See Also:
InvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])


Copyright © 2004-2005 University Health Network. All Rights Reserved.