FileDocCategorySizeDatePackage
StandardEngineValve.javaAPI DocApache Tomcat 6.0.144235Fri Jul 20 04:20:30 BST 2007org.apache.catalina.core

StandardEngineValve

public final class StandardEngineValve extends org.apache.catalina.valves.ValveBase
Valve that implements the default basic behavior for the StandardEngine container implementation.

USAGE CONSTRAINT: This implementation is likely to be useful only when processing HTTP requests.

author
Craig R. McClanahan
version
$Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $

Fields Summary
private static final String
info
The descriptive information related to this implementation.
private static final org.apache.catalina.util.StringManager
sm
The string manager for this package.
Constructors Summary
Methods Summary
public final voidevent(org.apache.catalina.connector.Request request, org.apache.catalina.connector.Response response, org.apache.catalina.CometEvent event)
Process Comet event.

param
request Request to be processed
param
response Response to be produced
param
valveContext Valve context used to forward to the next Valve
exception
IOException if an input/output error occurred
exception
ServletException if a servlet error occurred


        // Ask this Host to process this request
        request.getHost().getPipeline().getFirst().event(request, response, event);

    
public java.lang.StringgetInfo()
Return descriptive information about this Valve implementation.



    // ------------------------------------------------------------- Properties


                
       

        return (info);

    
public final voidinvoke(org.apache.catalina.connector.Request request, org.apache.catalina.connector.Response response)
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
param
valveContext Valve context used to forward to the next Valve
exception
IOException if an input/output error occurred
exception
ServletException if a servlet error occurred


        // Select the Host to be used for this Request
        Host host = request.getHost();
        if (host == null) {
            response.sendError
                (HttpServletResponse.SC_BAD_REQUEST,
                 sm.getString("standardEngine.noHost", 
                              request.getServerName()));
            return;
        }

        // Ask this Host to process this request
        host.getPipeline().getFirst().invoke(request, response);