public static DomainHttpServer create(InetSocketAddress socket, int backlog, ModelController modelController,
Executor executor, File serverTempDir) throws IOException {
HttpServer server = HttpServer.create(socket, backlog);
DomainHttpServer me = new DomainHttpServer(server, modelController, serverTempDir);
server.createContext(DOMAIN_API_CONTEXT, me);
server.createContext(ConsoleHandler.CONTEXT, new ConsoleHandler());
server.setExecutor(executor);
return new DomainHttpServer(server, modelController, serverTempDir);
}