类 MockFilterConfig
- java.lang.Object
- org.springframework.mock.web.MockFilterConfig
- 所有已实现的接口:
FilterConfig
public class MockFilterConfig extends Object implements FilterConfig
Mock implementation of theFilterConfig
interface.Used for testing the web framework; also useful for testing custom
Filter
implementations.- 从以下版本开始:
- 1.0.2
- 作者:
- Juergen Hoeller
- 另请参阅:
MockFilterChain
,PassThroughFilterChain
构造器概要
构造器 构造器 说明 MockFilterConfig()
Create a new MockFilterConfig with a defaultMockServletContext
.MockFilterConfig(String filterName)
Create a new MockFilterConfig with a defaultMockServletContext
.MockFilterConfig(ServletContext servletContext)
Create a new MockFilterConfig.MockFilterConfig(ServletContext servletContext, String filterName)
Create a new MockFilterConfig.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
addInitParameter(String name, String value)
String
getFilterName()
String
getInitParameter(String name)
Enumeration<String>
getInitParameterNames()
ServletContext
getServletContext()
构造器详细资料
MockFilterConfig
public MockFilterConfig()
Create a new MockFilterConfig with a defaultMockServletContext
.
MockFilterConfig
public MockFilterConfig(String filterName)
Create a new MockFilterConfig with a defaultMockServletContext
.- 参数:
filterName
- the name of the filter
MockFilterConfig
public MockFilterConfig(ServletContext servletContext)
Create a new MockFilterConfig.- 参数:
servletContext
- the ServletContext that the servlet runs in
MockFilterConfig
public MockFilterConfig(ServletContext servletContext, String filterName)
Create a new MockFilterConfig.- 参数:
servletContext
- the ServletContext that the servlet runs infilterName
- the name of the filter
方法详细资料
getFilterName
public String getFilterName()
- 指定者:
getFilterName
在接口中FilterConfig
getServletContext
public ServletContext getServletContext()
- 指定者:
getServletContext
在接口中FilterConfig
addInitParameter
public void addInitParameter(String name, String value)
getInitParameter
public String getInitParameter(String name)
- 指定者:
getInitParameter
在接口中FilterConfig
getInitParameterNames
public Enumeration<String> getInitParameterNames()
- 指定者:
getInitParameterNames
在接口中FilterConfig