站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 3.2.7 jmx API Documentation 英文版文档

HeirarchicalLoaderRepository2 (JBoss/JMX API) - JBoss 3.2.7 jmx API Documentation 英文版文档


org.jboss.mx.loading
Class HeirarchicalLoaderRepository2

java.lang.Object
  extended byorg.jboss.mx.loading.LoaderRepository
      extended byorg.jboss.mx.loading.UnifiedLoaderRepository2
          extended byorg.jboss.mx.loading.HeirarchicalLoaderRepository2
All Implemented Interfaces:
ClassLoaderRepository, NotificationBroadcaster, ServerConstants, UnifiedLoaderRepository2MBean, UnifiedLoaderRepositoryMBean

public class HeirarchicalLoaderRepository2
extends UnifiedLoaderRepository2

A simple extension of UnifiedLoaderRepository2 that adds the notion of a parent UnifiedLoaderRepository. Classes and resources are loaded from child first and then the parent.

Version:
$Revision: 1.2.4.4 $
Author:
Scott Stark.

Field Summary
 
Fields inherited from class org.jboss.mx.loading.UnifiedLoaderRepository2
repositoryLock
 
Fields inherited from class org.jboss.mx.loading.LoaderRepository
instance, loaders, nativeClassBySignature, translator
 
Fields inherited from interface org.jboss.mx.server.ServerConstants
CLASS_REMOVED, CLASSLOADER, CLASSLOADER_ADDED, CLASSLOADER_REMOVED, DEFAULT_DOMAIN, DEFAULT_LOADER_REPOSITORY_CLASS, DEFAULT_MBEAN_REGISTRY_CLASS, DEFAULT_MBEAN_SERVER_BUILDER_CLASS, DEFAULT_REQUIRED_MODELMBEAN_CLASS, DEFAULT_SCOPED_REPOSITORY_CLASS, DEFAULT_SCOPED_REPOSITORY_PARSER_CLASS, IMPLEMENTATION_NAME, IMPLEMENTATION_VENDOR, IMPLEMENTATION_VERSION, JMI_DOMAIN, LOADER_REPOSITORY_CLASS_PROPERTY, MBEAN_REGISTRY, MBEAN_REGISTRY_CLASS_PROPERTY, MBEAN_SERVER_BUILDER_CLASS_PROPERTY, MBEAN_SERVER_CONFIGURATION, MBEAN_SERVER_DELEGATE, OPTIMIZE_REFLECTED_DISPATCHER, REQUIRED_MODELMBEAN_CLASS_PROPERTY, SPECIFICATION_NAME, SPECIFICATION_VENDOR, SPECIFICATION_VERSION, UNIFIED_LOADER_REPOSITORY_CLASS
 
Constructor Summary
HeirarchicalLoaderRepository2(MBeanServer server)
           
HeirarchicalLoaderRepository2(MBeanServer server, ObjectName parentName)
           
 
Method Summary
 URL getResource(String name, ClassLoader scl)
          Find a resource from this repository.
 URL[] getURLs()
          Obtain a listing of the URL for all UnifiedClassLoaders associated with the ServiceLibraries
 Class loadClass(String name, boolean resolve, ClassLoader scl)
          Add a class to this repository.
 
Methods inherited from class org.jboss.mx.loading.UnifiedLoaderRepository2
acquire, addClassLoader, addClassLoaderURL, addNotificationListener, attempt, findClass, getInstance, getNotificationInfo, getResources, loadClass, loadClassWithout, newClassLoader, newClassLoader, registerClassLoader, release, removeClassLoader, removeNotificationListener
 
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

HeirarchicalLoaderRepository2

public HeirarchicalLoaderRepository2(MBeanServer server)
                              throws AttributeNotFoundException,
                                     InstanceNotFoundException,
                                     MBeanException,
                                     ReflectionException

HeirarchicalLoaderRepository2

public HeirarchicalLoaderRepository2(MBeanServer server,
                                     ObjectName parentName)
                              throws AttributeNotFoundException,
                                     InstanceNotFoundException,
                                     MBeanException,
                                     ReflectionException
Method Detail

loadClass

public Class loadClass(String name,
                       boolean resolve,
                       ClassLoader scl)
                throws ClassNotFoundException
Add a class to this repository. Allows a class to be added in byte code form stored inside this repository.

Overrides:
loadClass in class UnifiedLoaderRepository2
Parameters:
name - The name of the class
resolve - If true, the class will be resolved
scl - The asking class loader
Returns:
The loaded class
Throws:
ClassNotFoundException - If the class could not be found.

getResource

public URL getResource(String name,
                       ClassLoader scl)
Find a resource from this repository.

Overrides:
getResource in class UnifiedLoaderRepository2
Parameters:
name - The name of the resource
scl - The asking class loader
Returns:
An URL for reading the resource, or null if the resource could not be found.

getURLs

public URL[] getURLs()
Obtain a listing of the URL for all UnifiedClassLoaders associated with the ServiceLibraries

Specified by:
getURLs in interface UnifiedLoaderRepositoryMBean
Overrides:
getURLs in class UnifiedLoaderRepository2


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.