public class ToolingDomainClassLoaderBuilder extends AbstractArtifactClassLoaderBuilder<ToolingDomainClassLoaderBuilder>
ArtifactClassLoader builder for class loaders required by Domain artifactsartifactDescriptor, logger| Constructor and Description |
|---|
ToolingDomainClassLoaderBuilder(ArtifactClassLoader parentClassLoader,
DeployableArtifactClassLoaderFactory<DomainDescriptor> artifactClassLoaderFactory,
RegionPluginClassLoadersFactory pluginClassLoadersFactory)
Creates a new builder for creating
Domain artifacts. |
| Modifier and Type | Method and Description |
|---|---|
ToolingArtifactClassLoader |
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.
|
protected RegionClassLoader |
createRegionClassLoader(String artifactId,
ArtifactDescriptor artifactDescriptor,
ClassLoader parentClassLoader,
ClassLoaderLookupPolicy parentLookupPolicy)
Template method to build different implementations of a
RegionClassLoader |
protected String |
getArtifactId(ArtifactDescriptor artifactDescriptor) |
static String |
getDomainId(String domainName) |
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.
|
addArtifactPluginDescriptors, getParentLookupPolicy, setArtifactDescriptorpublic ToolingDomainClassLoaderBuilder(ArtifactClassLoader parentClassLoader, DeployableArtifactClassLoaderFactory<DomainDescriptor> artifactClassLoaderFactory, RegionPluginClassLoadersFactory pluginClassLoadersFactory)
Domain artifacts.parentClassLoader - classloader that will be the parent of the created classloaders. Non nullartifactClassLoaderFactory - factory for the classloader specific to the artifact resource and classespluginClassLoadersFactory - creates the class loaders for the plugins included in the domain's region. Non nullprotected ArtifactClassLoader createArtifactClassLoader(String artifactId, RegionClassLoader regionClassLoader)
AbstractArtifactClassLoaderBuildercreateArtifactClassLoader in class AbstractArtifactClassLoaderBuilder<ToolingDomainClassLoaderBuilder>artifactId - identifies the artifact being created. Non empty.regionClassLoader - class loader containing the artifact and dependant class loaders. Non null.public ToolingArtifactClassLoader build()
ArtifactClassLoader using the provided configuration. It will create the proper class loader hierarchy
and filters so domain classes, resources and plugins are resolve correctly.build in class AbstractArtifactClassLoaderBuilder<ToolingDomainClassLoaderBuilder>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<ToolingDomainClassLoaderBuilder>protected ArtifactClassLoader getParentClassLoader()
getParentClassLoader in class AbstractArtifactClassLoaderBuilder<ToolingDomainClassLoaderBuilder>protected RegionClassLoader createRegionClassLoader(String artifactId, ArtifactDescriptor artifactDescriptor, ClassLoader parentClassLoader, ClassLoaderLookupPolicy parentLookupPolicy)
AbstractArtifactClassLoaderBuilderRegionClassLoadercreateRegionClassLoader in class AbstractArtifactClassLoaderBuilder<ToolingDomainClassLoaderBuilder>RegionClassLoaderCopyright © 2003–2023 MuleSoft, Inc.. All rights reserved.