类 MockFilterConfig

java.lang.Object
cn.taketoday.mock.web.MockFilterConfig
所有已实现的接口:
jakarta.servlet.FilterConfig

public class MockFilterConfig extends Object implements jakarta.servlet.FilterConfig
Mock implementation of the FilterConfig interface.

Used for testing the web framework; also useful for testing custom Filter implementations.

从以下版本开始:
4.0
作者:
Juergen Hoeller
另请参阅:
  • 字段详细资料

    • servletContext

      private final jakarta.servlet.ServletContext servletContext
    • filterName

      private final String filterName
    • initParameters

      private final Map<String,String> initParameters
  • 构造器详细资料

    • MockFilterConfig

      public MockFilterConfig()
      Create a new MockFilterConfig with a default MockServletContext.
    • MockFilterConfig

      public MockFilterConfig(String filterName)
      Create a new MockFilterConfig with a default MockServletContext.
      参数:
      filterName - the name of the filter
    • MockFilterConfig

      public MockFilterConfig(@Nullable jakarta.servlet.ServletContext servletContext)
      Create a new MockFilterConfig.
      参数:
      servletContext - the ServletContext that the servlet runs in
    • MockFilterConfig

      public MockFilterConfig(@Nullable jakarta.servlet.ServletContext servletContext, String filterName)
      Create a new MockFilterConfig.
      参数:
      servletContext - the ServletContext that the servlet runs in
      filterName - the name of the filter
  • 方法详细资料

    • getFilterName

      public String getFilterName()
      指定者:
      getFilterName 在接口中 jakarta.servlet.FilterConfig
    • getServletContext

      public jakarta.servlet.ServletContext getServletContext()
      指定者:
      getServletContext 在接口中 jakarta.servlet.FilterConfig
    • addInitParameter

      public void addInitParameter(String name, String value)
    • getInitParameter

      public String getInitParameter(String name)
      指定者:
      getInitParameter 在接口中 jakarta.servlet.FilterConfig
    • getInitParameterNames

      public Enumeration<String> getInitParameterNames()
      指定者:
      getInitParameterNames 在接口中 jakarta.servlet.FilterConfig