|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.ClassLoader java.security.SecureClassLoader java.net.URLClassLoader com.stellent.cis.common.classloader.IsolatedJarClassLoader
public class IsolatedJarClassLoader
Loads classes based on nested libraries within the jar file.
Nested Class Summary | |
---|---|
static class |
IsolatedJarClassLoader.TemporaryFileManager
|
Field Summary | |
---|---|
protected java.lang.String[] |
m_delegateFilters
|
protected java.util.jar.JarFile |
m_jarFile
|
protected java.net.URL |
m_jarUrl
|
protected java.lang.String |
m_libDirectory
|
protected java.io.File |
m_localLibFolder
|
protected java.util.List |
m_urls
|
Constructor Summary | |
---|---|
IsolatedJarClassLoader(java.net.URL jarUrl,
java.lang.ClassLoader delegate,
java.lang.String[] delegateFilters)
Build the classloader. |
Method Summary | |
---|---|
protected java.io.File |
createLocalLibraryFolder()
Determine the location of the local folder we will use to store our custom classpath |
protected java.net.URL |
extractJar(java.util.jar.JarEntry jarEntry)
Extract the jar entry from the main jar file to the local lib directory |
java.io.File |
getLocalLibraryFolder()
|
java.net.URL |
getResource(java.lang.String name)
Searches locally first, then parent |
protected void |
initialize()
Initialize the system; get URLs to all contained jar files... |
protected java.lang.Class |
loadClass(java.lang.String name,
boolean resolve)
Loads the class with the specified name. |
Methods inherited from class java.net.URLClassLoader |
---|
addURL, definePackage, findClass, findResource, findResources, getPermissions, getURLs, newInstance, newInstance |
Methods inherited from class java.security.SecureClassLoader |
---|
defineClass, defineClass |
Methods inherited from class java.lang.ClassLoader |
---|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String[] m_delegateFilters
protected java.net.URL m_jarUrl
protected java.util.jar.JarFile m_jarFile
protected java.util.List m_urls
protected java.lang.String m_libDirectory
protected java.io.File m_localLibFolder
Constructor Detail |
---|
public IsolatedJarClassLoader(java.net.URL jarUrl, java.lang.ClassLoader delegate, java.lang.String[] delegateFilters) throws java.io.IOException
getLocalLibraryFolder()
directory.
jarUrl
- url pointing to a jar filedelegate
- classloader that will be delegated to for non-nested classesdelegateFilter
- classes starting with the filter will be passed to the delegate loader first
java.io.IOException
Method Detail |
---|
public java.io.File getLocalLibraryFolder()
protected java.lang.Class loadClass(java.lang.String name, boolean resolve) throws java.lang.ClassNotFoundException
loadClass
in class java.lang.ClassLoader
java.lang.ClassNotFoundException
- If the class could not be foundpublic java.net.URL getResource(java.lang.String name)
getResource
in class java.lang.ClassLoader
protected java.io.File createLocalLibraryFolder() throws java.io.IOException
java.io.IOException
protected void initialize() throws java.io.IOException
java.io.IOException
protected java.net.URL extractJar(java.util.jar.JarEntry jarEntry) throws java.io.IOException
jarEntry
- the jar entry to extract
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |