public class ApplicationClassLoaderBuilder extends AbstractArtifactClassLoaderBuilder<ApplicationClassLoaderBuilder>
ArtifactClassLoader builder for class loaders required by Application artifactsartifactDescriptor, artifactPluginClassLoaderFactory, artifactPluginClassLoaders, logger, PLUGIN_CLASSLOADER_IDENTIFIER| Constructor and Description |
|---|
ApplicationClassLoaderBuilder(DeployableArtifactClassLoaderFactory<ApplicationDescriptor> artifactClassLoaderFactory,
ArtifactClassLoaderFactory<ArtifactPluginDescriptor> artifactPluginClassLoaderFactory)
Creates a new builder for creating
Application artifacts. |
| Modifier and Type | Method and Description |
|---|---|
MuleDeployableArtifactClassLoader |
build()
Creates a new
ArtifactClassLoader using the provided configuration. |
protected ArtifactClassLoader |
createArtifactClassLoader(String artifactId,
RegionClassLoader regionClassLoader)
Creates the class loader for the artifact being built.
|
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, ArtifactClassLoaderFactory<ArtifactPluginDescriptor> artifactPluginClassLoaderFactory)
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 classesartifactPluginClassLoaderFactory - creates artifact plugin class loaders.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 ArtifactClassLoader createArtifactClassLoader(String artifactId, RegionClassLoader regionClassLoader)
AbstractArtifactClassLoaderBuildercreateArtifactClassLoader in class AbstractArtifactClassLoaderBuilder<ApplicationClassLoaderBuilder>artifactId - identifies the artifact being created. Non empty.regionClassLoader - class loader containing the artifact and dependant class loaders. Non null.protected 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–2017 MuleSoft, Inc.. All rights reserved.