Search in sources :

Example 6 with EzyAppsStarter

use of com.tvd12.ezyfoxserver.EzyAppsStarter in project ezyfox-server by youngmonkeys.

the class EzyAppsStarterTest method test2.

@Test
public void test2() {
    Map<String, ClassLoader> loaders = new ConcurrentHashMap<>();
    EzySimpleZoneContext zoneContext = EzyZoneContextsTest.newDefaultZoneContext();
    EzySimpleApplication app = new EzySimpleApplication();
    EzySimpleAppSetting appSetting = new EzySimpleAppSetting();
    appSetting.setName("abc");
    app.setSetting(appSetting);
    EzySimpleAppContext appContext = new EzySimpleAppContext();
    appContext.setApp(app);
    EzySimpleZoneSetting zoneSetting = new EzySimpleZoneSetting();
    EzySimpleAppsSetting appsSetting = new EzySimpleAppsSetting();
    appsSetting.setItem(appSetting);
    zoneSetting.setApplications(appsSetting);
    zoneContext.addAppContext(appSetting, appContext);
    EzyAppsStarter starter = new EzyAppsStarter.Builder().zoneContext(zoneContext).appClassLoaders(loaders).build();
    starter.start();
}
Also used : EzySimpleAppSetting(com.tvd12.ezyfoxserver.setting.EzySimpleAppSetting) EzySimpleApplication(com.tvd12.ezyfoxserver.EzySimpleApplication) EzySimpleZoneContext(com.tvd12.ezyfoxserver.context.EzySimpleZoneContext) EzySimpleAppsSetting(com.tvd12.ezyfoxserver.setting.EzySimpleAppsSetting) EzyAppsStarter(com.tvd12.ezyfoxserver.EzyAppsStarter) EzySimpleAppContext(com.tvd12.ezyfoxserver.context.EzySimpleAppContext) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) EzySimpleZoneSetting(com.tvd12.ezyfoxserver.setting.EzySimpleZoneSetting) Test(org.testng.annotations.Test) BaseTest(com.tvd12.test.base.BaseTest)

Aggregations

EzyAppsStarter (com.tvd12.ezyfoxserver.EzyAppsStarter)6 BaseTest (com.tvd12.test.base.BaseTest)6 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)6 Test (org.testng.annotations.Test)6 EzySimpleApplication (com.tvd12.ezyfoxserver.EzySimpleApplication)4 EzySimpleAppContext (com.tvd12.ezyfoxserver.context.EzySimpleAppContext)4 EzySimpleZoneContext (com.tvd12.ezyfoxserver.context.EzySimpleZoneContext)4 EzySimpleAppSetting (com.tvd12.ezyfoxserver.setting.EzySimpleAppSetting)4 EzySimpleAppsSetting (com.tvd12.ezyfoxserver.setting.EzySimpleAppsSetting)4 EzySimpleZoneSetting (com.tvd12.ezyfoxserver.setting.EzySimpleZoneSetting)4 EzySimpleZone (com.tvd12.ezyfoxserver.EzySimpleZone)2 EzyAppEntryLoader (com.tvd12.ezyfoxserver.ext.EzyAppEntryLoader)1