|
|||||||||||
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.UnifiedLoaderRepository4
org.jboss.mx.loading.HeirarchicalLoaderRepository4
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 java2ParentDelegaton flag.
Field Summary |
Fields inherited from class org.jboss.mx.loading.LoaderRepository |
instance, loaders, nativeClassBySignature, translator |
Constructor Summary | |
HeirarchicalLoaderRepository4(MBeanServer server)
|
|
HeirarchicalLoaderRepository4(MBeanServer server,
ObjectName parentName)
|
|
HeirarchicalLoaderRepository4(UnifiedLoaderRepository4 parentRepository)
|
Method Summary | |
UnifiedClassLoader4 |
getClassLoader(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.LoaderRepository |
getCachedClass, 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 HeirarchicalLoaderRepository4(MBeanServer server) throws AttributeNotFoundException, InstanceNotFoundException, MBeanException, ReflectionException
public HeirarchicalLoaderRepository4(MBeanServer server, ObjectName parentName) throws AttributeNotFoundException, InstanceNotFoundException, MBeanException, ReflectionException
public HeirarchicalLoaderRepository4(UnifiedLoaderRepository4 parentRepository)
Method Detail |
public UnifiedClassLoader newClassLoader(URL url, boolean addToRepository) throws Exception
LoaderRepository
newClassLoader
in interface UnifiedLoaderRepositoryMBean
newClassLoader
in class UnifiedLoaderRepository4
Exception
public UnifiedClassLoader newClassLoader(URL url, URL origURL, boolean addToRepository) throws Exception
LoaderRepository
newClassLoader
in interface UnifiedLoaderRepositoryMBean
newClassLoader
in class UnifiedLoaderRepository4
Exception
public 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 UnifiedLoaderRepository4
name
- The name of the classresolve
- If true
, the class will be resolvedscl
- The asking class loader
ClassNotFoundException
- If the class could not be found.public URL getResource(String name, ClassLoader scl)
getResource
in class UnifiedLoaderRepository4
name
- 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 UnifiedLoaderRepository4
name
- the resource namecl
- the requesting class loaderurls
- a list into which the located resource URLs will be placedpublic URL[] getURLs()
getURLs
in interface UnifiedLoaderRepositoryMBean
getURLs
in class UnifiedLoaderRepository4
public Class loadClassFromCache(String name)
loadClassFromCache
in class UnifiedLoaderRepository4
name
- the fully qualified class name
public UnifiedClassLoader4 getClassLoader(String name)
getClassLoader
in interface UnifiedLoaderRepository4MBean
getClassLoader
in class UnifiedLoaderRepository4
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |