use of org.mule.runtime.deployment.model.internal.DefaultRegionPluginClassLoadersFactory 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));
}
use of org.mule.runtime.deployment.model.internal.DefaultRegionPluginClassLoadersFactory in project mule by mulesoft.
the class TestApplicationFactory method createTestApplicationFactory.
public static TestApplicationFactory createTestApplicationFactory(MuleApplicationClassLoaderFactory applicationClassLoaderFactory, DomainManager domainManager, ServiceRepository serviceRepository, ExtensionModelLoaderRepository extensionModelLoaderRepository, ModuleRepository moduleRepository, DescriptorLoaderRepository descriptorLoaderRepository) {
ArtifactPluginDescriptorFactory artifactPluginDescriptorFactory = new ArtifactPluginDescriptorFactory();
ArtifactPluginDescriptorLoader artifactPluginDescriptorLoader = new ArtifactPluginDescriptorLoader(artifactPluginDescriptorFactory);
ApplicationDescriptorFactory applicationDescriptorFactory = new ApplicationDescriptorFactory(artifactPluginDescriptorLoader, descriptorLoaderRepository, ArtifactDescriptorValidatorBuilder.builder());
final DefaultClassLoaderManager artifactClassLoaderManager = new DefaultClassLoaderManager();
PluginDependenciesResolver pluginDependenciesResolver = new BundlePluginDependenciesResolver(artifactPluginDescriptorFactory);
ApplicationClassLoaderBuilderFactory applicationClassLoaderBuilderFactory = new ApplicationClassLoaderBuilderFactory(applicationClassLoaderFactory, new TrackingArtifactClassLoaderFactory<>(artifactClassLoaderManager, new ArtifactPluginClassLoaderFactory()), new DefaultRegionPluginClassLoadersFactory(new ArtifactPluginClassLoaderFactory(), moduleRepository));
return new TestApplicationFactory(applicationClassLoaderBuilderFactory, applicationDescriptorFactory, domainManager, serviceRepository, extensionModelLoaderRepository, artifactClassLoaderManager, mock(PolicyTemplateClassLoaderBuilderFactory.class), pluginDependenciesResolver, artifactPluginDescriptorLoader);
}
Aggregations