org.objectweb.carol.irmi
Class UnionClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by org.objectweb.carol.irmi.UnionClassLoader

public class UnionClassLoader
extends java.lang.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(java.lang.ClassLoader one, java.lang.ClassLoader two)
          Constructs a ClassLoader that tries to load classes from both of the given ClassLoader arguments.
 
Method Summary
static UnionClassLoader get(java.lang.ClassLoader one, java.lang.ClassLoader two)
          Instantiates a new UnionClassLoader if necessory or returns a previously instantiated one.
protected  java.lang.Class loadClass(java.lang.String name, boolean resolve)
           
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, 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(java.lang.ClassLoader one,
                        java.lang.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(java.lang.ClassLoader one,
                                   java.lang.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 java.lang.Class loadClass(java.lang.String name,
                                    boolean resolve)
                             throws java.lang.ClassNotFoundException
Overrides:
loadClass in class java.lang.ClassLoader
Throws:
java.lang.ClassNotFoundException