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