01: /*
02: * Copyright 1999-2004 The Apache Software Foundation
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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: public static final int UNKNOWN = -1;
38: Ajp13 channel;
39:
40: public void init(Ajp13 channel) {
41: this .channel = channel;
42: }
43:
44: /** Execute the callback
45: */
46: public int handleAjpMessage(int type, Ajp13 channel,
47: Ajp13Packet ajp, BaseRequest req) throws IOException {
48: return UNKNOWN;
49: }
50: }
|