|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.jboss.mx.loading.RepositoryClassLoader
A RepositoryClassLoader.
Field Summary | |
protected ReentrantLock |
loadLock
Lock |
protected java.lang.ClassLoader |
parent
The parent classloader |
protected LoaderRepository (src) |
repository
Reference to the repository. |
protected java.lang.Exception |
unregisterTrace
The location where unregister is called from |
Constructor Summary | |
protected |
RepositoryClassLoader(java.net.URL[] urls,
java.lang.ClassLoader parent)
Create a new LoaderRepositoryClassLoader |
Method Summary | |
protected void |
acquire()
Acquire the class loading lock. |
void |
addToClassBlackList(java.lang.String name)
Black list a class |
void |
addToResourceBlackList(java.lang.String name)
Black list a resource |
void |
addURL(java.net.URL url)
Append the given url to the URLs used for class and resource loading |
protected boolean |
attempt(long waitMS)
Attempt to acquire the class loading lock. |
void |
clearBlackLists()
Clear all blacklists |
void |
clearClassBlackList()
Clear any class black list. |
void |
clearResourceBlackList()
Clear any resource blacklist. |
protected void |
definePackage(java.lang.String className)
Define the package for the class if not already done |
boolean |
equals(java.lang.Object other)
This is here to document that this must delegate to the super implementation to perform identity based equality. |
protected java.lang.Class |
findClass(java.lang.String name)
Called by loadClassLocally to find the requested class within this class loaders class path. |
protected java.lang.Class |
findClassLocally(java.lang.String name)
Find the class |
java.util.Enumeration |
findResources(java.lang.String name)
Find all resource URLs for the given name. |
java.util.Enumeration |
findResourcesLocally(java.lang.String name)
Provides the same functionality as URLClassLoader.findResources(java.lang.String) . |
int |
getAddedOrder()
Get the order this classloader was added to the repository |
java.net.URL[] |
getAllURLs()
Return all library URLs associated with this RepositoryClassLoader |
java.net.URL[] |
getClasspath()
This method simply invokes the super.getURLs() method to access the list of URLs that make up the RepositoryClassLoader classpath. |
LoaderRepository (src) |
getLoaderRepository()
Get the loader repository for this classloader |
abstract ObjectName (src) |
getObjectName()
Get the ObjectName |
java.lang.Package |
getPackage(java.lang.String name)
|
java.lang.Package[] |
getPackages()
|
protected java.security.ProtectionDomain |
getProtectionDomain(java.net.URL codesourceUrl)
Determine the protection domain. |
java.net.URL |
getResource(java.lang.String name)
Attempts to load the resource from its URL and if not found forwards to the request to LoaderRepository (src) . |
java.net.URL |
getResourceLocally(java.lang.String name)
Provides the same functionality as ClassLoader.getResource(java.lang.String) . |
java.net.URL |
getURL()
Get the URL associated with the UCL. |
java.net.URL[] |
getURLs()
Return an empty URL array to force the RMI marshalling subsystem to use the java.server.codebase property as the annotated codebase. |
int |
hashCode()
This is here to document that this must delegate to the super implementation to perform identity based hashing. |
boolean |
isClassBlackListed(java.lang.String name)
Is the class black listed? |
boolean |
isResourceBlackListed(java.lang.String name)
Is the resource black listed? |
protected byte[] |
loadByteCode(java.lang.String classname)
Obtain the bytecode for the indicated class from this class loaders classpath. |
protected byte[] |
loadByteCode(java.net.URL classURL)
Obtain the bytecode for the indicated class from this class loaders classpath. |
java.lang.Class |
loadClass(java.lang.String name,
boolean resolve)
The only caller of this method should be the VM initiated loadClassInternal() method. |
java.lang.Class |
loadClassBefore(java.lang.String name)
The only caller of this method should be the VM initiated loadClassInternal() method. |
java.lang.Class |
loadClassImpl(java.lang.String name,
boolean resolve,
int stopAt)
|
java.lang.Class |
loadClassLocally(java.lang.String name,
boolean resolve)
Called to attempt to load a class from the set of URLs associated with this classloader. |
protected void |
release()
Release the class loading lock previous acquired through the acquire method. |
void |
removeFromClassBlackList(java.lang.String name)
Remove class from black list |
void |
removeFromResourceBlackList(java.lang.String name)
Remove resource from black list |
void |
setAddedOrder(int addedOrder)
Set the order this classloader was added to the repository |
void |
setRepository(LoaderRepository (src) repository)
Set the loader repository |
java.lang.String |
toString()
Returns a string representation. |
void |
unregister()
|
Methods inherited from class java.net.URLClassLoader |
definePackage, findResource, getPermissions, newInstance, newInstance |
Methods inherited from class java.security.SecureClassLoader |
defineClass |
Methods inherited from class java.lang.ClassLoader |
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getParent, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected LoaderRepository (src) repository
protected java.lang.Exception unregisterTrace
protected java.lang.ClassLoader parent
protected ReentrantLock loadLock
Constructor Detail |
protected RepositoryClassLoader(java.net.URL[] urls, java.lang.ClassLoader parent)
urls
- the urlsparent
- the parent classloaderMethod Detail |
public abstract ObjectName (src) getObjectName() throws MalformedObjectNameException (src)
MalformedObjectNameException (src)
public LoaderRepository (src) getLoaderRepository()
public void setRepository(LoaderRepository (src) repository)
repository
- the repositorypublic int getAddedOrder()
public void setAddedOrder(int addedOrder)
addedOrder
- the added orderpublic java.lang.Class loadClassLocally(java.lang.String name, boolean resolve) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public java.net.URL getResourceLocally(java.lang.String name)
ClassLoader.getResource(java.lang.String)
.
public java.net.URL getURL()
public void unregister()
public java.net.URL[] getClasspath()
public java.net.URL[] getAllURLs()
Do not remove this method without running the WebIntegrationTestSuite
public void addToClassBlackList(java.lang.String name)
name
- the name of the classpublic void removeFromClassBlackList(java.lang.String name)
name
- the name of the classpublic boolean isClassBlackListed(java.lang.String name)
name
- the name of the class
public void clearClassBlackList()
public void addToResourceBlackList(java.lang.String name)
name
- the name of the resourcepublic void removeFromResourceBlackList(java.lang.String name)
name
- the name of the resourcepublic boolean isResourceBlackListed(java.lang.String name)
name
- the name of the resource
public void clearResourceBlackList()
public void clearBlackLists()
public java.lang.Class loadClass(java.lang.String name, boolean resolve) throws java.lang.ClassNotFoundException
Forwards request to LoaderRepository
(src) .
java.lang.ClassNotFoundException
public java.lang.Class loadClassBefore(java.lang.String name) throws java.lang.ClassNotFoundException
Forwards request to LoaderRepository
(src) .
java.lang.ClassNotFoundException
public java.lang.Class loadClassImpl(java.lang.String name, boolean resolve, int stopAt) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public java.net.URL getResource(java.lang.String name)
LoaderRepository
(src) .
public java.util.Enumeration findResources(java.lang.String name) throws java.io.IOException
name
- the name of the resource
java.io.IOException
public java.util.Enumeration findResourcesLocally(java.lang.String name) throws java.io.IOException
URLClassLoader.findResources(java.lang.String)
.
java.io.IOException
protected java.lang.Class findClass(java.lang.String name) throws java.lang.ClassNotFoundException
name
- the name of the class
java.lang.ClassNotFoundException
- if the class could not be foundprotected java.lang.Class findClassLocally(java.lang.String name) throws java.lang.ClassNotFoundException
name
- the name of the class
java.lang.ClassNotFoundException
protected void definePackage(java.lang.String className)
className
- the class namepublic void addURL(java.net.URL url)
url
- the URL to load frompublic java.net.URL[] getURLs()
Do not remove this method without discussing it on the dev list.
public java.lang.Package getPackage(java.lang.String name)
public java.lang.Package[] getPackages()
public final boolean equals(java.lang.Object other)
public final int hashCode()
public java.lang.String toString()
protected boolean attempt(long waitMS)
loadClass(String, boolean)
protected void acquire()
loadClass(String, boolean)
protected void release()
protected byte[] loadByteCode(java.lang.String classname) throws java.lang.ClassNotFoundException, java.io.IOException
classname
-
java.lang.ClassNotFoundException
- - if the class resource could not
be found
java.io.IOException
protected byte[] loadByteCode(java.net.URL classURL) throws java.lang.ClassNotFoundException, java.io.IOException
classURL
-
java.lang.ClassNotFoundException
- - if the class resource could not
be found
java.io.IOException
protected java.security.ProtectionDomain getProtectionDomain(java.net.URL codesourceUrl)
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |