Search in sources :

Example 1 with DefaultRegionPluginClassLoadersFactory

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));
}
Also used : BundlePluginDependenciesResolver(org.mule.runtime.deployment.model.internal.plugin.BundlePluginDependenciesResolver) DefaultRegionPluginClassLoadersFactory(org.mule.runtime.deployment.model.internal.DefaultRegionPluginClassLoadersFactory) TrackingArtifactClassLoaderFactory(org.mule.runtime.module.artifact.api.classloader.TrackingArtifactClassLoaderFactory) ArtifactPluginClassLoaderFactory(org.mule.runtime.deployment.model.api.plugin.ArtifactPluginClassLoaderFactory) ArtifactPluginDescriptorLoader(org.mule.runtime.module.deployment.impl.internal.plugin.ArtifactPluginDescriptorLoader) DomainDescriptorFactory(org.mule.runtime.module.deployment.impl.internal.domain.DomainDescriptorFactory) DomainClassLoaderBuilderFactory(org.mule.runtime.module.deployment.impl.internal.domain.DomainClassLoaderBuilderFactory) MuleExtensionModelLoaderManager(org.mule.runtime.module.deployment.impl.internal.plugin.MuleExtensionModelLoaderManager) ArtifactPluginDescriptorFactory(org.mule.runtime.module.deployment.impl.internal.plugin.ArtifactPluginDescriptorFactory) DefaultClassLoaderManager(org.mule.runtime.module.deployment.impl.internal.artifact.DefaultClassLoaderManager) PluginDependenciesResolver(org.mule.runtime.deployment.model.internal.plugin.PluginDependenciesResolver) BundlePluginDependenciesResolver(org.mule.runtime.deployment.model.internal.plugin.BundlePluginDependenciesResolver)

Example 2 with DefaultRegionPluginClassLoadersFactory

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);
}
Also used : BundlePluginDependenciesResolver(org.mule.runtime.deployment.model.internal.plugin.BundlePluginDependenciesResolver) PolicyTemplateClassLoaderBuilderFactory(org.mule.runtime.module.deployment.impl.internal.policy.PolicyTemplateClassLoaderBuilderFactory) DefaultRegionPluginClassLoadersFactory(org.mule.runtime.deployment.model.internal.DefaultRegionPluginClassLoadersFactory) ArtifactPluginClassLoaderFactory(org.mule.runtime.deployment.model.api.plugin.ArtifactPluginClassLoaderFactory) ApplicationDescriptorFactory(org.mule.runtime.module.deployment.impl.internal.application.ApplicationDescriptorFactory) ArtifactPluginDescriptorLoader(org.mule.runtime.module.deployment.impl.internal.plugin.ArtifactPluginDescriptorLoader) ApplicationClassLoaderBuilderFactory(org.mule.runtime.module.deployment.impl.internal.application.ApplicationClassLoaderBuilderFactory) ArtifactPluginDescriptorFactory(org.mule.runtime.module.deployment.impl.internal.plugin.ArtifactPluginDescriptorFactory) DefaultClassLoaderManager(org.mule.runtime.module.deployment.impl.internal.artifact.DefaultClassLoaderManager) PluginDependenciesResolver(org.mule.runtime.deployment.model.internal.plugin.PluginDependenciesResolver) BundlePluginDependenciesResolver(org.mule.runtime.deployment.model.internal.plugin.BundlePluginDependenciesResolver)

Aggregations

ArtifactPluginClassLoaderFactory (org.mule.runtime.deployment.model.api.plugin.ArtifactPluginClassLoaderFactory)2 DefaultRegionPluginClassLoadersFactory (org.mule.runtime.deployment.model.internal.DefaultRegionPluginClassLoadersFactory)2 BundlePluginDependenciesResolver (org.mule.runtime.deployment.model.internal.plugin.BundlePluginDependenciesResolver)2 PluginDependenciesResolver (org.mule.runtime.deployment.model.internal.plugin.PluginDependenciesResolver)2 DefaultClassLoaderManager (org.mule.runtime.module.deployment.impl.internal.artifact.DefaultClassLoaderManager)2 ArtifactPluginDescriptorFactory (org.mule.runtime.module.deployment.impl.internal.plugin.ArtifactPluginDescriptorFactory)2 ArtifactPluginDescriptorLoader (org.mule.runtime.module.deployment.impl.internal.plugin.ArtifactPluginDescriptorLoader)2 TrackingArtifactClassLoaderFactory (org.mule.runtime.module.artifact.api.classloader.TrackingArtifactClassLoaderFactory)1 ApplicationClassLoaderBuilderFactory (org.mule.runtime.module.deployment.impl.internal.application.ApplicationClassLoaderBuilderFactory)1 ApplicationDescriptorFactory (org.mule.runtime.module.deployment.impl.internal.application.ApplicationDescriptorFactory)1 DomainClassLoaderBuilderFactory (org.mule.runtime.module.deployment.impl.internal.domain.DomainClassLoaderBuilderFactory)1 DomainDescriptorFactory (org.mule.runtime.module.deployment.impl.internal.domain.DomainDescriptorFactory)1 MuleExtensionModelLoaderManager (org.mule.runtime.module.deployment.impl.internal.plugin.MuleExtensionModelLoaderManager)1 PolicyTemplateClassLoaderBuilderFactory (org.mule.runtime.module.deployment.impl.internal.policy.PolicyTemplateClassLoaderBuilderFactory)1