首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

tomcat 七 源码分析-13 处理request的Valve和Valve的链表Pipeline

2012-09-17 
tomcat 7 源码分析-13 处理request的Valve和Valve的链表Pipelinetomcat打开endpoint的监听对通过某种协议,

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);    }
?

热点排行