Save This Page
Home » jboss-5.0.0.CR1-src » org.jboss.mx » loading » [javadoc | source]
org.jboss.mx.loading
public class: UnifiedLoaderRepository3 [javadoc | source]
java.lang.Object
   org.jboss.mx.loading.LoaderRepository
      org.jboss.mx.loading.UnifiedLoaderRepository3

All Implemented Interfaces:
    NotificationBroadcaster, UnifiedLoaderRepository3MBean, MBeanRegistration, ServerConstants, ClassLoaderRepository

Direct Known Subclasses:
    HeirarchicalLoaderRepository3

A repository of class loaders that form a flat namespace of classes and resources. This version uses UnifiedClassLoader3 instances. Class and resource loading is synchronized by the acquiring the monitor to the associated repository structure monitor. See the variable javadoc comments for what monitor is used to access a given structure.
Fields inherited from org.jboss.mx.loading.LoaderRepository:
loaders,  instance,  translator
Method from org.jboss.mx.loading.UnifiedLoaderRepository3 Summary:
addClassLoader,   addClassLoaderURL,   addNotificationListener,   cacheLoadedClass,   displayClassInfo,   flush,   getCacheSize,   getCachedClass,   getClassLoadersSize,   getInstance,   getNotificationInfo,   getPackageClassLoaders,   getResource,   getResourceFromGlobalCache,   getResourceFromRepository,   getResources,   getURLs,   getWrappingClassLoader,   loadClass,   loadClass,   loadClassBefore,   loadClassFromCache,   loadClassFromClassLoader,   loadClassWithout,   newClassLoader,   newClassLoader,   postDeregister,   postRegister,   preDeregister,   preRegister,   registerClassLoader,   removeClassLoader,   removeNotificationListener
Methods from org.jboss.mx.loading.LoaderRepository:
addClassLoader,   addClassLoaderURL,   cacheLoadedClass,   clear,   compare,   getCachedClass,   getLoaders,   getNativeClassForName,   getResource,   getResources,   getTranslator,   getURLs,   loadClass,   loadClass,   loadClassBefore,   loadClassWithout,   newClassLoader,   newClassLoader,   removeClassLoader,   reverseCompare,   setTranslator
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.mx.loading.UnifiedLoaderRepository3 Detail:
 public  void addClassLoader(ClassLoader loader) 
    Add a class loader to the repository.
 public boolean addClassLoaderURL(ClassLoader cl,
    URL url) 
 public  void addNotificationListener(NotificationListener listener,
    NotificationFilter filter,
    Object handback) throws IllegalArgumentException 
    addNotificationListener delegates to the broadcaster object we hold.
 public  void cacheLoadedClass(String name,
    Class cls,
    ClassLoader cl) 
    Add a Class to the repository cache.
 public String displayClassInfo(String className) 
    A utility method that iterates over all repository class loaders and display the class information for every UCL that contains the given className
 public  void flush() 
 public int getCacheSize() 
 public Class getCachedClass(String classname) 
 public int getClassLoadersSize() 
 public LoaderRepository getInstance() 
 public MBeanNotificationInfo[] getNotificationInfo() 
 public Set getPackageClassLoaders(String className) 
    Called by LoadMgr to obtain all class loaders for the given className
 public URL getResource(String name,
    ClassLoader cl) 
    Loads a resource following the Unified ClassLoader architecture
 protected URL getResourceFromGlobalCache(String name) 
    Check for a resource in the global cache Synchronizes access to globalResources using the loaderToResourcesMap monitor
 protected URL getResourceFromRepository(String name,
    ClassLoader cl) 
 public  void getResources(String name,
    ClassLoader cl,
    List urls) 
    Find all resource URLs for the given name. This is entails an exhuastive search of the repository and is an expensive operation.
 public URL[] getURLs() 
    This is a utility method a listing of the URL for all UnifiedClassLoaders associated with the repository. It is never called in response to class or resource loading.
 public RepositoryClassLoader getWrappingClassLoader(ClassLoader cl) 
    Get any wrapping classloader for the passed classloader
 public Class loadClass(String className) throws ClassNotFoundException 
    First tries to load from any UCL in the ULR, and if the class is not found, next tries the current thread context class loader.
 public Class loadClass(String name,
    boolean resolve,
    ClassLoader cl) throws ClassNotFoundException 
    Unlike other implementations of LoaderRepository, this method does nothing but ask the UnifiedClassLoader3 to load the class as UCL3s do not use this method.
 public Class loadClassBefore(ClassLoader stop,
    String className) throws ClassNotFoundException 
    Loads a class from the repository, using the classloaders that were registered before the given classloader.
 public Class loadClassFromCache(String name) 
    Lookup a Class from the repository cache.
 Class loadClassFromClassLoader(String name,
    boolean resolve,
    RepositoryClassLoader cl) 
 public Class loadClassWithout(ClassLoader loader,
    String className) throws ClassNotFoundException 
    Loads a class from the repository, excluding the given classloader.
 public RepositoryClassLoader newClassLoader(URL url,
    boolean addToRepository) throws Exception 
 public RepositoryClassLoader newClassLoader(URL url,
    URL origURL,
    boolean addToRepository) throws Exception 
 public  void postDeregister() 
 public  void postRegister(Boolean registrationDone) 
 public  void preDeregister() throws Exception 
 public ObjectName preRegister(MBeanServer server,
    ObjectName name) throws Exception 
 public LoaderRepository registerClassLoader(RepositoryClassLoader ucl) 
    This method provides an mbean-accessible way to add a UnifiedClassloader, and sends a notification when it is added.
 public  void removeClassLoader(ClassLoader loader) 
    Remove the class loader from the repository. This synchronizes on the this.classLoaders
 public  void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException 
    removeNotificationListener delegates to our broadcaster object