@Override public void stopInner() { try { if(httpServer != null) { httpServer.stop(); for(Connector c: httpServer.getConnectors()) { c.close(); } } if(context != null) context.destroy(); } catch(Exception e) { throw new VoldemortException(e); } this.httpServer = null; this.context = null; }
/** * stop the server */ public void stop() throws Exception { listener.close(); webServer.stop(); }
/** * stop the server */ public void stop() throws Exception { listener.close(); webServer.stop(); }
/** * stop the server */ public void stop() throws Exception { listener.close(); webServer.stop(); }
/** * stop the server */ public void stop() throws Exception { listener.close(); webAppContext.clearAttributes(); webServer.removeHandler(webAppContext); webServer.stop(); }
listener.close(); listener.open(); break;
listener.close(); listener.open(); break;
listener.close(); listener.open(); break;
MultiException exception = null; try { listener.close(); } catch (Exception e) { LOG.error(
MultiException exception = null; try { listener.close(); } catch (Exception e) { LOG.error(
li.listener.close(); } catch (Exception e) { LOG.error(
listener.close(); listener.open(); LOG.info("Jetty bound to port " + listener.getLocalPort());
listener.close(); listener.open(); LOG.info("Jetty bound to port " + listener.getLocalPort());
listener.close(); listener.open(); LOG.info("Jetty bound to port " + listener.getLocalPort());
listener.close(); listener.open(); LOG.info("Jetty bound to port " + listener.getLocalPort());
for (Connector c : listeners) { try { c.close(); } catch (Exception e) { LOG.error(
for (Connector c : listeners) { try { c.close(); } catch (Exception e) { LOG.error(
for (Connector c : listeners) { try { c.close(); } catch (Exception e) { LOG.error(
private void openListeners() throws Exception { // from HttpServer2.openListeners() for (Connector listener : agentServer.getConnectors()) { if (listener.getLocalPort() != -1) { // This listener is either started externally or has been bound continue; } int port = listener.getPort(); while (true) { // jetty has a bug where you can't reopen a listener that previously // failed to open w/o issuing a close first, even if the port is changed try { listener.close(); listener.open(); LOG.info("Jetty bound to port " + listener.getLocalPort()); break; } catch (BindException ex) { if (port == 0) { BindException be = new BindException("Port in use: " + listener.getHost() + ":" + listener.getPort()); be.initCause(ex); throw be; } } // try the next port number listener.setPort(++port); Thread.sleep(100); } } }
private void openListeners() throws Exception { // from HttpServer2.openListeners() for (Connector listener : agentServer.getConnectors()) { if (listener.getLocalPort() != -1) { // This listener is either started externally or has been bound continue; } int port = listener.getPort(); while (true) { // jetty has a bug where you can't reopen a listener that previously // failed to open w/o issuing a close first, even if the port is changed try { listener.close(); listener.open(); LOG.info("Jetty bound to port " + listener.getLocalPort()); break; } catch (BindException ex) { if (port == 0) { BindException be = new BindException("Port in use: " + listener.getHost() + ":" + listener.getPort()); be.initCause(ex); throw be; } } // try the next port number listener.setPort(++port); Thread.sleep(100); } } }