Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
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:
  javax.servlet.FilterConfig

    public class MockFilterConfig

extends java.lang.Object
implements javax.servlet.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(javax.servlet.ServletContext servletContext)` Create a new MockFilterConfig.
`MockFilterConfig(javax.servlet.ServletContext servletContext, java.lang.String filterName)` Create a new MockFilterConfig.
`MockFilterConfig(java.lang.String filterName)` Create a new MockFilterConfig with a default `MockServletContext`.

Method Summary
`void` | `addInitParameter(java.lang.String name, java.lang.String value)`
`java.lang.String` | `getFilterName()`
`java.lang.String` | `getInitParameter(java.lang.String name)`
`java.util.Enumeration<java.lang.String>` | `getInitParameterNames()`
`javax.servlet.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(java.lang.String filterName)

  Create a new MockFilterConfig with a default `MockServletContext`.

  Parameters:
    `filterName` - the name of the filter

### MockFilterConfig

    public MockFilterConfig(javax.servlet.ServletContext servletContext)

  Create a new MockFilterConfig.

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

### MockFilterConfig

    public MockFilterConfig(javax.servlet.ServletContext servletContext,
                            java.lang.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 java.lang.String getFilterName()

  Specified by:
    `getFilterName` in interface `javax.servlet.FilterConfig`

### getServletContext

    public javax.servlet.ServletContext getServletContext()

  Specified by:
    `getServletContext` in interface `javax.servlet.FilterConfig`

### addInitParameter

    public void addInitParameter(java.lang.String name,
                                 java.lang.String value)

### getInitParameter

    public java.lang.String getInitParameter(java.lang.String name)

  Specified by:
    `getInitParameter` in interface `javax.servlet.FilterConfig`

### getInitParameterNames

    public java.util.Enumeration<java.lang.String> getInitParameterNames()

  Specified by:
    `getInitParameterNames` in interface `javax.servlet.FilterConfig`

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