de.netseeker.ejoe
Class EJClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by de.netseeker.ejoe.EJClassLoader
All Implemented Interfaces:
java.io.Serializable

public class EJClassLoader
extends java.lang.ClassLoader
implements java.io.Serializable

A remote classloader using an EJClient instance (shared per EJServer) to retrieve class definitions from an EJServer. The last thousand retrieved classes are cached global over all instances of EJClassLoader. The used cache uses soft references.

Since:
0.3.0
Author:
netseeker aka Michael Manske
See Also:
Serialized Form

Constructor Summary
EJClassLoader(java.lang.ClassLoader parent, java.lang.String host, int port)
          Creates a new instance of this classloader using the EJOE server on the given host and port for loading unknown class definitions.
EJClassLoader(java.lang.String host, int port)
          Creates a new instance of this classloader using the EJOE server on the given host and port for loading unknown class definitions.
 
Method Summary
 java.lang.Class loadClass(java.lang.String name)
           
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, 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

EJClassLoader

public EJClassLoader(java.lang.String host,
                     int port)
Creates a new instance of this classloader using the EJOE server on the given host and port for loading unknown class definitions.

Parameters:
host - ip address or dns name where the EJOE classloader server is running
port - port to which the EJOE classloader serve is listening

EJClassLoader

public EJClassLoader(java.lang.ClassLoader parent,
                     java.lang.String host,
                     int port)
Creates a new instance of this classloader using the EJOE server on the given host and port for loading unknown class definitions. The classloader will delegate calls first to the given parent classloader.

Parameters:
parent - parent classloader
host - ip address or dns name where the EJOE classloader server is running
port - port to which the EJOE classloader serve is listening
Method Detail

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

loadClass

public java.lang.Class loadClass(java.lang.String name)
                          throws java.lang.ClassNotFoundException
Overrides:
loadClass in class java.lang.ClassLoader
Throws:
java.lang.ClassNotFoundException


Copyright © 2005-2007 netseeker. All Rights Reserved.