blob: 347720ad2e66118d1b8fa0d5c8fdb8cafd026eb3 [file] [log] [blame]
Michael E. Rodriguezd8af66f2005-12-08 20:55:55 +00001/*
2 * Copyright 1999,2005 The Apache Software Foundation.
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
17package javax.servlet;
18
19import java.util.Enumeration;
20
21
22
23/**
24 *
25 * A servlet configuration object used by a servlet container
26 * used to pass information to a servlet during initialization.
27 *
28 */
29
30public interface ServletConfig {
31
32
33 /**
34 * Returns a reference to the {@link ServletContext} in which the caller
35 * is executing.
36 *
37 *
38 * @return a {@link ServletContext} object, used
39 * by the caller to interact with its servlet
40 * container
41 *
42 * @see ServletContext
43 *
44 */
45
46 public ServletContext getServletContext();
47
48 /**
49 * Returns a <code>String</code> containing the value of the
50 * named initialization parameter, or <code>null</code> if
51 * the parameter does not exist.
52 *
53 * @param name a <code>String</code> specifying the name
54 * of the initialization parameter
55 *
56 * @return a <code>String</code> containing the value
57 * of the initialization parameter
58 *
59 */
60
61 public String getInitParameter(String name);
62
63
64 /**
65 * Returns the names of the servlet's initialization parameters
66 * as an <code>Enumeration</code> of <code>String</code> objects,
67 * or an empty <code>Enumeration</code> if the servlet has
68 * no initialization parameters.
69 *
70 * @return an <code>Enumeration</code> of <code>String</code>
71 * objects containing the names of the servlet's
72 * initialization parameters
73 *
74 *
75 *
76 */
77
78 public Enumeration getInitParameterNames();
79
80
81}