public class TemporaryArtifactClassLoaderBuilder extends AbstractArtifactClassLoaderBuilder<TemporaryArtifactClassLoaderBuilder>
ArtifactClassLoader builder for class loaders used by mule artifacts such as domains or applications.
Allows to construct a classloader when using a set of artifact plugins and takes into account default plugins provided by the
runtime and the shared libraries configured for the plugins.| Constructor and Description |
|---|
TemporaryArtifactClassLoaderBuilder(ArtifactPluginRepository artifactPluginRepository,
ArtifactClassLoaderFactory<ArtifactPluginDescriptor> artifactPluginClassLoaderFactory,
ArtifactDescriptorFactory<ArtifactPluginDescriptor> artifactDescriptorFactory,
DependenciesProvider dependenciesProvider)
Creates an
TemporaryArtifactClassLoaderBuilder. |
| Modifier and Type | Method and Description |
|---|---|
TemporaryArtifactClassLoaderBuilder |
addUrl(URL url)
Adds a
URL to the ArtifactDescriptor. |
MuleDeployableArtifactClassLoader |
build() |
protected String |
getArtifactId(ArtifactDescriptor artifactDescriptor) |
protected ArtifactClassLoader |
getParentClassLoader() |
TemporaryArtifactClassLoaderBuilder |
setParentClassLoader(ArtifactClassLoader parentClassLoader) |
addArtifactPluginDescriptors, getArtifactPluginId, setArtifactDescriptor, setArtifactIdpublic TemporaryArtifactClassLoaderBuilder(ArtifactPluginRepository artifactPluginRepository, ArtifactClassLoaderFactory<ArtifactPluginDescriptor> artifactPluginClassLoaderFactory, ArtifactDescriptorFactory<ArtifactPluginDescriptor> artifactDescriptorFactory, DependenciesProvider dependenciesProvider)
TemporaryArtifactClassLoaderBuilder.artifactPluginRepository - repository of plugins contained by the runtime. Must be not null.artifactPluginClassLoaderFactory - factory for creating class loaders for artifact plugins. Must be not null.artifactDescriptorFactory - factory to create ArtifactPluginDescriptor when there's a missing dependency to resolve.dependenciesProvider - resolver for missing dependencies.public TemporaryArtifactClassLoaderBuilder setParentClassLoader(ArtifactClassLoader parentClassLoader)
parentClassLoader - parent class loader for the artifact class loader.public TemporaryArtifactClassLoaderBuilder addUrl(URL url)
URL to the ArtifactDescriptor.url - URL to be included as part of the ArtifactDescriptor definition.public MuleDeployableArtifactClassLoader build() throws IOException
build in class AbstractArtifactClassLoaderBuilder<TemporaryArtifactClassLoaderBuilder>IOExceptionprotected String getArtifactId(ArtifactDescriptor artifactDescriptor)
getArtifactId in class AbstractArtifactClassLoaderBuilder<TemporaryArtifactClassLoaderBuilder>protected ArtifactClassLoader getParentClassLoader()
getParentClassLoader in class AbstractArtifactClassLoaderBuilder<TemporaryArtifactClassLoaderBuilder>Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.