01 /*
02 * Copyright 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 package javax.servlet;
17
18 import java.io.IOException;
19
20 /**
21 * A FilterChain is an object provided by the servlet container to the developer
22 * giving a view into the invocation chain of a filtered request for a resource. Filters
23 * use the FilterChain to invoke the next filter in the chain, or if the calling filter
24 * is the last filter in the chain, to invoke the resource at the end of the chain.
25 *
26 * @see Filter
27 * @since Servlet 2.3
28 **/
29
30 public interface FilterChain {
31
32 /**
33 * Causes the next filter in the chain to be invoked, or if the calling filter is the last filter
34 * in the chain, causes the resource at the end of the chain to be invoked.
35 *
36 * @param request the request to pass along the chain.
37 * @param response the response to pass along the chain.
38 *
39 * @since 2.3
40 */
41
42 public void doFilter(ServletRequest request,
43 ServletResponse response) throws IOException,
44 ServletException;
45
46 }
|