org.mule.module.launcher.artifact
Class AbstractArtifactClassLoader

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.artifact.AbstractArtifactClassLoader
All Implemented Interfaces:
ArtifactClassLoader, DisposableClassLoader, LocalResourceLocator
Direct Known Subclasses:
MuleApplicationClassLoader, MuleSharedDomainClassLoader

public abstract class AbstractArtifactClassLoader
extends FineGrainedControlClassLoader
implements ArtifactClassLoader

Abstract implementation of the ArtifactClassLoader interface, that manages shutdown listeners.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.mule.module.launcher.GoodCitizenClassLoader
GoodCitizenClassLoader.NonCachingURLStreamHandlerFactory
 
Field Summary
protected  org.apache.commons.logging.Log logger
           
protected  List<ShutdownListener> shutdownListeners
           
 
Fields inherited from class org.mule.module.launcher.FineGrainedControlClassLoader
appName, blocked, overrides, systemPackages
 
Constructor Summary
AbstractArtifactClassLoader(URL[] urls, ClassLoader parent)
           
AbstractArtifactClassLoader(URL[] urls, ClassLoader parent, Set<String> overrides)
           
 
Method Summary
 void addShutdownListener(ShutdownListener listener)
          Adds a shutdown listener to the class loader.
 void dispose()
          A workaround for http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5041014
 URL findLocalResource(String resourceName)
          This method finds a resource in the local environment for this artifact, if the resource is not found and the artifact has a parent artifact then the operation is resolved by that parent, if there is no parent, the resources is searched in the global environment.
protected abstract  String[] getLocalResourceLocations()
           
 
Methods inherited from class org.mule.module.launcher.FineGrainedControlClassLoader
findClass, findParentClass, isBlocked, isOverridden, loadClass, 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, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mule.module.launcher.artifact.ArtifactClassLoader
findResource, getArtifactName, getClassLoader
 

Field Detail

logger

protected org.apache.commons.logging.Log logger

shutdownListeners

protected List<ShutdownListener> shutdownListeners
Constructor Detail

AbstractArtifactClassLoader

public AbstractArtifactClassLoader(URL[] urls,
                                   ClassLoader parent)

AbstractArtifactClassLoader

public AbstractArtifactClassLoader(URL[] urls,
                                   ClassLoader parent,
                                   Set<String> overrides)
Method Detail

addShutdownListener

public void addShutdownListener(ShutdownListener listener)
Description copied from interface: ArtifactClassLoader
Adds a shutdown listener to the class loader. This listener will be invoked synchronously right before the class loader is disposed and closed.

Specified by:
addShutdownListener in interface ArtifactClassLoader

dispose

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

Specified by:
dispose in interface DisposableClassLoader
Overrides:
dispose in class GoodCitizenClassLoader

findLocalResource

public URL findLocalResource(String resourceName)
Description copied from interface: LocalResourceLocator
This method finds a resource in the local environment for this artifact, if the resource is not found and the artifact has a parent artifact then the operation is resolved by that parent, if there is no parent, the resources is searched in the global environment.

Specified by:
findLocalResource in interface LocalResourceLocator
Parameters:
resourceName - name of the resource to find.
Returns:
the resource URL, null if it doesn't exists.

getLocalResourceLocations

protected abstract String[] getLocalResourceLocations()


Copyright © 2003–2014 MuleSoft, Inc.. All rights reserved.