org.mule.module.launcher
Class MuleApplicationClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by java.security.SecureClassLoader
          extended by java.net.URLClassLoader
              extended by org.mule.module.launcher.GoodCitizenClassLoader
                  extended by org.mule.module.launcher.FineGrainedControlClassLoader
                      extended by org.mule.module.launcher.MuleApplicationClassLoader

public class MuleApplicationClassLoader
extends FineGrainedControlClassLoader


Nested Class Summary
static interface MuleApplicationClassLoader.ShutdownListener
          Optional hook, invoked synchronously right before the classloader is disposed of and closed.
 
Nested classes/interfaces inherited from class org.mule.module.launcher.GoodCitizenClassLoader
GoodCitizenClassLoader.NonCachingURLStreamHandlerFactory
 
Field Summary
protected static URL[] CLASSPATH_EMPTY
           
protected  Log logger
           
static String PATH_CLASSES
          Classes and resources directory in Mule application.
static String PATH_LIBRARY
          Library directory in Mule application.
static String PATH_MULE
          Directory for standard mule modules and transports
static String PATH_PER_APP
          Sub-directory for per-application mule modules and transports
protected  List<MuleApplicationClassLoader.ShutdownListener> shutdownListeners
           
 
Fields inherited from class org.mule.module.launcher.FineGrainedControlClassLoader
blocked, overrides, systemPackages
 
Constructor Summary
MuleApplicationClassLoader(String appName, ClassLoader parentCl)
           
MuleApplicationClassLoader(String appName, ClassLoader parentCl, Set<String> loaderOverrides)
           
 
Method Summary
 void addShutdownListener(MuleApplicationClassLoader.ShutdownListener listener)
           
 void close()
          A workaround for http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5041014
protected  Class<?> findClass(String name)
           
protected  String findLibrary(String name)
           
 String getAppName()
           
 URL getResource(String name)
           
 Enumeration<URL> getResources(String name)
           
protected  Class<?> loadClass(String name, boolean resolve)
           
 String toString()
           
 
Methods inherited from class org.mule.module.launcher.FineGrainedControlClassLoader
findParentClass, isBlocked, isOverridden, processOverrides
 
Methods inherited from class java.net.URLClassLoader
addURL, definePackage, findResource, findResources, getPermissions, getURLs, newInstance, newInstance
 
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResourceAsStream, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PATH_LIBRARY

public static final String PATH_LIBRARY
Library directory in Mule application.

See Also:
Constant Field Values

PATH_CLASSES

public static final String PATH_CLASSES
Classes and resources directory in Mule application.

See Also:
Constant Field Values

PATH_MULE

public static final String PATH_MULE
Directory for standard mule modules and transports

See Also:
Constant Field Values

PATH_PER_APP

public static final String PATH_PER_APP
Sub-directory for per-application mule modules and transports

See Also:
Constant Field Values

CLASSPATH_EMPTY

protected static final URL[] CLASSPATH_EMPTY

logger

protected final transient Log logger

shutdownListeners

protected List<MuleApplicationClassLoader.ShutdownListener> shutdownListeners
Constructor Detail

MuleApplicationClassLoader

public MuleApplicationClassLoader(String appName,
                                  ClassLoader parentCl)

MuleApplicationClassLoader

public MuleApplicationClassLoader(String appName,
                                  ClassLoader parentCl,
                                  Set<String> loaderOverrides)
Method Detail

findClass

protected Class<?> findClass(String name)
                      throws ClassNotFoundException
Overrides:
findClass in class FineGrainedControlClassLoader
Throws:
ClassNotFoundException

loadClass

protected Class<?> loadClass(String name,
                             boolean resolve)
                      throws ClassNotFoundException
Overrides:
loadClass in class FineGrainedControlClassLoader
Throws:
ClassNotFoundException

getResource

public URL getResource(String name)
Overrides:
getResource in class ClassLoader

getResources

public Enumeration<URL> getResources(String name)
                              throws IOException
Overrides:
getResources in class ClassLoader
Throws:
IOException

close

public void close()
Description copied from class: GoodCitizenClassLoader
A workaround for http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5041014

Overrides:
close in class GoodCitizenClassLoader

addShutdownListener

public void addShutdownListener(MuleApplicationClassLoader.ShutdownListener listener)

getAppName

public String getAppName()

toString

public String toString()
Overrides:
toString in class Object

findLibrary

protected String findLibrary(String name)
Overrides:
findLibrary in class ClassLoader


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.