|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.ClassLoader
org.clazzes.remoting.loading.RemotingClassLoader
public class RemotingClassLoader
This class loader allows to dynamically load classes from a
remote server.
This implementation does not take care for retrieving the compiled
class via ClassLoader.getResourceAsStream(String)
by fetching
the resource with the extension .class
.
This means that classes, which have been loaded from a remote server can not be
forwarded to another server again, because
ClassHelper.getCompiledClass(String, ClassLoader)
works by fetching the
associated .class
resource.
Implementing ClassLoader.getResourceAsStream(String)
causes major headaches
and passing a remotely loaded class to another server seems to be a risk anyways.
Constructor Summary | |
---|---|
RemotingClassLoader(java.lang.ClassLoader parent,
RemoteInvoker client)
|
Method Summary | |
---|---|
void |
destroy()
Cleanup internal resources. |
protected java.lang.Class<?> |
findClass(java.lang.String name)
|
Methods inherited from class java.lang.ClassLoader |
---|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, 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 |
---|
public RemotingClassLoader(java.lang.ClassLoader parent, RemoteInvoker client)
parent
- The parent class loader.client
- The client used to load remote classes.Method Detail |
---|
protected java.lang.Class<?> findClass(java.lang.String name) throws java.lang.ClassNotFoundException
findClass
in class java.lang.ClassLoader
java.lang.ClassNotFoundException
public void destroy()
Destroyable
Initializable
too, the general contract is,
that after calling this method, Initializable.isInitialized()
returns
false
.
destroy
in interface Destroyable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |