org.chwf.servlet.filter
Class FilterInfo

java.lang.Object
  |
  +--org.chwf.servlet.filter.FilterInfo
All Implemented Interfaces:
javax.servlet.FilterConfig

public class FilterInfo
extends java.lang.Object
implements javax.servlet.FilterConfig

Class containing info for filter and a reference to the filter object itself. It also serves as the implementation class for FilterConfig.

Author:
Paul Strack

Constructor Summary
FilterInfo(java.lang.String name, AllFilterConfig allFilterConfig)
          Constructor.
 
Method Summary
 javax.servlet.Filter getFilter()
          The filter object.
 java.lang.String getFilterName()
          Returns the filter-name of this filter as defined in the deployment descriptor.
 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 getInitParameterNames()
          Returns the names of the servlet's initialization parameters as an Enumeration of String objects, or an empty Enumeration if the servlet has no initialization parameters.
 javax.servlet.ServletContext getServletContext()
          Returns a reference to the ServletContext in which the caller is executing.
 boolean isMatch(java.lang.String contextFreeURI)
          True if the given URI matches (one of) the filter patterns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterInfo

public FilterInfo(java.lang.String name,
                  AllFilterConfig allFilterConfig)
           throws javax.servlet.ServletException
Constructor.
Parameters:
name - The filter name.
allFilterConfig - Containing configuration for all filters.
Throws:
javax.servlet.ServletException - If the filter cannot be initialized
Method Detail

getFilter

public javax.servlet.Filter getFilter()
The filter object.
Returns:
The filter object.

getFilterName

public java.lang.String getFilterName()
Returns the filter-name of this filter as defined in the deployment descriptor.
Specified by:
getFilterName in interface javax.servlet.FilterConfig
Returns:
The filter-name.

getInitParameter

public 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.
Specified by:
getInitParameter in interface javax.servlet.FilterConfig
Parameters:
name - A String specifying the name of the initialization parameter.
Returns:
A String containing the value of the initialization parameter.

getServletContext

public javax.servlet.ServletContext getServletContext()
Returns a reference to the ServletContext in which the caller is executing.
Specified by:
getServletContext in interface javax.servlet.FilterConfig
Returns:
The ServletContext.

getInitParameterNames

public java.util.Enumeration getInitParameterNames()
Returns the names of the servlet's initialization parameters as an Enumeration of String objects, or an empty Enumeration if the servlet has no initialization parameters.
Specified by:
getInitParameterNames in interface javax.servlet.FilterConfig
Returns:
An Enumeration of String objects containing the names of the servlet's initialization parameters.

isMatch

public boolean isMatch(java.lang.String contextFreeURI)
True if the given URI matches (one of) the filter patterns.
Parameters:
contextFreeURI - The (context-free) URI.
Returns:
True if the URI matches the filter patterns.


Copyright © 2002-2004, Paul Strack. All Rights Reserved.