org.schmant.tpm
Class IsolatedTaskPackageClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by org.entityfs.util.lang.EntityClassLoader
          extended by org.schmant.tpm.TaskPackageClassLoader
              extended by org.schmant.tpm.IsolatedTaskPackageClassLoader

public class IsolatedTaskPackageClassLoader
extends TaskPackageClassLoader

This is the TaskPackageClassLoader for the isolated class loader strategy. It gives each task package its own class loader.

Since:
0.5
Author:
Karl Gustafsson

Constructor Summary
IsolatedTaskPackageClassLoader(ClassLoader parent)
          Create the class loader.
 
Method Summary
 void addClasspath(String packageName, List<? extends EntityView> l)
          Add a list of packages to the class loader for a task package.
 void close()
          Close this class loader and release all of its resources.
protected  Class<?> findClass(String name)
           
 
Methods inherited from class org.entityfs.util.lang.EntityClassLoader
addToClasspath, defineClass, definePackage, finalize, findFileInClasspath, getClassOrNull, getClasspath, getLogAdapter, getPackage, getPackages, getResourceAsStream, isDebugLoggingEnabled, isFinerLoggingEnabled, isTraceLoggingEnabled
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getParent, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IsolatedTaskPackageClassLoader

public IsolatedTaskPackageClassLoader(ClassLoader parent)
Create the class loader.

Parameters:
parent - The parent class loader.
Method Detail

close

public void close()
Close this class loader and release all of its resources. This is called when exiting the program.

Overrides:
close in class EntityClassLoader

findClass

protected Class<?> findClass(String name)
                      throws ClassNotFoundException
Overrides:
findClass in class EntityClassLoader
Throws:
ClassNotFoundException

addClasspath

public void addClasspath(String packageName,
                         List<? extends EntityView> l)
Description copied from class: TaskPackageClassLoader
Add a list of packages to the class loader for a task package.

The implementation of this method should be synchronized.

Specified by:
addClasspath in class TaskPackageClassLoader
Parameters:
packageName - The package name.
l - The classpath. All Jar files in the class path must be FCRandomAccess:ible.