]> WPIA git - gigi.git/blob - lib/servlet-api/javax/servlet/ServletConfig.java
Merge "upd: remove 'browser install'"
[gigi.git] / lib / servlet-api / javax / servlet / ServletConfig.java
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements.  See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License.  You may obtain a copy of the License at
8  *
9  *     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 package javax.servlet;
18
19 import java.util.Enumeration;
20
21 /**
22  * A servlet configuration object used by a servlet container to pass
23  * information to a servlet during initialization.
24  */
25 public interface ServletConfig {
26
27     /**
28      * Returns the name of this servlet instance. The name may be provided via
29      * server administration, assigned in the web application deployment
30      * descriptor, or for an unregistered (and thus unnamed) servlet instance it
31      * will be the servlet's class name.
32      *
33      * @return the name of the servlet instance
34      */
35     public String getServletName();
36
37     /**
38      * Returns a reference to the {@link ServletContext} in which the caller is
39      * executing.
40      *
41      * @return a {@link ServletContext} object, used by the caller to interact
42      *         with its servlet container
43      * @see ServletContext
44      */
45     public ServletContext getServletContext();
46
47     /**
48      * Returns a <code>String</code> containing the value of the named
49      * initialization parameter, or <code>null</code> if the parameter does not
50      * exist.
51      *
52      * @param name
53      *            a <code>String</code> specifying the name of the
54      *            initialization parameter
55      * @return a <code>String</code> containing the value of the initialization
56      *         parameter
57      */
58     public String getInitParameter(String name);
59
60     /**
61      * Returns the names of the servlet's initialization parameters as an
62      * <code>Enumeration</code> of <code>String</code> objects, or an empty
63      * <code>Enumeration</code> if the servlet has no initialization parameters.
64      *
65      * @return an <code>Enumeration</code> of <code>String</code> objects
66      *         containing the names of the servlet's initialization parameters
67      */
68     public Enumeration<String> getInitParameterNames();
69 }