01: /*
02: * Copyright 2005 Joe Walker
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: package org.directwebremoting.extend;
17:
18: import java.io.IOException;
19:
20: import javax.servlet.http.HttpServletRequest;
21: import javax.servlet.http.HttpServletResponse;
22:
23: /**
24: * A handler is a very simple servlet that does not differentiate between GET
25: * and POST, or need complex setup beyond what the container can provide
26: * @author Joe Walker [joe at getahead dot ltd dot uk]
27: */
28: public interface Handler {
29: /**
30: * Handle a URL request that has been mapped to this Handler
31: * @param request The HTTP request data
32: * @param response Where we write the HTTP response data
33: * @throws IOException If the write process fails
34: */
35: public void handle(HttpServletRequest request,
36: HttpServletResponse response) throws IOException;
37: }
|