|
||||||||||
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 (src)
org.jboss.mx.loading.UnifiedClassLoader
A ClassLoader which loads classes from a single URL in conjunction with
the LoaderRepository
(src) . Notice that this classloader does
not work independently of the repository. A repository reference
must be provided via the constructor or the classloader must be explicitly
registered to the repository before any attempt to load a class.
At this point this is little more than an abstract class maintained as the
interface for class loaders as the algorithm of the UnifiedLoaderRepository
fails with deadlocks, and several other class loading exceptions in multi-
threaded environments.
Field Summary | |
protected java.net.URL |
origURL
An optional URL from which url may have been copied. |
protected java.net.URL |
url
One URL per ClassLoader in our case |
Fields inherited from class org.jboss.mx.loading.RepositoryClassLoader (src) |
loadLock, parent, repository, unregisterTrace |
Constructor Summary | |
UnifiedClassLoader(java.net.URL url)
Construct a UnifiedClassLoader without registering it to the classloader repository. |
|
UnifiedClassLoader(java.net.URL url,
LoaderRepository (src) repository)
Construct a UnifiedClassLoader and registers it to the given repository. |
|
UnifiedClassLoader(java.net.URL url,
MBeanServer (src) server,
ObjectName (src) repositoryName)
UnifiedClassLoader constructor that can be used to register with a particular Loader Repository identified by ObjectName. |
|
UnifiedClassLoader(java.net.URL url,
java.net.URL origURL)
Construct a UnifiedClassLoader without registering it to the classloader repository. |
|
UnifiedClassLoader(java.net.URL url,
java.net.URL origURL,
java.lang.ClassLoader parent)
Construct a UnifiedClassLoader without registering with the classloader repository. |
|
UnifiedClassLoader(java.net.URL url,
java.net.URL origURL,
LoaderRepository (src) repository)
Construct a UnifiedClassLoader and registers it to the given repository. |
|
UnifiedClassLoader(java.net.URL url,
java.net.URL origURL,
MBeanServer (src) server,
ObjectName (src) repositoryName)
UnifiedClassLoader constructor that can be used to register with a particular Loader Repository identified by ObjectName. |
Method Summary | |
ObjectName (src) |
getObjectName()
Obtain the ObjectName under which the UCL can be registered with the JMX server. |
java.net.URL |
getOrigURL()
Get the original URL associated with the UCL. |
protected java.security.PermissionCollection |
getPermissions(java.security.CodeSource cs)
Override the permissions accessor to use the CodeSource based on the original URL if one exists. |
protected java.security.ProtectionDomain |
getProtectionDomain()
Determine the protection domain. |
java.net.URL |
getURL()
Get the URL associated with the UCL. |
void |
unregister()
|
Methods inherited from class java.net.URLClassLoader |
definePackage, findResource, 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 |
Methods inherited from interface org.jboss.util.loading.Translatable (src) |
getResourceLocally |
Field Detail |
protected java.net.URL url
protected java.net.URL origURL
Constructor Detail |
public UnifiedClassLoader(java.net.URL url)
url
- the single URL to load classes from.public UnifiedClassLoader(java.net.URL url, java.net.URL origURL)
url
- the single URL to load classes from.origURL
- the possibly null original URL from which url may
be a local copy or nested jar.public UnifiedClassLoader(java.net.URL url, java.net.URL origURL, java.lang.ClassLoader parent)
url
- the single URL to load classes from.origURL
- the possibly null original URL from which url may
be a local copy or nested jar.parent
- the parent class loader to usepublic UnifiedClassLoader(java.net.URL url, LoaderRepository (src) repository)
url
- The single URL to load classes from.repository
- the repository this classloader delegates topublic UnifiedClassLoader(java.net.URL url, java.net.URL origURL, LoaderRepository (src) repository)
url
- The single URL to load classes from.origURL
- the possibly null original URL from which url may
be a local copy or nested jar.repository
- the repository this classloader delegates to
be a local copy or nested jar.public UnifiedClassLoader(java.net.URL url, MBeanServer (src) server, ObjectName (src) repositoryName) throws java.lang.Exception
url
- an URL
valueserver
- a MBeanServer
valuerepositoryName
- an ObjectName
value
java.lang.Exception
- if an error occurspublic UnifiedClassLoader(java.net.URL url, java.net.URL origURL, MBeanServer (src) server, ObjectName (src) repositoryName) throws java.lang.Exception
url
- an URL
valueorigURL
- the possibly null original URL from which url may
be a local copy or nested jar.server
- a MBeanServer
valuerepositoryName
- an ObjectName
value
java.lang.Exception
- if an error occursMethod Detail |
public ObjectName (src) getObjectName() throws MalformedObjectNameException (src)
getObjectName
in class RepositoryClassLoader (src)
MalformedObjectNameException (src)
public void unregister()
unregister
in class RepositoryClassLoader (src)
public java.net.URL getURL()
getURL
in class RepositoryClassLoader (src)
public java.net.URL getOrigURL()
protected java.security.PermissionCollection getPermissions(java.security.CodeSource cs)
cs
- the location and signatures of the codebase.protected java.security.ProtectionDomain getProtectionDomain()
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |