Package org.glassfish.grizzly.http.server

Examples of org.glassfish.grizzly.http.server.HttpServer.shutdownNow()


            System.out.println(String.format("Application started.\n" +
                    "Access it at %s\n" +
                    "Hit enter to stop it...",
                    getAppUri()));
            System.in.read();
            server.shutdownNow();
        } catch (IOException ex) {
            Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
View Full Code Here


                if (System.in.read() == -1) {
                    logger.warn("Console read terminated without receiving user input");
                }
                sayGoodbye(builder, logger);
            } finally {
                httpServer.shutdownNow();
            }
            System.out.println("Shut down successful. Goodbye!");
        } catch (Exception e) {
            LoggerFactory.getLogger(StandaloneServer.class).error("The documents4j server terminated with an unexpected error", e);
            System.err.println(String.format("Error: %s", e.getMessage()));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.