org.jboss.remoting.loading
Class ClassByteClassLoader

java.lang.Object
  extended byjava.lang.ClassLoader
      extended byorg.jboss.remoting.loading.ClassByteClassLoader

public class ClassByteClassLoader
extends ClassLoader

ClassByteClassLoader is a classloader that will allow dynamic adding of classes from a remote machine to be added and visible locally.

Version:
$Revision: 1.8 $
Author:
Jeff Haynie, Tom Elrod

Constructor Summary
ClassByteClassLoader()
           
ClassByteClassLoader(ClassLoader parent)
           
 
Method Summary
 Class addClass(ClassBytes classBytes)
           
 void destroy()
          Will disconnect loader client if is present.
protected  void finalize()
           
protected  Class findClass(String name)
          Finds the specified class.
 InputStream getResourceAsStream(String name)
           
 Class loadClass(String className, ClassBytes[] bytes)
           
 void setClientInvoker(Client loaderClient)
           
 String toString()
           
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassByteClassLoader

public ClassByteClassLoader()

ClassByteClassLoader

public ClassByteClassLoader(ClassLoader parent)
Method Detail

setClientInvoker

public void setClientInvoker(Client loaderClient)

destroy

public void destroy()
Will disconnect loader client if is present.


toString

public String toString()

finalize

protected void finalize()
                 throws Throwable
Throws:
Throwable

loadClass

public Class loadClass(String className,
                       ClassBytes[] bytes)
                throws ClassNotFoundException,
                       IOException
Throws:
ClassNotFoundException
IOException

getResourceAsStream

public InputStream getResourceAsStream(String name)

addClass

public Class addClass(ClassBytes classBytes)
               throws IOException
Throws:
IOException

findClass

protected Class findClass(String name)
                   throws ClassNotFoundException
Finds the specified class. This method should be overridden by class loader implementations that follow the new delegation model for loading classes, and will be called by the loadClass method after checking the parent class loader for the requested class. The default implementation throws ClassNotFoundException.

Parameters:
name - the name of the class
Returns:
the resulting Class object
Throws:
ClassNotFoundException - if the class could not be found
Since:
1.2


Copyright © 2004 JBoss Inc. All Rights Reserved.