Spring Framework

org.springframework.mock.web
Class MockFilterChain

java.lang.Object
  extended by org.springframework.mock.web.MockFilterChain
All Implemented Interfaces:
javax.servlet.FilterChain

public class MockFilterChain
extends java.lang.Object
implements javax.servlet.FilterChain

Mock implementation of the FilterConfig interface.

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

Since:
2.0.3
Author:
Juergen Hoeller
See Also:
MockFilterConfig, PassThroughFilterChain

Constructor Summary
MockFilterChain()
           
 
Method Summary
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
          Records the request and response.
 javax.servlet.ServletRequest getRequest()
          Return the request that doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) has been called with.
 javax.servlet.ServletResponse getResponse()
          Return the response that doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) has been called with.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockFilterChain

public MockFilterChain()
Method Detail

doFilter

public void doFilter(javax.servlet.ServletRequest request,
                     javax.servlet.ServletResponse response)
Records the request and response.

Specified by:
doFilter in interface javax.servlet.FilterChain

getRequest

public javax.servlet.ServletRequest getRequest()
Return the request that doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) has been called with.


getResponse

public javax.servlet.ServletResponse getResponse()
Return the response that doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) has been called with.


Spring Framework