Search in sources :

Example 1 with IsolatedClassLoaderExtensionsManagerConfigurationBuilder

use of org.mule.test.runner.api.IsolatedClassLoaderExtensionsManagerConfigurationBuilder in project mule by mulesoft.

the class ArtifactFunctionalTestCase method setPluginClassLoaders.

@PluginClassLoadersAware
private static final void setPluginClassLoaders(List<ArtifactClassLoader> artifactClassLoaders) {
    if (artifactClassLoaders == null) {
        throw new IllegalArgumentException("A null value cannot be set as the plugins class loaders");
    }
    if (pluginClassLoaders != null) {
        throw new IllegalStateException("Plugin class loaders were already set, it cannot be set again");
    }
    pluginClassLoaders = artifactClassLoaders;
    if (!pluginClassLoaders.isEmpty()) {
        extensionsManagerConfigurationBuilder = new IsolatedClassLoaderExtensionsManagerConfigurationBuilder(pluginClassLoaders);
        extensionsManagerConfigurationBuilder.loadExtensionModels();
    }
}
Also used : IsolatedClassLoaderExtensionsManagerConfigurationBuilder(org.mule.test.runner.api.IsolatedClassLoaderExtensionsManagerConfigurationBuilder) PluginClassLoadersAware(org.mule.test.runner.PluginClassLoadersAware)

Aggregations

PluginClassLoadersAware (org.mule.test.runner.PluginClassLoadersAware)1 IsolatedClassLoaderExtensionsManagerConfigurationBuilder (org.mule.test.runner.api.IsolatedClassLoaderExtensionsManagerConfigurationBuilder)1