@Override public void destroy() throws Exception { try { if (this.executor instanceof LifeCycle) { ((LifeCycle)this.executor).stop(); } } catch (Throwable ex) { // ignore } try { if (this.scheduler != null) { this.scheduler.stop(); } } catch (Throwable ex) { // ignore } }
@Override public void destroy() throws Exception { try { if (this.executor instanceof LifeCycle) { ((LifeCycle)this.executor).stop(); } } catch (Throwable ex) { // ignore } try { if (this.scheduler != null) { this.scheduler.stop(); } } catch (Throwable ex) { // ignore } }
/** * Stops the given lifecycle. * * @param l the lifecycle to stop * @throws Exception if unable to stop the lifecycle */ protected void stop(LifeCycle l) throws Exception { l.stop(); }
/** * Utility to stop an object if it is a LifeCycle and to convert * any exception thrown to a {@link RuntimeException} * @param object The instance to stop. * @throws RuntimeException if the call to stop throws an exception. */ public static void stop(Object object) { if (object instanceof LifeCycle) { try { ((LifeCycle)object).stop(); } catch(Exception e) { throw new RuntimeException(e); } } } }
@Override public void lifeCycleStarted(LifeCycle lifecycle) { try { _lifecycle.stop(); } catch(Exception e) { LOG.warn(e); } }
public void stop() throws Exception { ImmutableSet<LifeCycle> managedObjects = ImmutableSet.copyOf(environment.lifecycle().getManagedObjects()); for (LifeCycle managed : Lists.reverse(managedObjects.asList())) { managed.stop(); } }
@Override public void run() { for (LifeCycle lifeCycle : _thread._lifeCycles) { try { if (lifeCycle.isStarted()) { lifeCycle.stop(); LOG.debug("Stopped {}",lifeCycle); } if (lifeCycle instanceof Destroyable) { ((Destroyable)lifeCycle).destroy(); LOG.debug("Destroyed {}",lifeCycle); } } catch (Exception ex) { LOG.debug(ex); } } } }
public void run() { for (LifeCycle lc : _jettys) { if (lc.isRunning()) { try { lc.stop(); } catch (Exception e) { changeState(STOPPING, e); } } } if (_context != null) { PortMapper pm = _context.portMapper(); if (_port > 0 && pm.getPort(PortMapper.SVC_EEPSITE) == _port) { _port = 0; pm.unregister(PortMapper.SVC_EEPSITE); } if (_sslPort > 0 && pm.getPort(PortMapper.SVC_HTTPS_EEPSITE) == _sslPort) { _sslPort = 0; pm.unregister(PortMapper.SVC_HTTPS_EEPSITE); } } changeState(STOPPED); } }
/** * Stops the given lifecycle. * * @param l * @throws Exception */ protected void stop(LifeCycle l) throws Exception { l.stop(); }
/** * Stops the given lifecycle. * * @param l the lifecycle to stop * @throws Exception if unable to stop the lifecycle */ protected void stop(LifeCycle l) throws Exception { l.stop(); }
/** * @see org.eclipse.jetty.server.handler.HandlerWrapper#doStop() */ @Override protected void doStop() throws Exception { super.doStop(); if (!_loginServiceShared && _loginService instanceof LifeCycle) ((LifeCycle)_loginService).stop(); }
@Override public void lifeCycleStarted(LifeCycle lifecycle) { try { _lifecycle.stop(); } catch(Exception e) { LOG.warn(e); } }
/** * @see org.eclipse.jetty.server.handler.HandlerWrapper#doStop() */ @Override protected void doStop() throws Exception { super.doStop(); if (!_loginServiceShared && _loginService instanceof LifeCycle) ((LifeCycle)_loginService).stop(); }
/** * @see org.eclipse.jetty.server.handler.HandlerWrapper#doStop() */ @Override protected void doStop() throws Exception { super.doStop(); if (!_loginServiceShared && _loginService instanceof LifeCycle) ((LifeCycle)_loginService).stop(); }
public void stopComponents() throws Exception { Collections.reverse(components); // if Jetty thread is still waiting for a component to start, this should unblock it interrupt(); for (LifeCycle component : components) { if (component.isRunning()) { log.info("Stopping: {}", component); component.stop(); } } components.clear(); stopped.await(); }
@Override protected void doStop() throws Exception { _selectorManager.stop(); ThreadPool threadPool = _threadPool; if (_privateThreadPool && _threadPool != null && threadPool instanceof LifeCycle) ((LifeCycle)threadPool).stop(); super.doStop(); }
@Override protected void doStop() throws Exception { _selectorManager.stop(); ThreadPool threadPool = _threadPool; if (_privateThreadPool && _threadPool != null && threadPool instanceof LifeCycle) ((LifeCycle)threadPool).stop(); super.doStop(); }
@Override protected void doStop() throws Exception { _selectorManager.stop(); ThreadPool threadPool = _threadPool; if (_privateThreadPool && _threadPool != null && threadPool instanceof LifeCycle) ((LifeCycle)threadPool).stop(); super.doStop(); }
@Override public void onClose() { if (LOG.isDebugEnabled()) LOG.debug("HTTP2 Close {} ", this); super.onClose(); LifeCycle.stop(strategy); }
public void stop() throws Exception { ImmutableSet<LifeCycle> managedObjects = ImmutableSet.copyOf(environment.lifecycle().getManagedObjects()); for (LifeCycle managed : Lists.reverse(managedObjects.asList())) { managed.stop(); } }