public class ApplicationFilterRegistration extends Object implements FilterRegistration.Dynamic
FilterRegistration.Dynamic| Constructor and Description |
|---|
ApplicationFilterRegistration(FilterDef filterDef,
Context context) |
| Modifier and Type | Method and Description |
|---|---|
void |
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.
|
String |
getClassName()
Obtain the name of the implementation class for the Servlet.
|
String |
getInitParameter(String name)
Get the value of an initialisation parameter.
|
Map<String,String> |
getInitParameters()
Get the names and values of all the initialisation parameters.
|
String |
getName()
Obtain the name of the Servlet.
|
Collection<String> |
getServletNameMappings()
Gets the currently available servlet name mappings of the Filter
represented by this FilterRegistration.
|
Collection<String> |
getUrlPatternMappings()
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.
|
Set<String> |
setInitParameters(Map<String,String> initParameters)
Add multiple initialisation parameters.
|
public void addMappingForServletNames(EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter, String... servletNames)
javax.servlet.FilterRegistrationaddMappingForServletNames in interface FilterRegistrationdispatcherTypes - 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 filterpublic void addMappingForUrlPatterns(EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter, String... urlPatterns)
javax.servlet.FilterRegistrationaddMappingForUrlPatterns in interface FilterRegistrationdispatcherTypes - 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
appliedpublic Collection<String> getServletNameMappings()
javax.servlet.FilterRegistrationgetServletNameMappings in interface FilterRegistrationpublic Collection<String> getUrlPatternMappings()
javax.servlet.FilterRegistrationgetUrlPatternMappings in interface FilterRegistrationpublic String getClassName()
javax.servlet.RegistrationgetClassName in interface Registrationpublic String getInitParameter(String name)
javax.servlet.RegistrationgetInitParameter in interface Registrationname - The initialisation parameter whose value is requiredpublic Map<String,String> getInitParameters()
javax.servlet.RegistrationgetInitParameters in interface Registrationpublic String getName()
javax.servlet.RegistrationgetName in interface Registrationpublic boolean setInitParameter(String name, String value)
javax.servlet.RegistrationsetInitParameter in interface Registrationname - Name of initialisation parametervalue - Value of initialisation parametertrue if the initialisation parameter was set,
false if the initialisation parameter was not set
because an initialisation parameter of the same name already
existedpublic Set<String> setInitParameters(Map<String,String> initParameters)
javax.servlet.RegistrationsetInitParameters in interface RegistrationinitParameters - The initialisation parameters to addpublic void setAsyncSupported(boolean asyncSupported)
javax.servlet.Registration.DynamicsetAsyncSupported in interface Registration.DynamicasyncSupported - Should this Servlet/Filter support
asynchronous processingCopyright © 2000-2022 Apache Software Foundation. All Rights Reserved.