Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Licensed to the Apache Software Foundation (ASF) under one or more
   * contributor license agreements.  See the NOTICE file distributed with
   * this work for additional information regarding copyright ownership.
   * The ASF licenses this file to You under the Apache License, Version 2.0
   * (the "License"); you may not use this file except in compliance with
   * the License.  You may obtain a copy of the License at
   * 
   *      http://www.apache.org/licenses/LICENSE-2.0
  * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 
 
 package org.apache.catalina.core;
 
 
 import static org.jboss.web.CatalinaMessages.MESSAGES;
 
 
 
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(s):
Craig R. McClanahan
Version:
$Revision: 699 $ $Date: 2008-07-04 10:36:15 +0200 (Fri, 04 Jul 2008) $
 
 
 final class StandardEngineValve
     extends ValveBase {
 
 
     // ----------------------------------------------------- Instance Variables
 

    
The descriptive information related to this implementation.
 
     private static final String info =
         "org.apache.catalina.core.StandardEngineValve/1.0";
 
 
     // ------------------------------------------------------------- Properties
 

    
Return descriptive information about this Valve implementation.
 
     public String getInfo() {
 
         return ();
 
     }
 
 
     // --------------------------------------------------------- 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.

Parameters:
request Request to be processed
response Response to be produced
valveContext Valve context used to forward to the next Valve
Throws:
java.io.IOException if an input/output error occurred
javax.servlet.ServletException if a servlet error occurred
 
     public final void invoke(Request requestResponse response)
         throws IOExceptionServletException {
 
         // Select the Host to be used for this Request
         Host host = request.getHost();
         if (host == null) {
             response.sendError
                 (.,
                  .noHost(request.getServerName()));
             return;
         }
        // Ask this Host to process this request
        host.getPipeline().getFirst().invoke(requestresponse);
    }


    
Process Comet event.

Parameters:
request Request to be processed
response Response to be produced
valveContext Valve context used to forward to the next Valve
Throws:
java.io.IOException if an input/output error occurred
javax.servlet.ServletException if a servlet error occurred
    public final void event(Request requestResponse responseHttpEvent event)
        throws IOExceptionServletException {
        // Ask this Host to process this request
        request.getHost().getPipeline().getFirst().event(requestresponseevent);
    }
New to GrepCode? Check out our FAQ X