com.caucho.server.dispatch
Class FilterMapping

java.lang.Object
  extended by com.caucho.server.dispatch.FilterConfigImpl
      extended by com.caucho.server.dispatch.FilterMapping
All Implemented Interfaces:
FilterConfig, FilterRegistration, FilterRegistration.Dynamic, Registration, Registration.Dynamic

public class FilterMapping
extends FilterConfigImpl

Configuration for a filter.


Nested Class Summary
 class FilterMapping.URLPattern
           
 
Nested classes/interfaces inherited from interface javax.servlet.FilterRegistration
FilterRegistration.Dynamic
 
Constructor Summary
FilterMapping()
          Creates a new filter mapping object.
 
Method Summary
 void addDispatcher(DispatcherType dispather)
           
 void addDispatcher(java.lang.String dispatcher)
          Adds a dispatcher.
 void addServletName(java.lang.String servletName)
          Sets the servlet name
 FilterMapping.URLPattern createUrlPattern()
          Sets the url pattern
 java.util.ArrayList<java.lang.String> getServletNames()
           
 java.lang.String getURLPattern()
          Gets the url pattern
 java.util.HashSet<java.lang.String> getURLPatterns()
           
 boolean isError()
          True if the dispatcher is for ERROR.
 boolean isForward()
          True if the dispatcher is for FORWARD.
 boolean isInclude()
          True if the dispatcher is for INCLUDE.
 boolean isMatch(java.lang.String servletPath, java.lang.String pathInfo)
          Returns true if the filter map matches the servlet path and path info.
 boolean isRequest()
          True if the dispatcher is for REQUEST.
 void setURLRegexp(java.lang.String pattern)
          Sets the url regexp
 java.lang.String toString()
          Returns a printable representation of the filter config object.
 
Methods inherited from class com.caucho.server.dispatch.FilterConfigImpl
addMappingForServletNames, addMappingForUrlPatterns, getClassName, getDisplayName, getFilter, getFilterClass, getFilterClassName, getFilterManager, getFilterName, getInit, getInitParameter, getInitParameterNames, getInitParameters, getInitParamMap, getName, getServletContext, getServletNameMappings, getUrlPatternMappings, isAsyncSupported, setAsyncSupported, setDescription, setDisplayName, setFilter, setFilterClass, setFilterClass, setFilterManager, setFilterName, setIcon, setId, setInit, setInitParam, setInitParam, setInitParameter, setInitParameters, setServletContext, setWebApp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FilterMapping

public FilterMapping()
Creates a new filter mapping object.

Method Detail

createUrlPattern

public FilterMapping.URLPattern createUrlPattern()
                                          throws ServletException
Sets the url pattern

Throws:
ServletException

getURLPattern

public java.lang.String getURLPattern()
Gets the url pattern


getURLPatterns

public java.util.HashSet<java.lang.String> getURLPatterns()

setURLRegexp

public void setURLRegexp(java.lang.String pattern)
                  throws ServletException
Sets the url regexp

Throws:
ServletException

addServletName

public void addServletName(java.lang.String servletName)
Sets the servlet name


getServletNames

public java.util.ArrayList<java.lang.String> getServletNames()

addDispatcher

public void addDispatcher(java.lang.String dispatcher)
                   throws ConfigException
Adds a dispatcher.

Throws:
ConfigException

addDispatcher

public void addDispatcher(DispatcherType dispather)

isRequest

public boolean isRequest()
True if the dispatcher is for REQUEST.


isInclude

public boolean isInclude()
True if the dispatcher is for INCLUDE.


isForward

public boolean isForward()
True if the dispatcher is for FORWARD.


isError

public boolean isError()
True if the dispatcher is for ERROR.


isMatch

public boolean isMatch(java.lang.String servletPath,
                       java.lang.String pathInfo)
Returns true if the filter map matches the servlet path and path info.


toString

public java.lang.String toString()
Returns a printable representation of the filter config object.

Overrides:
toString in class FilterConfigImpl