public class ApplicationFilterRegistration extends java.lang.Object implements FilterRegistration.Dynamic
FilterRegistration.Dynamic
Constructor and Description |
---|
ApplicationFilterRegistration(FilterDef filterDef,
Context context) |
Modifier and Type | Method and Description |
---|---|
void |
addMappingForServletNames(java.util.EnumSet<DispatcherType> dispatcherTypes,
boolean isMatchAfter,
java.lang.String... servletNames)
Add a mapping for this filter to one or more named Servlets.
|
void |
addMappingForUrlPatterns(java.util.EnumSet<DispatcherType> dispatcherTypes,
boolean isMatchAfter,
java.lang.String... urlPatterns)
Add a mapping for this filter to one or more URL patterns.
|
java.lang.String |
getClassName() |
java.lang.String |
getInitParameter(java.lang.String name)
Get the value of an initialisation parameter.
|
java.util.Map<java.lang.String,java.lang.String> |
getInitParameters()
Get the names and values of all the initialisation parameters.
|
java.lang.String |
getName() |
java.util.Collection<java.lang.String> |
getServletNameMappings() |
java.util.Collection<java.lang.String> |
getUrlPatternMappings() |
void |
setAsyncSupported(boolean asyncSupported)
Mark this Servlet/Filter as supported asynchronous processing.
|
boolean |
setInitParameter(java.lang.String name,
java.lang.String value)
Add an initialisation parameter if not already added.
|
java.util.Set<java.lang.String> |
setInitParameters(java.util.Map<java.lang.String,java.lang.String> initParameters)
Add multiple initialisation parameters.
|
public void addMappingForServletNames(java.util.EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter, java.lang.String... servletNames)
javax.servlet.FilterRegistration
addMappingForServletNames
in interface FilterRegistration
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 filterpublic void addMappingForUrlPatterns(java.util.EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter, java.lang.String... urlPatterns)
javax.servlet.FilterRegistration
addMappingForUrlPatterns
in interface FilterRegistration
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
appliedpublic java.util.Collection<java.lang.String> getServletNameMappings()
getServletNameMappings
in interface FilterRegistration
public java.util.Collection<java.lang.String> getUrlPatternMappings()
getUrlPatternMappings
in interface FilterRegistration
public java.lang.String getClassName()
getClassName
in interface Registration
public java.lang.String getInitParameter(java.lang.String name)
javax.servlet.Registration
getInitParameter
in interface Registration
name
- The initialisation parameter whose value is requiredpublic java.util.Map<java.lang.String,java.lang.String> getInitParameters()
javax.servlet.Registration
getInitParameters
in interface Registration
public java.lang.String getName()
getName
in interface Registration
public boolean setInitParameter(java.lang.String name, java.lang.String value)
javax.servlet.Registration
setInitParameter
in interface Registration
name
- 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 java.util.Set<java.lang.String> setInitParameters(java.util.Map<java.lang.String,java.lang.String> initParameters)
javax.servlet.Registration
setInitParameters
in interface Registration
initParameters
- The initialisation parameters to addpublic void setAsyncSupported(boolean asyncSupported)
javax.servlet.Registration.Dynamic
setAsyncSupported
in interface Registration.Dynamic
asyncSupported
- Should this Servlet/Filter support
asynchronous processingCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.