org.jppf.classloader
Class JPPFClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.jppf.classloader.AbstractJPPFClassLoaderLifeCycle
org.jppf.classloader.AbstractJPPFClassLoader
org.jppf.classloader.JPPFClassLoader
public class JPPFClassLoader
- extends AbstractJPPFClassLoader
This class is a custom class loader serving the purpose of dynamically loading the JPPF classes and the client
application classes, to avoid costly redeployment system-wide.
- Author:
- Laurent Cohen
|
Nested Class Summary |
protected class |
JPPFClassLoader.ResourceRequest
Encapsulates a remote resource request submitted asynchronously
via the single-thread executor. |
|
Method Summary |
void |
close()
Terminate this classloader and clean the resources it uses. |
protected void |
init()
Initialize the underlying socket connection. |
protected JPPFResourceWrapper |
loadRemoteData(Map<String,Object> map,
boolean asResource)
Load the specified class from a socket connection. |
void |
reset()
Reset and reinitialize the connection ot the server. |
| Methods inherited from class java.lang.ClassLoader |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, 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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JPPFClassLoader
public JPPFClassLoader(ClassLoader parent)
- Initialize this class loader with a parent class loader.
- Parameters:
parent - a ClassLoader instance.
JPPFClassLoader
public JPPFClassLoader(ClassLoader parent,
List<String> uuidPath)
- Initialize this class loader with a parent class loader.
- Parameters:
parent - a ClassLoader instance.uuidPath - unique identifier for the submitting application.
init
protected void init()
- Initialize the underlying socket connection.
- Specified by:
init in class AbstractJPPFClassLoaderLifeCycle
reset
public void reset()
- Reset and reinitialize the connection ot the server.
- Specified by:
reset in class AbstractJPPFClassLoaderLifeCycle
close
public void close()
- Terminate this classloader and clean the resources it uses.
- Specified by:
close in class AbstractJPPFClassLoaderLifeCycle
- See Also:
AbstractJPPFClassLoaderLifeCycle.close()
loadRemoteData
protected JPPFResourceWrapper loadRemoteData(Map<String,Object> map,
boolean asResource)
throws Exception
- Load the specified class from a socket connection.
- Specified by:
loadRemoteData in class AbstractJPPFClassLoaderLifeCycle
- Parameters:
map - contains the necessary resource request data.asResource - true if the resource is loaded using getResource(), false otherwise.
- Returns:
- a
JPPFResourceWrapper containing the resource content.
- Throws:
Exception - if the connection was lost and could not be reestablished.
Copyright © 2005-2010 JPPF Team.