|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jboss.mx.loading.LoaderRepository
org.jboss.mx.loading.UnifiedLoaderRepository3
org.jboss.mx.loading.HeirarchicalLoaderRepository3
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.
| Field Summary |
| Fields inherited from class org.jboss.mx.loading.UnifiedLoaderRepository3 |
loaderToResourcesMap |
| Fields inherited from class org.jboss.mx.loading.LoaderRepository |
instance, loaders, nativeClassBySignature, translator |
| Constructor Summary | |
HeirarchicalLoaderRepository3(MBeanServer server)
Create a HeirarchicalLoaderRepository3 with a parent obtained by querying the server for the ServerConstants.DEFAULT_LOADER_NAME mbean. |
|
HeirarchicalLoaderRepository3(MBeanServer server,
ObjectName parentName)
Create a HeirarchicalLoaderRepository3 with a parent obtained by querying the server for the parentName mbean. |
|
HeirarchicalLoaderRepository3(UnifiedLoaderRepository3 parent)
Create a HeirarchicalLoaderRepository3 with an explicit parent. |
|
| Method Summary | |
Class |
getCachedClass(String classname)
Override getCachedClass to return the parent repository cached class if java2ParentDelegation=true, followed by this repository's cached value. |
HashSet |
getPackageClassLoaders(String name)
Called by LoadMgr to obtain all class loaders. |
URL |
getResource(String name,
ClassLoader scl)
Find a resource from this repository. |
void |
getResources(String name,
ClassLoader cl,
List urls)
Find all resource URLs for the given name. |
URL[] |
getURLs()
Obtain a listing of the URLs for all UnifiedClassLoaders associated with the repository |
boolean |
getUseParentFirst()
Get the use parent first flag. |
Class |
loadClass(String name,
boolean resolve,
ClassLoader scl)
Load a class using the repository class loaders. |
Class |
loadClassFromCache(String name)
Called by LoadMgr to locate a previously loaded class. |
UnifiedClassLoader |
newClassLoader(URL url,
boolean addToRepository)
Create UnifiedClassLoader and optionally add it to the repository |
UnifiedClassLoader |
newClassLoader(URL url,
URL origURL,
boolean addToRepository)
Create UnifiedClassLoader and optionally add it to the repository |
void |
setUseParentFirst(boolean flag)
Set the use parent first flag. |
| Methods inherited from class org.jboss.mx.loading.UnifiedLoaderRepository3 |
addClassLoader, addClassLoaderURL, addNotificationListener, cacheLoadedClass, displayClassInfo, flush, getCacheSize, getClassLoadersSize, getInstance, getNotificationInfo, getResourceFromGlobalCache, getResourceFromRepository, loadClass, loadClassWithout, postDeregister, postRegister, preDeregister, preRegister, registerClassLoader, removeClassLoader, removeNotificationListener |
| Methods inherited from class org.jboss.mx.loading.LoaderRepository |
getDefaultLoaderRepository, getLoaders, getNativeClassForName, getTranslator, loadClassBefore, setTranslator |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jboss.mx.loading.UnifiedLoaderRepositoryMBean |
getTranslator, setTranslator |
| Constructor Detail |
public HeirarchicalLoaderRepository3(UnifiedLoaderRepository3 parent) throws AttributeNotFoundException, InstanceNotFoundException, MBeanException, ReflectionException
parent -
AttributeNotFoundException
InstanceNotFoundException
MBeanException
ReflectionExceptionpublic HeirarchicalLoaderRepository3(MBeanServer server) throws AttributeNotFoundException, InstanceNotFoundException, MBeanException, ReflectionException
server -
AttributeNotFoundException
InstanceNotFoundException
MBeanException
ReflectionExceptionpublic HeirarchicalLoaderRepository3(MBeanServer server, ObjectName parentName) throws AttributeNotFoundException, InstanceNotFoundException, MBeanException, ReflectionException
server - parentName -
AttributeNotFoundException
InstanceNotFoundException
MBeanException
ReflectionException| Method Detail |
public UnifiedClassLoader newClassLoader(URL url, boolean addToRepository) throws Exception
LoaderRepository
newClassLoader in interface UnifiedLoaderRepositoryMBeannewClassLoader in class UnifiedLoaderRepository3Exceptionpublic UnifiedClassLoader newClassLoader(URL url, URL origURL, boolean addToRepository) throws Exception
LoaderRepository
newClassLoader in interface UnifiedLoaderRepositoryMBeannewClassLoader in class UnifiedLoaderRepository3Exceptionpublic boolean getUseParentFirst()
public void setUseParentFirst(boolean flag)
flag - true if the parent repository is consulted first, false if the
HeirchicalLoaderRepository is consulted first.public Class loadClass(String name, boolean resolve, ClassLoader scl) throws ClassNotFoundException
loadClass in class UnifiedLoaderRepository3name - The name of the classresolve - an obsolete unused parameter from ClassLoader.loadClassscl - The asking class loader
ClassNotFoundException - If the class could not be found.public Class getCachedClass(String classname)
getCachedClass in class UnifiedLoaderRepository3classname -
public URL getResource(String name, ClassLoader scl)
getResource in class UnifiedLoaderRepository3name - The name of the resourcescl - The asking class loader
null if the
resource could not be found.public void getResources(String name, ClassLoader cl, List urls)
getResources in class UnifiedLoaderRepository3name - the resource namecl - the requesting class loaderurls - a list into which the located resource URLs will be placedpublic URL[] getURLs()
getURLs in interface UnifiedLoaderRepositoryMBeangetURLs in class UnifiedLoaderRepository3public Class loadClassFromCache(String name)
loadClassFromCache in class UnifiedLoaderRepository3name - the fully qualified class name
public HashSet getPackageClassLoaders(String name)
getPackageClassLoaders in interface UnifiedLoaderRepository3MBeangetPackageClassLoaders in class UnifiedLoaderRepository3
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||