org.objectweb.carol.irmi
Class UnionClassLoader

java.lang.Object
  extended byjava.lang.ClassLoader
      extended byorg.objectweb.carol.irmi.UnionClassLoader

public class UnionClassLoader
extends ClassLoader

UnionClassLoader is a utility class used by the RMI Server as the context class loader during deserialization in order to find classes accessible from both the remote object's class loader and the context class loader at the time the remote object was exported.

Author:
Rafael H. Schloming <rhs@mit.edu>

Constructor Summary
UnionClassLoader(ClassLoader one, ClassLoader two)
          Constructs a ClassLoader that tries to load classes from both of the given ClassLoader arguments.
 
Method Summary
static UnionClassLoader get(ClassLoader one, ClassLoader two)
          Instantiates a new UnionClassLoader if necessory or returns a previously instantiated one.
protected  Class loadClass(String name, boolean resolve)
           
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnionClassLoader

public UnionClassLoader(ClassLoader one,
                        ClassLoader two)
Constructs a ClassLoader that tries to load classes from both of the given ClassLoader arguments.

Parameters:
one - the first ClassLoader to check
two - the second ClassLoader to check
Method Detail

get

public static UnionClassLoader get(ClassLoader one,
                                   ClassLoader two)
Instantiates a new UnionClassLoader if necessory or returns a previously instantiated one.

Parameters:
one - the first ClassLoader to load from
two - the second ClassLoader to load from

loadClass

protected Class loadClass(String name,
                          boolean resolve)
                   throws ClassNotFoundException
Throws:
ClassNotFoundException