org.springframework.mock.web
Class MockFilterConfig

java.lang.Object
  extended by 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; typically not necessary for testing application controllers.

Since:
1.0.2
Author:
Juergen Hoeller

Constructor Summary
MockFilterConfig(ServletContext servletContext)
          Create new MockServletConfig with empty String as name.
MockFilterConfig(ServletContext servletContext, String name)
          Create new MockServletConfig.
 
Method Summary
 void addInitParameter(String name, String value)
           
 String getFilterName()
           
 String getInitParameter(String name)
           
 Enumeration 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(ServletContext servletContext)
Create new MockServletConfig with empty String as name.

Parameters:
servletContext - the ServletContext that the servlet runs in

MockFilterConfig

public MockFilterConfig(ServletContext servletContext,
                        String name)
Create new MockServletConfig.

Parameters:
servletContext - the ServletContext that the servlet runs in
name - the name of the servlet
Method Detail

addInitParameter

public void addInitParameter(String name,
                             String value)

getInitParameter

public String getInitParameter(String name)
Specified by:
getInitParameter in interface FilterConfig

getInitParameterNames

public Enumeration getInitParameterNames()
Specified by:
getInitParameterNames in interface FilterConfig

getServletContext

public ServletContext getServletContext()
Specified by:
getServletContext in interface FilterConfig

getFilterName

public String getFilterName()
Specified by:
getFilterName in interface FilterConfig


Copyright (c) 2002-2005 The Spring Framework Project.