Search in sources :

Example 31 with BizModel

use of com.alipay.sofa.ark.container.model.BizModel in project sofa-ark by alipay.

the class BizFactoryServiceImpl method createEmbedMasterBiz.

@Override
public Biz createEmbedMasterBiz(ClassLoader masterClassLoader) {
    BizModel bizModel = new BizModel();
    bizModel.setBizState(BizState.RESOLVED).setBizName(ArkConfigs.getStringValue(MASTER_BIZ)).setBizVersion("1.0.0").setMainClass("embed main").setPriority("100").setWebContextPath("/").setDenyImportPackages(null).setDenyImportClasses(null).setDenyImportResources(null).setInjectPluginDependencies(new HashSet<>()).setInjectExportPackages(null).setClassPath(((URLClassLoader) masterClassLoader).getURLs()).setClassLoader(masterClassLoader);
    return bizModel;
}
Also used : URLClassLoader(java.net.URLClassLoader) BizModel(com.alipay.sofa.ark.container.model.BizModel) HashSet(java.util.HashSet)

Aggregations

BizModel (com.alipay.sofa.ark.container.model.BizModel)31 Test (org.junit.Test)22 BaseTest (com.alipay.sofa.ark.container.BaseTest)18 Biz (com.alipay.sofa.ark.spi.model.Biz)12 ITest (com.alipay.sofa.ark.container.testdata.ITest)11 URL (java.net.URL)11 PluginModel (com.alipay.sofa.ark.container.model.PluginModel)8 HandleArchiveStage (com.alipay.sofa.ark.container.pipeline.HandleArchiveStage)4 BizManagerService (com.alipay.sofa.ark.spi.service.biz.BizManagerService)3 URLClassLoader (java.net.URLClassLoader)3 HashSet (java.util.HashSet)3 BizClassLoader (com.alipay.sofa.ark.container.service.classloader.BizClassLoader)2 ArkRuntimeException (com.alipay.sofa.ark.exception.ArkRuntimeException)2 ExplodedBizArchive (com.alipay.sofa.ark.loader.ExplodedBizArchive)2 AfterBizStartupEvent (com.alipay.sofa.ark.spi.event.biz.AfterBizStartupEvent)2 BeforePluginStartupEvent (com.alipay.sofa.ark.spi.event.plugin.BeforePluginStartupEvent)2 Plugin (com.alipay.sofa.ark.spi.model.Plugin)2 Attributes (java.util.jar.Attributes)2 ArkClient (com.alipay.sofa.ark.api.ArkClient)1 JarBizArchive (com.alipay.sofa.ark.loader.JarBizArchive)1