public class ContainerClassLoaderFactory extends Object
| Modifier and Type | Field and Description |
|---|---|
static Set<String> |
BOOT_PACKAGES
Boot packages define all the prefixes that must be loaded from the container classLoader without being filtered
|
static Set<String> |
SYSTEM_PACKAGES
System package define all the prefixes that must be loaded only from the container classLoader, but then are filtered
depending on what is part of the exposed API.
|
| Constructor and Description |
|---|
ContainerClassLoaderFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected ArtifactClassLoader |
createArtifactClassLoader(ClassLoader parentClassLoader,
List<MuleModule> muleModules,
ClassLoaderLookupPolicy containerLookupPolicy,
ArtifactDescriptor artifactDescriptor)
Creates an
ArtifactClassLoader that always resolves resources by delegating to the parentClassLoader. |
ArtifactClassLoader |
createContainerClassLoader(ClassLoader parentClassLoader)
Creates the classLoader to represent the Mule container.
|
protected FilteringArtifactClassLoader |
createContainerFilteringClassLoader(List<MuleModule> muleModules,
ArtifactClassLoader containerClassLoader)
Creates a
FilteringArtifactClassLoader to filter the ArtifactClassLoader containerClassLoader given based on
List of muleModules. |
protected Set<String> |
getBootPackages() |
protected ClassLoaderLookupPolicy |
getContainerClassLoaderLookupPolicy(List<MuleModule> muleModules)
Creates the container lookup policy to be used by child class loaders.
|
void |
setModuleDiscoverer(ModuleDiscoverer moduleDiscoverer) |
public static final Set<String> SYSTEM_PACKAGES
public ArtifactClassLoader createContainerClassLoader(ClassLoader parentClassLoader)
parentClassLoader - parent classLoader. Can be null.ArtifactClassLoader containing container code that can be used as parent classloader for other
mule artifacts.protected ClassLoaderLookupPolicy getContainerClassLoaderLookupPolicy(List<MuleModule> muleModules)
muleModules - list of modules that would be used to register in the filter based of the class loader.ClassLoaderLookupPolicy that contains the lookup policies for boot, system packages. plus exported
packages by the given list of MuleModule.protected ArtifactClassLoader createArtifactClassLoader(ClassLoader parentClassLoader, List<MuleModule> muleModules, ClassLoaderLookupPolicy containerLookupPolicy, ArtifactDescriptor artifactDescriptor)
ArtifactClassLoader that always resolves resources by delegating to the parentClassLoader.parentClassLoader - the parent ClassLoader for the containermuleModules - the list of MuleModules to be used for defining the filtercontainerLookupPolicy - the ClassLoaderLookupPolicy to be used by the containerartifactDescriptor - descriptor for the artifact owning the created class loader instance.ArtifactClassLoader to be used in a FilteringContainerClassLoaderpublic void setModuleDiscoverer(ModuleDiscoverer moduleDiscoverer)
protected FilteringArtifactClassLoader createContainerFilteringClassLoader(List<MuleModule> muleModules, ArtifactClassLoader containerClassLoader)
FilteringArtifactClassLoader to filter the ArtifactClassLoader containerClassLoader given based on
List of muleModules.muleModules - the list of MuleModules to be used for defining the filtercontainerClassLoader - the ArtifactClassLoader for the container that will be used to delegate by the
FilteringContainerClassLoaderFilteringContainerClassLoader that would be the one used as the parent of plugins and applications
ArtifactClassLoaderCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.