org.springframework.mock.web
Class PassThroughFilterChain

java.lang.Object
  extended by org.springframework.mock.web.PassThroughFilterChain

public class PassThroughFilterChain
extends java.lang.Object

Implementation of the javax.servlet.FilterConfig interface which simply passes the call through to a given Filter/FilterChain combination (indicating the next Filter in the chain along with the FilterChain that it is supposed to work on) or to a given Servlet (indicating the end of the chain).

Since:
2.0.3
Author:
Juergen Hoeller
See Also:
javax.servlet.Filter, javax.servlet.Servlet, MockFilterChain

Field Summary
private  Filter filter
           
private  FilterChain nextFilterChain
           
private  Servlet servlet
           
 
Constructor Summary
PassThroughFilterChain(Filter filter, FilterChain nextFilterChain)
          Create a new PassThroughFilterChain that delegates to the given Filter, calling it with the given FilterChain.
PassThroughFilterChain(Servlet servlet)
          Create a new PassThroughFilterChain that delegates to the given Servlet.
 
Method Summary
 void doFilter(ServletRequest request, ServletResponse response)
          Pass the call on to the Filter/Servlet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filter

private Filter filter

nextFilterChain

private FilterChain nextFilterChain

servlet

private Servlet servlet
Constructor Detail

PassThroughFilterChain

public PassThroughFilterChain(Filter filter,
                              FilterChain nextFilterChain)
Create a new PassThroughFilterChain that delegates to the given Filter, calling it with the given FilterChain.

Parameters:
filter - the Filter to delegate to
nextFilterChain - the FilterChain to use for that next Filter

PassThroughFilterChain

public PassThroughFilterChain(Servlet servlet)
Create a new PassThroughFilterChain that delegates to the given Servlet.

Parameters:
servlet - the Servlet to delegate to
Method Detail

doFilter

public void doFilter(ServletRequest request,
                     ServletResponse response)
              throws ServletException,
                     java.io.IOException
Pass the call on to the Filter/Servlet.

Throws:
ServletException
java.io.IOException