Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.mock.web
Class MockFilterConfig

    java.lang.Object
      org.springframework.mock.web.MockFilterConfig

All Implemented Interfaces:
  FilterConfig

    public class MockFilterConfig

extends Object
implements FilterConfig

Mock implementation of the `FilterConfig` interface.

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

Since:
  1.0.2
Author:
  Juergen Hoeller
See Also:
  `MockFilterChain`, `PassThroughFilterChain`

Constructor Summary
`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`.

Method Summary
`void` | `addInitParameter(String name, String value)`
`String` | `getFilterName()`
`String` | `getInitParameter(String name)`
`Enumeration<String>` | `getInitParameterNames()`
`ServletContext` | `getServletContext()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MockFilterConfig

    public MockFilterConfig()

  Create a new MockFilterConfig with a default `MockServletContext`.

### MockFilterConfig

    public MockFilterConfig(String filterName)

  Create a new MockFilterConfig with a default `MockServletContext`.

  Parameters:
    `filterName` - the name of the filter

### MockFilterConfig

    public MockFilterConfig(ServletContext servletContext)

  Create a new MockFilterConfig.

  Parameters:
    `servletContext` - the ServletContext that the servlet runs in

### MockFilterConfig

    public MockFilterConfig(ServletContext servletContext,
                            String filterName)

  Create a new MockFilterConfig.

  Parameters:
    `servletContext` - the ServletContext that the servlet runs in
    `filterName` - the name of the filter

Method Detail

### getFilterName

    public String getFilterName()

  Specified by:
    `getFilterName` in interface `FilterConfig`

### getServletContext

    public ServletContext getServletContext()

  Specified by:
    `getServletContext` in interface `FilterConfig`

### addInitParameter

    public void addInitParameter(String name,
                                 String value)

### getInitParameter

    public String getInitParameter(String name)

  Specified by:
    `getInitParameter` in interface `FilterConfig`

### getInitParameterNames

    public Enumeration<String> getInitParameterNames()

  Specified by:
    `getInitParameterNames` in interface `FilterConfig`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD