public class MockFilterConfig extends Object implements FilterConfig
FilterConfig interface.
Used for testing the web framework; also useful for testing
custom Filter implementations.
MockFilterChain,
PassThroughFilterChain| Constructor and Description |
|---|
MockFilterConfig()
Create a new MockFilterConfig with a default
MockServletContext. |
MockFilterConfig(ServletContext servletContext)
Create a new MockFilterConfig.
|
MockFilterConfig(ServletContext servletContext,
String filterName)
Create a new MockFilterConfig.
|
MockFilterConfig(String filterName)
Create a new MockFilterConfig with a default
MockServletContext. |
| Modifier and Type | Method and Description |
|---|---|
void |
addInitParameter(String name,
String value) |
String |
getFilterName() |
String |
getInitParameter(String name) |
Enumeration<String> |
getInitParameterNames() |
ServletContext |
getServletContext() |
public MockFilterConfig()
MockServletContext.public MockFilterConfig(String filterName)
MockServletContext.filterName - the name of the filterpublic MockFilterConfig(ServletContext servletContext)
servletContext - the ServletContext that the servlet runs inpublic MockFilterConfig(ServletContext servletContext, String filterName)
servletContext - the ServletContext that the servlet runs infilterName - the name of the filterpublic String getFilterName()
getFilterName in interface FilterConfigpublic ServletContext getServletContext()
getServletContext in interface FilterConfigpublic String getInitParameter(String name)
getInitParameter in interface FilterConfigpublic Enumeration<String> getInitParameterNames()
getInitParameterNames in interface FilterConfig