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

All Implemented Interfaces:
    NotificationBroadcaster, UnifiedLoaderRepository4MBean, ServerConstants, ClassLoaderRepository

Direct Known Subclasses:
    HeirarchicalLoaderRepository4

A repository of class loaders that form a flat namespace of classes and resources. This version uses UnifiedClassLoader4 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.UnifiedLoaderRepository4 Summary:
addClassLoader,   addClassLoaderURL,   addNotificationListener,   cacheLoadedClass,   displayClassInfo,   flush,   getCacheSize,   getClassIndexSize,   getClassLoader,   getClassLoaders,   getClassLoaders,   getClassLoadersSize,   getClassNamesMap,   getClasses,   getInstance,   getLoaderToClassesMap,   getNotificationInfo,   getResource,   getResources,   getURLs,   loadClass,   loadClass,   loadClassFromCache,   loadClassFromClassLoader,   loadClassWithout,   newClassLoader,   newClassLoader,   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.UnifiedLoaderRepository4 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 int getClassIndexSize() 
 public UnifiedClassLoader4 getClassLoader(String className) 
 public HashSet getClassLoaders() 
    HashSet of classloaders in the repository. Access synchronized via this.classLoaders monitor.
 public LinkedList getClassLoaders(String className) 
    Get the class loaders indexed to the given class name
 public int getClassLoadersSize() 
 public HashMap getClassNamesMap() 
 public HashMap getClasses() 
    The loaded classes cache, HashMap. Access synchronized via this.classes monitor.
 public LoaderRepository getInstance() 
 public HashMap getLoaderToClassesMap() 
 public MBeanNotificationInfo[] getNotificationInfo() 
 public URL getResource(String name,
    ClassLoader cl) 
    Loads a resource following the Unified ClassLoader architecture
 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 Class loadClass(String className) throws ClassNotFoundException 
 public Class loadClass(String name,
    boolean resolve,
    ClassLoader cl) throws ClassNotFoundException 
    Unlike other implementations of LoaderRepository, this method does nothing but ask the UnifiedClassLoader4 to load the class as UCL4 do not use this method.
 public Class loadClassFromCache(String name) 
    Lookup a Class from the repository cache.
 public Class loadClassFromClassLoader(String name,
    boolean resolve,
    UnifiedClassLoader cl) 
 public Class loadClassWithout(ClassLoader loader,
    String className) throws ClassNotFoundException 
 public UnifiedClassLoader newClassLoader(URL url,
    boolean addToRepository) throws Exception 
 public UnifiedClassLoader newClassLoader(URL url,
    URL origURL,
    boolean addToRepository) throws Exception 
 public LoaderRepository registerClassLoader(UnifiedClassLoader ucl) 
    This method provides an mbean-accessible way to add a UnifiedClassloader, and sends a notification when it is added.
 public  void removeClassLoader(ClassLoader cl) 
    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