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
17 package javax.servlet;
18
19 import java.util.Enumeration;
20
21 /**
22 *
23 * A filter configuration object used by a servlet container
24 * to pass information to a filter during initialization.
25 * @see Filter
26 * @since Servlet 2.3
27 *
28 */
29
30 public interface FilterConfig {
31
32 /**
33 * Returns the filter-name of this filter as defined in the deployment descriptor.
34 */
35
36 public String getFilterName();
37
38 /**
39 * Returns a reference to the {@link ServletContext} in which the caller
40 * is executing.
41 *
42 *
43 * @return a {@link ServletContext} object, used
44 * by the caller to interact with its servlet
45 * container
46 *
47 * @see ServletContext
48 *
49 */
50
51 public ServletContext getServletContext();
52
53 /**
54 * Returns a <code>String</code> containing the value of the
55 * named initialization parameter, or <code>null</code> if
56 * the parameter does not exist.
57 *
58 * @param name a <code>String</code> specifying the name
59 * of the initialization parameter
60 *
61 * @return a <code>String</code> containing the value
62 * of the initialization parameter
63 *
64 */
65
66 public String getInitParameter(String name);
67
68 /**
69 * Returns the names of the filter's initialization parameters
70 * as an <code>Enumeration</code> of <code>String</code> objects,
71 * or an empty <code>Enumeration</code> if the filter has
72 * no initialization parameters.
73 *
74 * @return an <code>Enumeration</code> of <code>String</code>
75 * objects containing the names of the filter's
76 * initialization parameters
77 *
78 *
79 *
80 */
81
82 public Enumeration getInitParameterNames();
83
84 }
|