private HttpServer createServer(StartArgs startArgs) { if (startArgs.isHttps()) { return ActualHttpServer.createHttpsLogServer( startArgs.getPort(), startArgs.getHttpsCertificate()); } return ActualHttpServer.createLogServer(startArgs.getPort()); }
private HttpServer createBaseHttpServer( Iterable<? extends RunnerSetting> settings, StartArgs startArgs) { HttpServer server = createServer(startArgs); for (RunnerSetting setting : settings) { HttpServer parsedServer = httpServerParser.parseServer( setting.getStream(), startArgs.getPort(), toConfigs(setting)); server = mergeServer(server, parsedServer); } return server; }