tomcat principle

tomcat principle

在httpconnector,及 Httpprocesser中,run方法都是循环的。
因为在线程中,如果run方法执行完成之后,这个线程就无法被再次执行。
所以在这2个线程中,全部采用循环的处理方式。这样处理之后,在压入到stack中,才用意义。

Httpprocessor中,构造函数是什么时候被执行的。因为该构造函数中有new request等操作。
答:在Connector中,有一个new process的操作。传人public HttpProcessor(HttpConnector connector, int id) 2个参数。

猜你喜欢

转载自sunsteven.iteye.com/blog/1613739