tomcat 中StandardEngineValve 类的源码分析:
1、源码如下:
final class StandardEngineValve extends ValveBase {
//------------------------------------------------------ Constructor
public StandardEngineValve() {
super(true);
}
// --------------------------------------------------------- Public Methods
/**
* Select the appropriate child Host to process this request,
* based on the requested server name. If no matching Host can
* be found, return an appropriate HTTP error.
*
* @param request Request to be processed
* @param response Response to be produced
*
* @exception IOException if an input/output error occurred
* @exception ServletException if a servlet error occurred
*/
@Override
public final void invoke(Request request, Response response)
throws IOException, ServletException {
// Select the Host to be used for this Request