public class ApplicationClassLoaderBuilder extends AbstractArtifactClassLoaderBuilder<ApplicationClassLoaderBuilder>
ArtifactClassLoader builder for class loaders required by Application artifacts| Constructor and Description |
|---|
ApplicationClassLoaderBuilder(DeployableArtifactClassLoaderFactory<ApplicationDescriptor> artifactClassLoaderFactory,
ArtifactPluginRepository artifactPluginRepository,
ArtifactClassLoaderFactory<ArtifactPluginDescriptor> artifactPluginClassLoaderFactory,
ArtifactDescriptorFactory<ArtifactPluginDescriptor> artifactDescriptorFactory,
DependenciesProvider dependenciesProvider)
Creates a new builder for creating
Application artifacts. |
| Modifier and Type | Method and Description |
|---|---|
MuleDeployableArtifactClassLoader |
build()
Creates a new
ArtifactClassLoader using the provided configuration. |
static String |
getApplicationId(String domainId,
String applicationName) |
protected String |
getArtifactId(ArtifactDescriptor artifactDescriptor) |
protected ArtifactClassLoader |
getParentClassLoader()
Implementation must redefine this method and it should provide the root class loader which is going to be used as parent
class loader for every other class loader created by this builder.
|
ApplicationClassLoaderBuilder |
setDomain(Domain domain) |
addArtifactPluginDescriptors, getArtifactPluginId, setArtifactDescriptor, setArtifactIdpublic ApplicationClassLoaderBuilder(DeployableArtifactClassLoaderFactory<ApplicationDescriptor> artifactClassLoaderFactory, ArtifactPluginRepository artifactPluginRepository, ArtifactClassLoaderFactory<ArtifactPluginDescriptor> artifactPluginClassLoaderFactory, ArtifactDescriptorFactory<ArtifactPluginDescriptor> artifactDescriptorFactory, DependenciesProvider dependenciesProvider)
Application artifacts.
The domainRepository is used to locate the domain that this application belongs to and the
artifactClassLoaderBuilder is used for building the common parts of artifacts.
artifactClassLoaderFactory - factory for the classloader specific to the artifact resource and classesartifactPluginRepository - repository of plugins contained by the runtimeartifactPluginClassLoaderFactory - creates artifact plugin class loaders.artifactDescriptorFactory - factory to create ArtifactPluginDescriptor when there's a missing dependency to resolvedependenciesProvider - resolver for missing dependencies.public MuleDeployableArtifactClassLoader build() throws IOException
ArtifactClassLoader using the provided configuration. It will create the proper class loader hierarchy
and filters so application classes, resources, plugins and it's domain resources are resolve correctly.build in class AbstractArtifactClassLoaderBuilder<ApplicationClassLoaderBuilder>MuleDeployableArtifactClassLoader created from the provided configuration.IOException - exception cause when it was not possible to access the file provided as dependenciesprotected String getArtifactId(ArtifactDescriptor artifactDescriptor)
getArtifactId in class AbstractArtifactClassLoaderBuilder<ApplicationClassLoaderBuilder>protected ArtifactClassLoader getParentClassLoader()
getParentClassLoader in class AbstractArtifactClassLoaderBuilder<ApplicationClassLoaderBuilder>public ApplicationClassLoaderBuilder setDomain(Domain domain)
domain - the domain artifact to which the application that is going to use this classloader belongs.public static String getApplicationId(String domainId, String applicationName)
domainId - name of the domain where the application is deployed. Non empty.applicationName - name of the application. Non empty.Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.