org.mule.module.launcher.artifact
Class AbstractArtifactClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.mule.module.launcher.GoodCitizenClassLoader
org.mule.module.launcher.FineGrainedControlClassLoader
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.
|
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 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 |
logger
protected org.apache.commons.logging.Log logger
shutdownListeners
protected List<ShutdownListener> shutdownListeners
AbstractArtifactClassLoader
public AbstractArtifactClassLoader(URL[] urls,
ClassLoader parent)
AbstractArtifactClassLoader
public AbstractArtifactClassLoader(URL[] urls,
ClassLoader parent,
Set<String> overrides)
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.