public class ApplicationClassLoaderBuilder extends AbstractArtifactClassLoaderBuilder<ApplicationClassLoaderBuilder>
ArtifactClassLoader builder for class loaders required by Application artifactsartifactDescriptor, artifactPluginClassLoaders, logger| Constructor and Description |
|---|
ApplicationClassLoaderBuilder(DeployableArtifactClassLoaderFactory<ApplicationDescriptor> artifactClassLoaderFactory,
RegionPluginClassLoadersFactory pluginClassLoadersFactory)
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 applicationId) |
protected String |
getArtifactId(ArtifactDescriptor artifactDescriptor) |
protected DomainDescriptor |
getDomainDescriptor() |
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.
|
protected ClassLoaderLookupPolicy |
getParentLookupPolicy(ArtifactClassLoader parentClassLoader) |
ApplicationClassLoaderBuilder |
setDomain(Domain domain) |
addArtifactPluginDescriptors, createRegionClassLoader, setArtifactDescriptor, setArtifactIdpublic ApplicationClassLoaderBuilder(DeployableArtifactClassLoaderFactory<ApplicationDescriptor> artifactClassLoaderFactory, RegionPluginClassLoadersFactory pluginClassLoadersFactory)
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 classespluginClassLoadersFactory - creates the class loaders for the plugins included in the application's region. Non nullpublic 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>protected DomainDescriptor getDomainDescriptor()
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 applicationId)
domainId - name of the domain where the application is deployed. Non empty.applicationId - id of the application. Non empty.protected ClassLoaderLookupPolicy getParentLookupPolicy(ArtifactClassLoader parentClassLoader)
getParentLookupPolicy in class AbstractArtifactClassLoaderBuilder<ApplicationClassLoaderBuilder>parentClassLoader - parent class loader for the creates artifact class loaderCopyright © 2003–2019 MuleSoft, Inc.. All rights reserved.