Search in sources :

Example 21 with EzySettings

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

the class EzySimpleSettingsReader method readSettings.

protected EzySettings readSettings() {
    logger.info("read setting file: {}", getSettingsFilePath());
    EzyXmlReader xmlReader = newXmlReader();
    EzySimpleSettings settings = readSettingsFile(xmlReader);
    EzySimpleZoneFilesSetting zoneFiles = settings.getZoneFiles();
    zoneFiles.forEach(zf -> {
        if (!zf.isActive()) {
            return;
        }
        EzySimpleZoneSetting zoneSetting = readZoneConfigFile(xmlReader, zf.getConfigFile());
        postReadZoneSettings(zoneSetting);
        zoneSetting.setName(zf.getName());
        zoneSetting.setConfigFile(zf.getConfigFile());
        zoneSetting.init();
        settings.addZone(zoneSetting);
    });
    if (settingsDecorator != null) {
        settingsDecorator.decorate(homePath, settings);
    }
    return settings;
}
Also used : EzyXmlReader(com.tvd12.ezyfox.mapping.jaxb.EzyXmlReader)

Aggregations

EzySettings (com.tvd12.ezyfoxserver.setting.EzySettings)18 EzyServer (com.tvd12.ezyfoxserver.EzyServer)16 EzyServerContext (com.tvd12.ezyfoxserver.context.EzyServerContext)16 Test (org.testng.annotations.Test)16 EzyLoggerSetting (com.tvd12.ezyfoxserver.setting.EzyLoggerSetting)11 EzySessionManagementSetting (com.tvd12.ezyfoxserver.setting.EzySessionManagementSetting)11 BaseCoreTest (com.tvd12.ezyfoxserver.testing.BaseCoreTest)11 EzySessionManager (com.tvd12.ezyfoxserver.wrapper.EzySessionManager)11 EzyZoneUserManager (com.tvd12.ezyfoxserver.wrapper.EzyZoneUserManager)11 EzyZone (com.tvd12.ezyfoxserver.EzyZone)10 EzyCloseSession (com.tvd12.ezyfoxserver.command.EzyCloseSession)10 EzyZoneContext (com.tvd12.ezyfoxserver.context.EzyZoneContext)10 EzyController (com.tvd12.ezyfoxserver.controller.EzyController)10 EzyStreamingController (com.tvd12.ezyfoxserver.controller.EzyStreamingController)10 EzyAbstractSession (com.tvd12.ezyfoxserver.entity.EzyAbstractSession)10 EzyInterceptor (com.tvd12.ezyfoxserver.interceptor.EzyInterceptor)10 EzyChannel (com.tvd12.ezyfoxserver.socket.EzyChannel)10 EzyServerControllers (com.tvd12.ezyfoxserver.wrapper.EzyServerControllers)10 EzySession (com.tvd12.ezyfoxserver.entity.EzySession)7 EzyArray (com.tvd12.ezyfox.entity.EzyArray)6