+ return Configuration.objectHasOwnProperty(Configuration.getConfig(), 'logStatisticsInterval')
+ ? Configuration.getConfig().logStatisticsInterval
+ : Constants.DEFAULT_LOG_STATISTICS_INTERVAL;
+ }
+
+ static getUIWebSocketServer(): UIWebSocketServerConfiguration {
+ let options: ServerOptions = {
+ host: Constants.DEFAULT_UI_WEBSOCKET_SERVER_HOST,
+ port: Constants.DEFAULT_UI_WEBSOCKET_SERVER_PORT,
+ };
+ let uiWebSocketServerConfiguration: UIWebSocketServerConfiguration = {
+ enabled: true,
+ options,
+ };
+ if (Configuration.objectHasOwnProperty(Configuration.getConfig(), 'uiWebSocketServer')) {
+ if (
+ Configuration.objectHasOwnProperty(Configuration.getConfig().uiWebSocketServer, 'options')
+ ) {
+ options = {
+ ...options,
+ ...(Configuration.objectHasOwnProperty(
+ Configuration.getConfig().uiWebSocketServer.options,
+ 'host'
+ ) && { host: Configuration.getConfig().uiWebSocketServer.options.host }),
+ ...(Configuration.objectHasOwnProperty(
+ Configuration.getConfig().uiWebSocketServer.options,
+ 'port'
+ ) && { port: Configuration.getConfig().uiWebSocketServer.options.port }),
+ };
+ }
+ uiWebSocketServerConfiguration = {
+ ...uiWebSocketServerConfiguration,
+ ...(Configuration.objectHasOwnProperty(
+ Configuration.getConfig().uiWebSocketServer,
+ 'enabled'
+ ) && { enabled: Configuration.getConfig().uiWebSocketServer.enabled }),
+ options,
+ };
+ }
+ return uiWebSocketServerConfiguration;