Package org.apache.catalina.core
Class ApplicationFilterRegistration
java.lang.Object
org.apache.catalina.core.ApplicationFilterRegistration
- All Implemented Interfaces:
FilterRegistration
,FilterRegistration.Dynamic
,Registration
,Registration.Dynamic
-
Nested Class Summary
Nested classes/interfaces inherited from interface javax.servlet.FilterRegistration
FilterRegistration.Dynamic
Nested classes/interfaces inherited from interface javax.servlet.Registration
Registration.Dynamic
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMappingForServletNames
(EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter, String... servletNames) Add a mapping for this filter to one or more named Servlets.void
addMappingForUrlPatterns
(EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter, String... urlPatterns) Add a mapping for this filter to one or more URL patterns.Obtain the name of the implementation class for the Servlet.getInitParameter
(String name) Get the value of an initialisation parameter.Get the names and values of all the initialisation parameters.getName()
Obtain the name of the Servlet.Gets the currently available servlet name mappings of the Filter represented by this FilterRegistration.Gets the currently available URL pattern mappings of the Filter represented by this FilterRegistration.void
setAsyncSupported
(boolean asyncSupported) Mark this Servlet/Filter as supported asynchronous processing.boolean
setInitParameter
(String name, String value) Add an initialisation parameter if not already added.setInitParameters
(Map<String, String> initParameters) Add multiple initialisation parameters.
-
Constructor Details
-
ApplicationFilterRegistration
-
-
Method Details
-
addMappingForServletNames
public void addMappingForServletNames(EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter, String... servletNames) Description copied from interface:javax.servlet.FilterRegistration
Add a mapping for this filter to one or more named Servlets.- Specified by:
addMappingForServletNames
in interfaceFilterRegistration
- Parameters:
dispatcherTypes
- The dispatch types to which this filter should applyisMatchAfter
- Should this filter be applied after any mappings defined in the deployment descriptor (true
) or before?servletNames
- Requests mapped to these servlets will be processed by this filter
-
addMappingForUrlPatterns
public void addMappingForUrlPatterns(EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter, String... urlPatterns) Description copied from interface:javax.servlet.FilterRegistration
Add a mapping for this filter to one or more URL patterns.- Specified by:
addMappingForUrlPatterns
in interfaceFilterRegistration
- Parameters:
dispatcherTypes
- The dispatch types to which this filter should applyisMatchAfter
- Should this filter be applied after any mappings defined in the deployment descriptor (true
) or before?urlPatterns
- The URL patterns to which this filter should be applied
-
getServletNameMappings
Description copied from interface:javax.servlet.FilterRegistration
Gets the currently available servlet name mappings of the Filter represented by this FilterRegistration.- Specified by:
getServletNameMappings
in interfaceFilterRegistration
- Returns:
- a Collection of the Servlet name mappings
-
getUrlPatternMappings
Description copied from interface:javax.servlet.FilterRegistration
Gets the currently available URL pattern mappings of the Filter represented by this FilterRegistration.- Specified by:
getUrlPatternMappings
in interfaceFilterRegistration
- Returns:
- a Collection of the URL pattern mappings
-
getClassName
Description copied from interface:javax.servlet.Registration
Obtain the name of the implementation class for the Servlet.- Specified by:
getClassName
in interfaceRegistration
- Returns:
- the name of the implementation class for the Servlet.
-
getInitParameter
Description copied from interface:javax.servlet.Registration
Get the value of an initialisation parameter.- Specified by:
getInitParameter
in interfaceRegistration
- Parameters:
name
- The initialisation parameter whose value is required- Returns:
- The value of the named initialisation parameter
-
getInitParameters
Description copied from interface:javax.servlet.Registration
Get the names and values of all the initialisation parameters.- Specified by:
getInitParameters
in interfaceRegistration
- Returns:
- A Map of initialisation parameter names and associated values keyed by name
-
getName
Description copied from interface:javax.servlet.Registration
Obtain the name of the Servlet.- Specified by:
getName
in interfaceRegistration
- Returns:
- the name of the Servlet.
-
setInitParameter
Description copied from interface:javax.servlet.Registration
Add an initialisation parameter if not already added.- Specified by:
setInitParameter
in interfaceRegistration
- Parameters:
name
- Name of initialisation parametervalue
- Value of initialisation parameter- Returns:
true
if the initialisation parameter was set,false
if the initialisation parameter was not set because an initialisation parameter of the same name already existed
-
setInitParameters
Description copied from interface:javax.servlet.Registration
Add multiple initialisation parameters. If any of the supplied initialisation parameter conflicts with an existing initialisation parameter, no updates will be performed.- Specified by:
setInitParameters
in interfaceRegistration
- Parameters:
initParameters
- The initialisation parameters to add- Returns:
- The set of initialisation parameter names that conflicted with existing initialisation parameter. If there are no conflicts, this Set will be empty.
-
setAsyncSupported
public void setAsyncSupported(boolean asyncSupported) Description copied from interface:javax.servlet.Registration.Dynamic
Mark this Servlet/Filter as supported asynchronous processing.- Specified by:
setAsyncSupported
in interfaceRegistration.Dynamic
- Parameters:
asyncSupported
- Should this Servlet/Filter support asynchronous processing
-