biz.hammurapi.util
Class CompositeProxyFactory

java.lang.Object
  extended by biz.hammurapi.util.CompositeProxyFactory

public class CompositeProxyFactory
extends java.lang.Object

Creates a proxy which combines several classes and sequentially searches for matching method to invoke. This allows to implement lazy instantiation for situations where you have part of object data in cheaply accessible storage (cache or DB) and the other part in expensively accessible storage (e.g. XML file shall be parsed to access all object data).

Version:
$Revision: 1.1 $
Author:
Pavel Vlasov

Nested Class Summary
static interface CompositeProxyFactory.TargetFactory
           
 
Constructor Summary
CompositeProxyFactory()
          Creates factory which uses default classloader.
CompositeProxyFactory(java.lang.ClassLoader classLoader)
          Creates factory whith specified classloader which will be passed to createProxy(ClassLoader, Class[], TargetFactory[])
 
Method Summary
 java.lang.Object createProxy(java.lang.Class[] interfaces, CompositeProxyFactory.TargetFactory[] targetFactories)
           
static java.lang.Object createProxy(java.lang.ClassLoader classLoader, java.lang.Class[] interfaces, CompositeProxyFactory.TargetFactory[] targetFactories)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeProxyFactory

public CompositeProxyFactory()
Creates factory which uses default classloader.


CompositeProxyFactory

public CompositeProxyFactory(java.lang.ClassLoader classLoader)
Creates factory whith specified classloader which will be passed to createProxy(ClassLoader, Class[], TargetFactory[])

Method Detail

createProxy

public static java.lang.Object createProxy(java.lang.ClassLoader classLoader,
                                           java.lang.Class[] interfaces,
                                           CompositeProxyFactory.TargetFactory[] targetFactories)

createProxy

public java.lang.Object createProxy(java.lang.Class[] interfaces,
                                    CompositeProxyFactory.TargetFactory[] targetFactories)


Copyright © 2003 Hammurapi Group. All Rights Reserved.