/** * Detaches all request handlers */ public void detach() { if (active != null) { // no request handler should be active at this point log.warn("request handler is still active."); inactiveRequestHandlers.add(active); active = null; } for (IRequestHandler handler : inactiveRequestHandlers) { try { detach(handler); } catch (RuntimeException exception) { throw exception; } catch (Exception exception) { log.error("Error detaching RequestHandler", exception); } } }
/** * Detaches all request handlers */ public void detach() { if (active != null) { // no request handler should be active at this point log.warn("request handler is still active."); inactiveRequestHandlers.add(active); active = null; } for (IRequestHandler handler : inactiveRequestHandlers) { try { detach(handler); } catch (RuntimeException exception) { throw exception; } catch (Exception exception) { log.error("Error detaching RequestHandler", exception); } } }
requestHandlerExecutor.detach();
requestHandlerExecutor.detach();