| java.lang.Object org.jboss.mx.loading.LoaderRepository org.jboss.mx.loading.UnifiedLoaderRepository3 org.jboss.mx.loading.HeirarchicalLoaderRepository3
HeirarchicalLoaderRepository3 | public class HeirarchicalLoaderRepository3 extends UnifiedLoaderRepository3 (Code) | | A simple extension of UnifiedLoaderRepository3 that adds the notion of a
parent UnifiedLoaderRepository. Classes and resources are loaded from child
first and then the parent depending on the java2ParentDelegation flag.
author: Scott.Stark@jboss.org version: $Revision: 57200 $ |
Inner Class :static class NoParentClassLoader extends ClassLoader | |
getCachedClass | public Class getCachedClass(String classname)(Code) | | Override getCachedClass to return the parent repository cached class
if java2ParentDelegation=true, followed by this repository's cached
value. Else, if java2ParentDelegation=false, only check this repository's
cache to attempt to load the class from the child repository before
going to the parent cache.
Parameters: classname - the cached class if found, null otherwise |
getPackageClassLoaders | public Set getPackageClassLoaders(String name)(Code) | | Called by LoadMgr to obtain all class loaders. This returns a set of
PkgClassLoader with the HeirarchicalLoaderRepository3 ordered ahead of
the parent repository pkg class loaders
Set |
getResource | public URL getResource(String name, ClassLoader scl)(Code) | | Find a resource from this repository. This first looks to this
repository and then the parent repository.
Parameters: name - The name of the resource Parameters: scl - The asking class loader An URL for reading the resource, or null if theresource could not be found. |
getResources | public void getResources(String name, ClassLoader cl, List urls)(Code) | | Find all resource URLs for the given name. This is entails an
exhuastive search of this and the parent repository and is an expensive
operation.
Parameters: name - the resource name Parameters: cl - the requesting class loader Parameters: urls - a list into which the located resource URLs will be placed |
getURLs | public URL[] getURLs()(Code) | | Obtain a listing of the URLs for all UnifiedClassLoaders associated with
the repository
|
getUseParentFirst | public boolean getUseParentFirst()(Code) | | Get the use parent first flag. This indicates whether the parent
repository is consulted first for resource and class loading or if the
HeirchicalLoaderRepository is consulted first.
true if the parent repository is consulted first, false if theHeirchicalLoaderRepository is consulted first. |
loadClass | public Class loadClass(String name, boolean resolve, ClassLoader scl) throws ClassNotFoundException(Code) | | Load a class using the repository class loaders.
Parameters: name - The name of the class Parameters: resolve - an obsolete unused parameter from ClassLoader.loadClass Parameters: scl - The asking class loader The loaded class throws: ClassNotFoundException - If the class could not be found. |
loadClassFromCache | public Class loadClassFromCache(String name)(Code) | | Called by LoadMgr to locate a previously loaded class. This looks
first to this repository and then the parent repository.
the cached class if found, null otherwise |
setUseParentFirst | public void setUseParentFirst(boolean flag)(Code) | | Set the use parent first flag. This indicates whether the parent
repository is consulted first for resource and class loading or if the
HeirchicalLoaderRepository is consulted first.
Parameters: flag - true if the parent repository is consulted first, false if theHeirchicalLoaderRepository is consulted first. |
Methods inherited from org.jboss.mx.loading.UnifiedLoaderRepository3 | public void addClassLoader(ClassLoader loader)(Code)(Java Doc) public boolean addClassLoaderURL(ClassLoader cl, URL url)(Code)(Java Doc) public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException(Code)(Java Doc) public void cacheLoadedClass(String name, Class cls, ClassLoader cl)(Code)(Java Doc) public String displayClassInfo(String className)(Code)(Java Doc) public void flush()(Code)(Java Doc) public int getCacheSize()(Code)(Java Doc) public Class getCachedClass(String classname)(Code)(Java Doc) public int getClassLoadersSize()(Code)(Java Doc) public LoaderRepository getInstance()(Code)(Java Doc) public MBeanNotificationInfo[] getNotificationInfo()(Code)(Java Doc) public Set getPackageClassLoaders(String className)(Code)(Java Doc) public URL getResource(String name, ClassLoader cl)(Code)(Java Doc) protected URL getResourceFromGlobalCache(String name)(Code)(Java Doc) protected URL getResourceFromRepository(String name, ClassLoader cl)(Code)(Java Doc) public void getResources(String name, ClassLoader cl, List urls)(Code)(Java Doc) public URL[] getURLs()(Code)(Java Doc) public RepositoryClassLoader getWrappingClassLoader(ClassLoader cl)(Code)(Java Doc) public Class loadClass(String name, boolean resolve, ClassLoader cl) throws ClassNotFoundException(Code)(Java Doc) public Class loadClass(String className) throws ClassNotFoundException(Code)(Java Doc) public Class loadClassBefore(ClassLoader stop, String className) throws ClassNotFoundException(Code)(Java Doc) public Class loadClassFromCache(String name)(Code)(Java Doc) Class loadClassFromClassLoader(String name, boolean resolve, RepositoryClassLoader cl)(Code)(Java Doc) public Class loadClassWithout(ClassLoader loader, String className) throws ClassNotFoundException(Code)(Java Doc) public RepositoryClassLoader newClassLoader(URL url, boolean addToRepository) throws Exception(Code)(Java Doc) public RepositoryClassLoader newClassLoader(URL url, URL origURL, boolean addToRepository) throws Exception(Code)(Java Doc) public void postDeregister()(Code)(Java Doc) public void postRegister(Boolean registrationDone)(Code)(Java Doc) public void preDeregister() throws Exception(Code)(Java Doc) public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception(Code)(Java Doc) public LoaderRepository registerClassLoader(RepositoryClassLoader ucl)(Code)(Java Doc) public void removeClassLoader(ClassLoader loader)(Code)(Java Doc) public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException(Code)(Java Doc) public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException(Code)(Java Doc)
|
Methods inherited from org.jboss.mx.loading.LoaderRepository | abstract public void addClassLoader(ClassLoader cl)(Code)(Java Doc) abstract public boolean addClassLoaderURL(ClassLoader cl, URL url)(Code)(Java Doc) void cacheLoadedClass(String name, Class cls, ClassLoader cl)(Code)(Java Doc) void clear()(Code)(Java Doc) public int compare(LoaderRepository lr)(Code)(Java Doc) public Class getCachedClass(String classname)(Code)(Java Doc) public Vector getLoaders()(Code)(Java Doc) final public static Class getNativeClassForName(String className)(Code)(Java Doc) abstract public URL getResource(String name, ClassLoader cl)(Code)(Java Doc) abstract public void getResources(String name, ClassLoader cl, List urls)(Code)(Java Doc) public Translator getTranslator()(Code)(Java Doc) public URL[] getURLs()(Code)(Java Doc) abstract public Class loadClass(String className) throws ClassNotFoundException(Code)(Java Doc) abstract public Class loadClass(String name, boolean resolve, ClassLoader cl) throws ClassNotFoundException(Code)(Java Doc) abstract public Class loadClassBefore(ClassLoader stop, String className) throws ClassNotFoundException(Code)(Java Doc) abstract public Class loadClassWithout(ClassLoader loader, String className) throws ClassNotFoundException(Code)(Java Doc) abstract public RepositoryClassLoader newClassLoader(URL url, boolean addToRepository) throws Exception(Code)(Java Doc) abstract public RepositoryClassLoader newClassLoader(URL url, URL origURL, boolean addToRepository) throws Exception(Code)(Java Doc) abstract public void removeClassLoader(ClassLoader cl)(Code)(Java Doc) protected int reverseCompare(LoaderRepository lr)(Code)(Java Doc) public void setTranslator(Translator t)(Code)(Java Doc)
|
|
|