@Override protected void doStop() throws Exception { super.doStop(); for (String key : handlers.keySet()) { handlers.get(key).stop(); } }
/** * Removes a Jetty handler to be added to the embedded web server that is used to expose BOSH (HTTP-bind) * functionality. * * Removing a handler, even when null, or non-existing, might have side-effects as introduced by the Jetty * implementation. At the time of writing, Jetty will re * * @param handler The handler (should not be null). */ public void removeJettyHandler( Handler handler ) { if (handler instanceof WebAppContext) { // A work-around of the Jetty bug described at https://github.com/eclipse/jetty.project/issues/1425 // NOTE: According to some comments on WebAppLoaderFix, this may stop working on Java 9. // Hopefully the Jetty team will have fixed the underlying bug by then WebAppLoaderFix.checkAndClose(((WebAppContext) handler).getClassLoader()); } extensionHandlers.removeHandler( handler ); if ( handler.isStarted() ) { try { handler.stop(); } catch ( Exception e ) { Log.warn( "Unable to stop the handler that was removed: {}", handler, e ); } } }
@Override public void stop() throws Exception { handler.stop(); }
@Override public void stop() throws Exception { handler.stop(); }
@Override protected void doStop() throws Exception { if (_handler!=null) _handler.stop(); super.doStop(); }
@Override protected void doStop() throws Exception { if (_handler!=null) _handler.stop(); super.doStop(); }
@Override protected void doStop() throws Exception { if (_handler!=null) _handler.stop(); super.doStop(); }
@Override protected void doStop() throws Exception { if (_handler!=null) _handler.stop(); super.doStop(); }
@Override protected void doStop() throws Exception { if (_handler!=null) _handler.stop(); super.doStop(); }
/** * Removes a Jetty handler to be added to the embedded web server that is used to expose BOSH (HTTP-bind) * functionality. * * Removing a handler, even when null, or non-existing, might have side-effects as introduced by the Jetty * implementation. At the time of writing, Jetty will re * * @param handler The handler (should not be null). */ public void removeJettyHandler( Handler handler ) { extensionHandlers.removeHandler( handler ); if ( handler.isStarted() ) { try { handler.stop(); } catch ( Exception e ) { Log.warn( "Unable to stop the handler that was removed: {}", handler, e ); } } }
void stop() { if (server == null) { return; } jqmlogger.trace("Jetty will now stop"); try { for (Handler ha : server.getHandlers()) { ha.stop(); ha.destroy(); handlers.removeHandler(ha); } this.server.stop(); this.server.join(); this.server.destroy(); this.server = null; jqmlogger.info("Jetty has stopped"); } catch (Exception e) { jqmlogger.error( "An error occured during Jetty stop. It is not an issue if it happens during JQM node shutdown, but one during restart (memeory leak).", e); } }
private void removeHandler(Domain domain) { Handler handler = getInternalHandler(domain); if (handler != null && handler.isStarted()) { try { logger.info("Stopping handler for {}: {}", domain.getName(), handler); handler.stop(); } catch (Exception ex) { logger.error("Unable to stop an handler", ex); } parent.unmanage(handler); parent.removeHandler(handler); } }
private void removeHandler(Domain domain) { Handler handler = getInternalHandler(domain); if (handler != null && handler.isStarted()) { try { logger.info("Stopping handler for {}: {}", domain.getName(), handler); handler.stop(); } catch (Exception ex) { logger.error("Unable to stop an handler", ex); } parent.unmanage(handler); parent.removeHandler(handler); } }
private void removeHandler(Domain domain) { Handler handler = getInternalHandler(domain); if (handler != null && handler.isStarted()) { try { logger.info("Stopping handler for {}: {}", domain.getName(), handler); handler.stop(); } catch (Exception ex) { logger.error("Unable to stop an handler", ex); } parent.unmanage(handler); parent.removeHandler(handler); } }
if (contexts != null) { for (Handler h : contexts.getHandlers()) { h.stop();
@Override protected void doStop() throws Exception { MultiException mex=new MultiException(); try { super.doStop(); } catch(Throwable e){mex.add(e);} if (_handlers!=null) { for (int i=_handlers.length;i-->0;) try{_handlers[i].stop();}catch(Throwable e){mex.add(e);} } mex.ifExceptionThrow(); }
@Override protected void doStop() throws Exception { MultiException mex=new MultiException(); try { super.doStop(); } catch(Throwable e){mex.add(e);} if (_handlers!=null) { for (int i=_handlers.length;i-->0;) try{_handlers[i].stop();}catch(Throwable e){mex.add(e);} } mex.ifExceptionThrow(); }
@Override protected void doStop() throws Exception { MultiException mex=new MultiException(); try { super.doStop(); } catch(Throwable e){mex.add(e);} if (_handlers!=null) { for (int i=_handlers.length;i-->0;) try{_handlers[i].stop();}catch(Throwable e){mex.add(e);} } mex.ifExceptionThrow(); }
@Override protected void doStop() throws Exception { MultiException mex=new MultiException(); try { super.doStop(); } catch(Throwable e){mex.add(e);} if (_handlers!=null) { for (int i=_handlers.length;i-->0;) try{_handlers[i].stop();}catch(Throwable e){mex.add(e);} } mex.ifExceptionThrow(); }
@Override protected void doStop() throws Exception { MultiException mex=new MultiException(); try { super.doStop(); } catch(Throwable e){mex.add(e);} if (_handlers!=null) { for (int i=_handlers.length;i-->0;) try{_handlers[i].stop();}catch(Throwable e){mex.add(e);} } mex.ifExceptionThrow(); }