| org.jboss.mx.loading.RepositoryClassLoader org.jboss.mx.loading.UnifiedClassLoader
All known Subclasses: org.jboss.mx.loading.UnifiedClassLoader3,
UnifiedClassLoader | public class UnifiedClassLoader extends RepositoryClassLoader implements UnifiedClassLoaderMBean,Translatable(Code) | | 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.
author: Marc Fleury author: Christoph G. Jung author: Scott Stark author: Juha Lindfors author: Bill Burke version: $Revision: 57200 $ |
Field Summary | |
protected URL | origURL An optional URL from which url may have been copied. | protected URL | url |
Constructor Summary | |
public | UnifiedClassLoader(URL url) Construct a UnifiedClassLoader without registering it to the
classloader repository. | public | UnifiedClassLoader(URL url, URL origURL) Construct a UnifiedClassLoader without registering it to the
classloader repository. | public | UnifiedClassLoader(URL url, URL origURL, ClassLoader parent) Construct a UnifiedClassLoader without registering with the
classloader repository. | public | UnifiedClassLoader(URL url, LoaderRepository repository) Construct a UnifiedClassLoader and registers it to the given
repository. | public | UnifiedClassLoader(URL url, URL origURL, LoaderRepository repository) Construct a UnifiedClassLoader and registers it to the given
repository. | public | UnifiedClassLoader(URL url, MBeanServer server, ObjectName repositoryName) UnifiedClassLoader constructor that can be used to
register with a particular Loader Repository identified by ObjectName. | public | 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. |
origURL | protected URL origURL(Code) | | An optional URL from which url may have been copied. It is used to
allow the security permissions to be based on a static url namespace.
|
url | protected URL url(Code) | | One URL per ClassLoader in our case
|
UnifiedClassLoader | public UnifiedClassLoader(URL url)(Code) | | Construct a UnifiedClassLoader without registering it to the
classloader repository.
Parameters: url - the single URL to load classes from. |
UnifiedClassLoader | public UnifiedClassLoader(URL url, URL origURL)(Code) | | Construct a UnifiedClassLoader without registering it to the
classloader repository.
Parameters: url - the single URL to load classes from. Parameters: origURL - the possibly null original URL from which url maybe a local copy or nested jar. |
UnifiedClassLoader | public UnifiedClassLoader(URL url, URL origURL, ClassLoader parent)(Code) | | Construct a UnifiedClassLoader without registering with the
classloader repository.
Parameters: url - the single URL to load classes from. Parameters: origURL - the possibly null original URL from which url maybe a local copy or nested jar. Parameters: parent - the parent class loader to use |
UnifiedClassLoader | public UnifiedClassLoader(URL url, LoaderRepository repository)(Code) | | Construct a UnifiedClassLoader and registers it to the given
repository.
Parameters: url - The single URL to load classes from. Parameters: repository - the repository this classloader delegates to |
UnifiedClassLoader | public UnifiedClassLoader(URL url, URL origURL, LoaderRepository repository)(Code) | | Construct a UnifiedClassLoader and registers it to the given
repository.
Parameters: url - The single URL to load classes from. Parameters: origURL - the possibly null original URL from which url maybe a local copy or nested jar. Parameters: repository - the repository this classloader delegates tobe a local copy or nested jar. |
UnifiedClassLoader | public UnifiedClassLoader(URL url, MBeanServer server, ObjectName repositoryName) throws Exception(Code) | | UnifiedClassLoader constructor that can be used to
register with a particular Loader Repository identified by ObjectName.
Parameters: url - an URL value Parameters: server - a MBeanServer value Parameters: repositoryName - an ObjectName value exception: Exception - if an error occurs |
UnifiedClassLoader | public UnifiedClassLoader(URL url, URL origURL, MBeanServer server, ObjectName repositoryName) throws Exception(Code) | | UnifiedClassLoader constructor that can be used to
register with a particular Loader Repository identified by ObjectName.
Parameters: url - an URL value Parameters: origURL - the possibly null original URL from which url maybe a local copy or nested jar. Parameters: server - a MBeanServer value Parameters: repositoryName - an ObjectName value exception: Exception - if an error occurs |
getObjectName | public ObjectName getObjectName() throws MalformedObjectNameException(Code) | | Obtain the ObjectName under which the UCL can be registered with the
JMX server. This creates a name of the form "jmx.loading:UCL=hashCode"
since we don't currently care that UCL be easily queriable.
|
getOrigURL | public URL getOrigURL()(Code) | | Get the original URL associated with the UCL. This may be null.
|
getPermissions | protected PermissionCollection getPermissions(CodeSource cs)(Code) | | Override the permissions accessor to use the CodeSource
based on the original URL if one exists. This allows the
security policy to be defined in terms of the static URL
namespace rather than the local copy or nested URL.
This builds a PermissionCollection from:
1. The origURL CodeSource
2. The argument CodeSource
3. The Policy.getPermission(origURL CodeSource)
This is necessary because we cannot define the CodeSource the
SecureClassLoader uses to register the class under.
Parameters: cs - the location and signatures of the codebase. |
getProtectionDomain | protected ProtectionDomain getProtectionDomain()(Code) | | Determine the protection domain. If we are a copy of the original
deployment, use the original url as the codebase.
the protection domain |
getURL | public URL getURL()(Code) | | Get the URL associated with the UCL.
|
unregister | public void unregister()(Code) | | |
|
|