|
|||||||||||
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 org.jboss.mx.loading.RepositoryClassLoader org.jboss.mx.loading.UnifiedClassLoader
A ClassLoader which loads classes from a single URL in conjunction with
the LoaderRepository
. 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 URL |
origURL
An optional URL from which url may have been copied. |
protected URL |
url
One URL per ClassLoader in our case |
Fields inherited from class org.jboss.mx.loading.RepositoryClassLoader |
loadLock, parent, repository |
Constructor Summary | |
UnifiedClassLoader(URL url)
Construct a UnifiedClassLoader without registering it to the classloader repository. |
|
UnifiedClassLoader(URL url,
LoaderRepository repository)
Construct a UnifiedClassLoader and registers it to the given repository. |
|
UnifiedClassLoader(URL url,
MBeanServer server,
ObjectName repositoryName)
UnifiedClassLoader constructor that can be used to register with a particular Loader Repository identified by ObjectName. |
|
UnifiedClassLoader(URL url,
URL origURL)
Construct a UnifiedClassLoader without registering it to the classloader repository. |
|
UnifiedClassLoader(URL url,
URL origURL,
ClassLoader parent)
Construct a UnifiedClassLoader without registering with the classloader repository. |
|
UnifiedClassLoader(URL url,
URL origURL,
LoaderRepository repository)
Construct a UnifiedClassLoader and registers it to the given repository. |
|
UnifiedClassLoader(URL url,
URL origURL,
MBeanServer server,
ObjectName repositoryName)
UnifiedClassLoader constructor that can be used to register with a particular Loader Repository identified by ObjectName. |
Method Summary | |
ObjectName |
getObjectName()
Obtain the ObjectName under which the UCL can be registered with the JMX server. |
URL |
getOrigURL()
Get the original URL associated with the UCL. |
protected PermissionCollection |
getPermissions(CodeSource cs)
Override the permissions accessor to use the CodeSource based on the original URL if one exists. |
protected ProtectionDomain |
getProtectionDomain()
Determine the protection domain. |
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.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jboss.util.loading.Translatable |
getResourceLocally |
Field Detail |
protected URL url
protected URL origURL
Constructor Detail |
public UnifiedClassLoader(URL url)
url
- the single URL to load classes from.public UnifiedClassLoader(URL url, 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(URL url, URL origURL, 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(URL url, LoaderRepository repository)
url
- The single URL to load classes from.repository
- the repository this classloader delegates topublic UnifiedClassLoader(URL url, URL origURL, LoaderRepository 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(URL url, MBeanServer server, ObjectName repositoryName) throws Exception
url
- an URL
valueserver
- a MBeanServer
valuerepositoryName
- an ObjectName
value
Exception
- if an error occurspublic UnifiedClassLoader(URL url, URL origURL, MBeanServer server, ObjectName repositoryName) throws 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
Exception
- if an error occursMethod Detail |
public ObjectName getObjectName() throws MalformedObjectNameException
getObjectName
in class RepositoryClassLoader
MalformedObjectNameException
public void unregister()
unregister
in class RepositoryClassLoader
public URL getURL()
getURL
in class RepositoryClassLoader
public URL getOrigURL()
protected PermissionCollection getPermissions(CodeSource cs)
cs
- the location and signatures of the codebase.protected ProtectionDomain getProtectionDomain()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |