345346347348349350351352353354355
server.setHandler(sessionHandler); server.start(); System.out.println("Server running: http://localhost:" + port + "/"); server.join(); } catch (Exception ex) { System.err.println("Error running server: " + ex.getMessage()); System.exit(1); }
215216217218219220221222
server.addBean(login); // Start the server server.start(); server.join(); } }
4142434445464748
Resource fileserverXml = Resource.newSystemResource("fileserver.xml"); XmlConfiguration configuration = new XmlConfiguration( fileserverXml.getInputStream()); Server server = (Server) configuration.configure(); server.start(); server.join(); } }
203204205206207208209210
server.setStopAtShutdown(true); server.start(); server.dumpStdErr(); server.join(); } }
4344454647484950
// Set a handler server.setHandler(new HelloHandler()); // Start the server server.start(); server.join(); } }
747576777879808182
loginService.setName("Test Realm"); loginService.setConfig("src/test/resources/realm.properties"); server.addBean(loginService); server.start(); server.join(); } }
979899100101102103104
// The use of server.join() the will make the current thread join and // wait until the server is done executing. // See // http://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html#join() server.join(); } }
2627282930313233
{ Server server = new Server(8080); server.setHandler(new HelloHandler()); server.start(); server.join(); } }
6162636465666768
// Add your websockets to the container wsContainer.addEndpoint(EchoJsrSocket.class); server.start(); context.dumpStdErr(); server.join(); } }
102103104105106107108109
server.start(); // The use of server.join() the will make the current thread join and // wait until the server is done executing. // See http://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html#join() server.join(); } }