tomcat 7 源码分析-13 处理request的Valve和Valve的链表Pipeline
tomcat打开endpoint的监听对通过某种协议,通常下是http的信息进行解析,组装成request,接着给Http11Protocol(ProtocolHandler)和Http11Processor处理。
public void removeValve(Valve valve) { Valve current; if(first == valve) { first = first.getNext(); current = null; } else { current = first; } while (current != null) { if (current.getNext() == valve) { current.setNext(valve.getNext()); break; } current = current.getNext(); } if (first == basic) first = null; if (valve instanceof Contained) ((Contained) valve).setContainer(null); // Stop this valve if necessary if (getState().isAvailable()) { if (valve instanceof Lifecycle) { try { ((Lifecycle) valve).stop(); } catch (LifecycleException e) { log.error("StandardPipeline.removeValve: stop: ", e); } } } try { ((Lifecycle) valve).destroy(); } catch (LifecycleException e) { log.error("StandardPipeline.removeValve: destroy: ", e); } container.fireContainerEvent(Container.REMOVE_VALVE_EVENT, valve); }?