Package edu.rit.pj.cluster
Class BackendClassLoader
java.lang.Object
java.lang.ClassLoader
edu.rit.pj.cluster.BackendClassLoader
Class BackendClassLoader provides a class loader for a job backend process in
the PJ cluster middleware. If a backend class loader is requested to load a
class and the parent class loaders cannot do so, the backend class loader
sends a request for the class file to the job frontend process, waits for the
job frontend process to send the class file, and loads the class.
- Version:
- 15-Jun-2012
- Author:
- Alan Kaminsky
-
Constructor Summary
ConstructorDescriptionBackendClassLoader
(JobBackendRef theJobBackend, JobFrontendRef theJobFrontend, ResourceCache theCache) Construct a new backend class loader.BackendClassLoader
(ClassLoader parent, JobBackendRef theJobBackend, JobFrontendRef theJobFrontend, ResourceCache theCache) Construct a new backend class loader. -
Method Summary
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Constructor Details
-
BackendClassLoader
public BackendClassLoader(JobBackendRef theJobBackend, JobFrontendRef theJobFrontend, ResourceCache theCache) Construct a new backend class loader. The parent class loader is the one returned byClassLoader.getSystemClassLoader()
. Class files will be requested fromtheJobFrontend
. Class files will be stored intheCache
.- Parameters:
theJobBackend
- Reference to job backend.theJobFrontend
- Reference to job frontend.theCache
- Resource cache.
-
BackendClassLoader
public BackendClassLoader(ClassLoader parent, JobBackendRef theJobBackend, JobFrontendRef theJobFrontend, ResourceCache theCache) Construct a new backend class loader. The parent class loader isparent
. Class files will be requested fromtheJobFrontend
. Class files will be stored intheCache
.- Parameters:
parent
- Parent class loader.theJobBackend
- Reference to job backend.theJobFrontend
- Reference to job frontend.theCache
- Resource cache.
-
-
Method Details
-
findClass
Find the class with the given name.- Overrides:
findClass
in classClassLoader
- Throws:
ClassNotFoundException
- Thrown if the class could not be found.
-
findResource
Find the resource with the given name.- Overrides:
findResource
in classClassLoader
-