Search in sources :

Example 1 with ClassloaderService

use of com.alipay.sofa.ark.spi.service.classloader.ClassloaderService in project sofa-ark by alipay.

the class PluginClassloaderTest method before.

@Before
public void before() {
    ArkServiceContainer arkServiceContainer = new ArkServiceContainer();
    arkServiceContainer.start();
    pluginManagerService = ArkServiceContainerHolder.getContainer().getService(PluginManagerService.class);
    pluginDeployService = ArkServiceContainerHolder.getContainer().getService(PluginDeployService.class);
    classloaderService = ArkServiceContainerHolder.getContainer().getService(ClassloaderService.class);
}
Also used : PluginManagerService(com.alipay.sofa.ark.spi.service.plugin.PluginManagerService) PluginDeployService(com.alipay.sofa.ark.spi.service.plugin.PluginDeployService) ClassloaderService(com.alipay.sofa.ark.spi.service.classloader.ClassloaderService) ArkServiceContainer(com.alipay.sofa.ark.container.service.ArkServiceContainer) Before(org.junit.Before)

Example 2 with ClassloaderService

use of com.alipay.sofa.ark.spi.service.classloader.ClassloaderService in project sofa-ark by alipay.

the class TestHelper method createNoneDelegateTestClassLoader.

public ClassLoader createNoneDelegateTestClassLoader() {
    PipelineContext context = arkContainer.getPipelineContext();
    URL[] classpath = context.getLaunchCommand().getClasspath();
    ClassLoaderService classloaderService = arkContainer.getArkServiceContainer().getService(ClassLoaderService.class);
    return new NoneDelegateTestClassLoader(MOCK_BIZ_IDENTITY, classpath);
}
Also used : PipelineContext(com.alipay.sofa.ark.spi.pipeline.PipelineContext) URL(java.net.URL) ClassLoaderService(com.alipay.sofa.ark.spi.service.classloader.ClassLoaderService)

Example 3 with ClassloaderService

use of com.alipay.sofa.ark.spi.service.classloader.ClassloaderService in project sofa-ark by alipay.

the class TestHelper method createTestClassLoader.

public ClassLoader createTestClassLoader() {
    PipelineContext context = arkContainer.getPipelineContext();
    URL[] classpath = context.getLaunchCommand().getClasspath();
    ClassLoaderService classloaderService = arkContainer.getArkServiceContainer().getService(ClassLoaderService.class);
    return new TestClassLoader(MOCK_BIZ_IDENTITY, classpath, classloaderService.getSystemClassLoader());
}
Also used : PipelineContext(com.alipay.sofa.ark.spi.pipeline.PipelineContext) URL(java.net.URL) ClassLoaderService(com.alipay.sofa.ark.spi.service.classloader.ClassLoaderService)

Example 4 with ClassloaderService

use of com.alipay.sofa.ark.spi.service.classloader.ClassloaderService in project sofa-ark by alipay.

the class BizClassloaderTest method before.

@Before
public void before() {
    ArkServiceContainer arkServiceContainer = new ArkServiceContainer();
    arkServiceContainer.start();
    pluginManagerService = ArkServiceContainerHolder.getContainer().getService(PluginManagerService.class);
    pluginDeployService = ArkServiceContainerHolder.getContainer().getService(PluginDeployService.class);
    classloaderService = ArkServiceContainerHolder.getContainer().getService(ClassloaderService.class);
    bizManagerService = ArkServiceContainerHolder.getContainer().getService(BizManagerService.class);
}
Also used : PluginManagerService(com.alipay.sofa.ark.spi.service.plugin.PluginManagerService) PluginDeployService(com.alipay.sofa.ark.spi.service.plugin.PluginDeployService) ClassloaderService(com.alipay.sofa.ark.spi.service.classloader.ClassloaderService) BizManagerService(com.alipay.sofa.ark.spi.service.biz.BizManagerService) ArkServiceContainer(com.alipay.sofa.ark.container.service.ArkServiceContainer) Before(org.junit.Before)

Example 5 with ClassloaderService

use of com.alipay.sofa.ark.spi.service.classloader.ClassloaderService in project sofa-ark by alipay.

the class RegistryServiceTest method before.

@Before
public void before() {
    ArkServiceContainer arkServiceContainer = new ArkServiceContainer();
    arkServiceContainer.start();
    registryService = ArkServiceContainerHolder.getContainer().getService(RegistryService.class);
    pluginManagerService = ArkServiceContainerHolder.getContainer().getService(PluginManagerService.class);
    pluginDeployService = ArkServiceContainerHolder.getContainer().getService(PluginDeployService.class);
    classloaderService = ArkServiceContainerHolder.getContainer().getService(ClassloaderService.class);
}
Also used : PluginManagerService(com.alipay.sofa.ark.spi.service.plugin.PluginManagerService) PluginDeployService(com.alipay.sofa.ark.spi.service.plugin.PluginDeployService) RegistryService(com.alipay.sofa.ark.spi.service.registry.RegistryService) ClassloaderService(com.alipay.sofa.ark.spi.service.classloader.ClassloaderService) ArkServiceContainer(com.alipay.sofa.ark.container.service.ArkServiceContainer) Before(org.junit.Before)

Aggregations

ArkServiceContainer (com.alipay.sofa.ark.container.service.ArkServiceContainer)3 ClassloaderService (com.alipay.sofa.ark.spi.service.classloader.ClassloaderService)3 PluginDeployService (com.alipay.sofa.ark.spi.service.plugin.PluginDeployService)3 PluginManagerService (com.alipay.sofa.ark.spi.service.plugin.PluginManagerService)3 Before (org.junit.Before)3 PipelineContext (com.alipay.sofa.ark.spi.pipeline.PipelineContext)2 ClassLoaderService (com.alipay.sofa.ark.spi.service.classloader.ClassLoaderService)2 URL (java.net.URL)2 BizManagerService (com.alipay.sofa.ark.spi.service.biz.BizManagerService)1 RegistryService (com.alipay.sofa.ark.spi.service.registry.RegistryService)1