| | |
| | | logger.info("Server starting on port " + port); |
| | | |
| | | HttpServer server = HttpServer.create(new InetSocketAddress(port), 0); |
| | | server.createContext("/avd/play", new PlayHandler("play")); |
| | | server.createContext("/avd/seek", new SeekHandler("seek")); |
| | | server.createContext("/avd/play", new PlayHandler(App.F_PLAY)); |
| | | server.createContext("/avd/seek", new SeekHandler(App.F_SEEK)); |
| | | server.createContext("/avd/stop", new CmdHandler(App.CMD_STOP)); |
| | | server.createContext("/avd/pause", new CmdHandler(App.CMD_PAUSE_RESUME)); |
| | | server.createContext("/avd/ping", new PingHandler()); |
| | | server.createContext("/avd/ping", new PingHandler(App.F_PING)); |
| | | server.createContext("/avd/server/stop", new StopServerHandler()); |
| | | //server.setExecutor(null); // creates a default executor |
| | | server.setExecutor(Executors.newFixedThreadPool(20)); |