public abstract class GenericFilter extends java.lang.Object implements Filter, FilterConfig, java.io.Serializable
| Constructor and Description |
|---|
GenericFilter() |
| Modifier and Type | Method and Description |
|---|---|
FilterConfig |
getFilterConfig()
Obtain the FilterConfig used to initialise this Filter instance.
|
java.lang.String |
getFilterName()
Get the name of the filter.
|
java.lang.String |
getInitParameter(java.lang.String name)
Returns a
String containing the value of the named
initialization parameter, or null if the parameter does not
exist. |
java.util.Enumeration<java.lang.String> |
getInitParameterNames()
Returns the names of the filter's initialization parameters as an
Enumeration of String objects, or an empty
Enumeration if the filter has no initialization parameters. |
ServletContext |
getServletContext()
Returns a reference to the
ServletContext in which the caller is
executing. |
void |
init()
Convenience method for sub-classes to save them having to call
super.init(config). |
void |
init(FilterConfig filterConfig)
Called by the web container to indicate to a filter that it is being
placed into service.
|
public java.lang.String getInitParameter(java.lang.String name)
FilterConfigString containing the value of the named
initialization parameter, or null if the parameter does not
exist.getInitParameter in interface FilterConfigname - String specifying the name of the initialization
parameterString containing the value of the initialization
parameterpublic java.util.Enumeration<java.lang.String> getInitParameterNames()
FilterConfigEnumeration of String objects, or an empty
Enumeration if the filter has no initialization parameters.getInitParameterNames in interface FilterConfigEnumeration of String objects
containing the names of the filter's initialization parameterspublic FilterConfig getFilterConfig()
init(FilterConfig)
methodpublic ServletContext getServletContext()
FilterConfigServletContext in which the caller is
executing.getServletContext in interface FilterConfigServletContext object, used by the caller to interact
with its servlet containerServletContextpublic void init(FilterConfig filterConfig) throws ServletException
FilterThe web container cannot place the filter into service if the init method either:
init in interface FilterfilterConfig - The configuration information associated with the
filter instance being initialisedServletException - if the initialisation failspublic void init()
throws ServletException
super.init(config). This is a NO-OP by default.ServletException - If an exception occurs that interrupts the
Filter's normal operationpublic java.lang.String getFilterName()
FilterConfiggetFilterName in interface FilterConfigCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.