01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package org.apache.coyote;
19:
20: import org.apache.tomcat.util.net.SocketStatus;
21:
22: /**
23: * Adapter. This represents the entry point in a coyote-based servlet container.
24: *
25: *
26: * @author Remy Maucherat
27: * @see ProtocolHandler
28: */
29: public interface Adapter {
30:
31: /**
32: * Call the service method, and notify all listeners
33: *
34: * @exception Exception if an error happens during handling of
35: * the request. Common errors are:
36: * <ul><li>IOException if an input/output error occurs and we are
37: * processing an included servlet (otherwise it is swallowed and
38: * handled by the top level error handler mechanism)
39: * <li>ServletException if a servlet throws an exception and
40: * we are processing an included servlet (otherwise it is swallowed
41: * and handled by the top level error handler mechanism)
42: * </ul>
43: * Tomcat should be able to handle and log any other exception ( including
44: * runtime exceptions )
45: */
46: public void service(Request req, Response res) throws Exception;
47:
48: public boolean event(Request req, Response res, SocketStatus status)
49: throws Exception;
50:
51: }
|