|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.jppf.classloader.AbstractJPPFClassLoaderLifeCycle
org.jppf.classloader.AbstractJPPFClassLoader
public abstract class 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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.jppf.classloader.AbstractJPPFClassLoaderLifeCycle |
|---|
AbstractJPPFClassLoaderLifeCycle.AbstractResourceRequest |
| Field Summary |
|---|
| Fields inherited from class org.jppf.classloader.AbstractJPPFClassLoaderLifeCycle |
|---|
cache, dynamic, executor, INITIALIZING, LOCK, requestUuid, serializer, uuidPath |
| Constructor Summary | |
|---|---|
AbstractJPPFClassLoader(ClassLoader parent)
Initialize this class loader with a parent class loader. |
|
AbstractJPPFClassLoader(ClassLoader parent,
List<String> uuidPath)
Initialize this class loader with a parent class loader. |
|
| Method Summary | |
|---|---|
byte[] |
computeRemoteData(byte[] callable)
Request the remote computation of a JPPFCallable on the client. |
Class<?> |
findClass(String name)
Find a class in this class loader's classpath. |
protected URL[] |
findMultipleResources(String... names)
Get multiple reources, specified by their names, from the classpath. |
URL |
findResource(String name)
Finds the resource with the specified name. |
Enumeration<URL> |
findResources(String name)
Find all resources with the specified name. |
URL[] |
getMultipleResources(String... names)
Get multiple reources, specified by their names, from the classpath. |
InputStream |
getResourceAsStream(String name)
Get a stream from a resource file accessible form this class loader. |
Class<?> |
loadJPPFClass(String name)
Load a JPPF class from the server. |
| Methods inherited from class org.jppf.classloader.AbstractJPPFClassLoaderLifeCycle |
|---|
addURL, close, getSerializer, init, loadRemoteData, loadResourceData, loadResourceData0, reset, setRequestUuid |
| Methods inherited from class java.net.URLClassLoader |
|---|
definePackage, getPermissions, getURLs, newInstance, newInstance |
| Methods inherited from class java.security.SecureClassLoader |
|---|
defineClass, defineClass |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractJPPFClassLoader(ClassLoader parent)
parent - a ClassLoader instance.
public AbstractJPPFClassLoader(ClassLoader parent,
List<String> uuidPath)
parent - a ClassLoader instance.uuidPath - unique identifier for the submitting application.| Method Detail |
|---|
public Class<?> loadJPPFClass(String name)
throws ClassNotFoundException
name - the binary name of the class
ClassNotFoundException - if the class could not be found
public Class<?> findClass(String name)
throws ClassNotFoundException
findClass in class URLClassLoadername - binary name of the resource to find.
Class instance.
ClassNotFoundException - if the class could not be loaded.ClassLoader.findClass(java.lang.String)
public byte[] computeRemoteData(byte[] callable)
throws Exception
JPPFCallable on the client.
callable - the serialized callable to execute remotely.
Exception - if the connection was lost and could not be reestablished.public URL findResource(String name)
getResourceAsStream(String)
findResource in class URLClassLoadername - the name of the resource to find.
ClassLoader.findResource(java.lang.String)public InputStream getResourceAsStream(String name)
ClassLoader.getResourceAsStream(String)AbstractJPPFClassLoader,
in the classpath of the JPPF driver, such as specified by ResourceProvider.getResourceAsBytes(String, ClassLoader)AbstractJPPFClassLoader,
in the classpath of the JPPF client, such as specified by ResourceProvider.getResourceAsBytes(String, ClassLoader)
(the search may eventually be sped up by looking up the driver's resource cache first)
getResourceAsStream in class ClassLoadername - name of the resource to obtain a stream from.
InputStream instance, or null if the resource was not found.ClassLoader.getResourceAsStream(java.lang.String)
public Enumeration<URL> findResources(String name)
throws IOException
findResources in class URLClassLoadername - name of the resources to find in the clas loader's classpath.
IOException - if an error occurs.ClassLoader.findResources(java.lang.String)protected URL[] findMultipleResources(String... names)
names - the names of te resources to find.
public URL[] getMultipleResources(String... names)
names - the names of te resources to find.
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||