use of org.mule.runtime.module.deployment.impl.internal.plugin.MuleExtensionModelLoaderManager in project mule by mulesoft.
the class TestDomainFactory method createDomainFactory.
public static TestDomainFactory createDomainFactory(DomainClassLoaderFactory domainClassLoaderFactory, ArtifactClassLoader containerClassLoader, ServiceRepository serviceRepository, ModuleRepository moduleRepository, DescriptorLoaderRepository descriptorLoaderRepository) {
ArtifactPluginDescriptorFactory artifactPluginDescriptorFactory = new ArtifactPluginDescriptorFactory();
ArtifactPluginDescriptorLoader artifactPluginDescriptorLoader = new ArtifactPluginDescriptorLoader(artifactPluginDescriptorFactory);
DomainDescriptorFactory domainDescriptorFactory = new DomainDescriptorFactory(artifactPluginDescriptorLoader, descriptorLoaderRepository, ArtifactDescriptorValidatorBuilder.builder());
final DefaultClassLoaderManager artifactClassLoaderManager = new DefaultClassLoaderManager();
PluginDependenciesResolver pluginDependenciesResolver = new BundlePluginDependenciesResolver(artifactPluginDescriptorFactory);
DomainClassLoaderBuilderFactory domainClassLoaderBuilderFactory = new DomainClassLoaderBuilderFactory(containerClassLoader, domainClassLoaderFactory, new DefaultRegionPluginClassLoadersFactory(new TrackingArtifactClassLoaderFactory<>(artifactClassLoaderManager, new ArtifactPluginClassLoaderFactory()), moduleRepository));
return new TestDomainFactory(artifactClassLoaderManager, serviceRepository, domainDescriptorFactory, pluginDependenciesResolver, domainClassLoaderBuilderFactory, new MuleExtensionModelLoaderManager(containerClassLoader));
}
Aggregations