Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/apache/ajp/AjpHandler.java


1   /*
2    *  Copyright 1999-2004 The Apache Software Foundation
3    *
4    *  Licensed under the Apache License, Version 2.0 (the "License");
5    *  you may not use this file except in compliance with the License.
6    *  You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *  Unless required by applicable law or agreed to in writing, software
11   *  distributed under the License is distributed on an "AS IS" BASIS,
12   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *  See the License for the specific language governing permissions and
14   *  limitations under the License.
15   */
16  
17  package org.apache.ajp;
18  
19  import java.io.IOException;
20  
21  import org.apache.tomcat.util.http.BaseRequest;
22  
23  /**
24   * Base class for handlers of Ajp messages. Jk provide a simple bidirectional 
25   * communication mechanism between the web server and a servlet container. It is
26   * based on messages that are passed between the 2 server, using a single
27   * thread on each side.
28   *
29   * The container side must be able to deal with at least the "REQUEST FORWARD",
30   * the server side must be able to deal with at least "HEADERS", "BODY",
31   * "END" messages.
32   *
33   * @author Henri Gomez
34   * @author Costin Manolache
35   */
36  public class AjpHandler
37  {
38      public static final int UNKNOWN=-1;
39      Ajp13 channel;
40      
41      public void init( Ajp13 channel ) {
42          this.channel=channel;
43      }
44      
45      /** Execute the callback 
46       */
47      public int handleAjpMessage( int type, Ajp13 channel,
48           Ajp13Packet ajp, BaseRequest req )
49    throws IOException
50      {
51    return UNKNOWN;
52      }
53  }