1 /* 2 * Copyright 2005 Joe Walker 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 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 /** 31 * Handle a URL request that has been mapped to this Handler 32 * @param request The HTTP request data 33 * @param response Where we write the HTTP response data 34 * @throws IOException If the write process fails 35 */ 36 public void handle(HttpServletRequest request, HttpServletResponse response) throws IOException; 37 } 38