View Javadoc

    1
    2
    3   /*
    4    * The contents of this file are subject to the terms
    5    * of the Common Development and Distribution License
    6    * (the "License").  You may not use this file except
    7    * in compliance with the License.
    8    *
    9    * You can obtain a copy of the license at
    10   * glassfish/bootstrap/legal/CDDLv1.0.txt or
    11   * https://glassfish.dev.java.net/public/CDDLv1.0.html.
    12   * See the License for the specific language governing
    13   * permissions and limitations under the License.
    14   *
    15   * When distributing Covered Code, include this CDDL
    16   * HEADER in each file and include the License file at
    17   * glassfish/bootstrap/legal/CDDLv1.0.txt.  If applicable,
    18   * add the following below this CDDL HEADER, with the
    19   * fields enclosed by brackets "[]" replaced with your
    20   * own identifying information: Portions Copyright [yyyy]
    21   * [name of copyright owner]
    22   *
    23   * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
    24   *
    25   * Portions Copyright Apache Software Foundation.
    26   */
    27
    28
    29  package javax.servlet;
    30
    31
    32  import java.util.Enumeration;
    33
    34  	 /**
    35  	 *
    36  	 * A filter configuration object used by a servlet container
    37  	 * to pass information to a filter during initialization.
    38  	 * @see Filter
    39  	  * @since	Servlet 2.3
    40  	 *
    41  	 */
    42
    43
    44  public interface FilterConfig {
    45
    46  	/**
    47  	* Returns the filter-name of this filter as defined in the deployment descriptor.
    48  	*/
    49
    50  	public String getFilterName();
    51
    52
    53   /**
    54       * Returns a reference to the {@link ServletContext} in which the caller
    55       * is executing.
    56       *
    57       *
    58       * @return		a {@link ServletContext} object, used
    59       *			by the caller to interact with its servlet
    60       *                  container
    61       *
    62       * @see		ServletContext
    63       *
    64       */
    65
    66      public ServletContext getServletContext();
    67
    68      /**
    69       * Returns a <code>String</code> containing the value of the
    70       * named initialization parameter, or <code>null</code> if
    71       * the parameter does not exist.
    72       *
    73       * @param name	a <code>String</code> specifying the name
    74       *			of the initialization parameter
    75       *
    76       * @return		a <code>String</code> containing the value
    77       *			of the initialization parameter
    78       *
    79       */
    80
    81      public String getInitParameter(String name);
    82
    83
    84      /**
    85       * Returns the names of the filter's initialization parameters
    86       * as an <code>Enumeration</code> of <code>String</code> objects,
    87       * or an empty <code>Enumeration</code> if the filter has
    88       * no initialization parameters.
    89       *
    90       * @return		an <code>Enumeration</code> of <code>String</code>
    91       *			objects containing the names of the filter's
    92       *			initialization parameters
    93       *
    94       *
    95       *
    96       */
    97
    98      public Enumeration getInitParameterNames();
    99
    100
    101
    102
    103 }