org.apache.axis.utils
Class JWSClassLoader

java.lang.Object
  extended byjava.lang.ClassLoader
      extended byorg.apache.axis.utils.JWSClassLoader

public class JWSClassLoader
extends java.lang.ClassLoader

Class loader for JWS files. There is one of these per JWS class, and we keep a static Hashtable of them, indexed by class name. When we want to reload a JWS, we replace the ClassLoader for that class and let the old one get GC'ed.


Constructor Summary
JWSClassLoader(java.lang.String name, java.lang.ClassLoader cl, java.lang.String classFile)
          Construct a JWSClassLoader with a class name, a parent ClassLoader, and a filename of a .class file containing the bytecode for the class.
 
Method Summary
 java.io.InputStream getResourceAsStream(java.lang.String resourceName)
          Overloaded getResourceAsStream() so we can be sure to return the correct class file regardless of where it might live on our hard drive.
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, getParent, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JWSClassLoader

public JWSClassLoader(java.lang.String name,
                      java.lang.ClassLoader cl,
                      java.lang.String classFile)
               throws java.io.FileNotFoundException,
                      java.io.IOException
Construct a JWSClassLoader with a class name, a parent ClassLoader, and a filename of a .class file containing the bytecode for the class. The constructor will load the bytecode, define the class, and register this JWSClassLoader in the static registry.

Parameters:
name - the name of the class which will be created/loaded
cl - the parent ClassLoader
classFile - filename of the .class file
Throws:
java.io.FileNotFoundException
java.io.IOException
Method Detail

getResourceAsStream

public java.io.InputStream getResourceAsStream(java.lang.String resourceName)
Overloaded getResourceAsStream() so we can be sure to return the correct class file regardless of where it might live on our hard drive.

Parameters:
resourceName - the resource to load (should be "classname.class")
Returns:
an InputStream of the class bytes, or null


Copyright © 2003 Apache Web Services Project. A ll Rights Reserved.