net.sourceforge.stripes.mock
Class MockFilterChain

java.lang.Object
  extended by net.sourceforge.stripes.mock.MockFilterChain
All Implemented Interfaces:
FilterChain

public class MockFilterChain
extends Object
implements FilterChain

Mock implementation of a filter chain that allows a number of filters to be called before finally invoking the servlet that is the target of the request.

Since:
Stripes 1.1.1
Author:
Tim Fennell

Constructor Summary
MockFilterChain()
           
 
Method Summary
 void addFilter(Filter filter)
          Adds a filter to the set of filters to be run.
 void addFilters(Collection<Filter> filters)
          Adds an ordered list of filters to the filter chain.
 void doFilter(ServletRequest request, ServletResponse response)
          Used to coordinate the execution of the filters.
 void setServlet(Servlet servlet)
          Sets the servlet that will receive the request after all filters are processed.
 
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

addFilter

public void addFilter(Filter filter)
Adds a filter to the set of filters to be run.


addFilters

public void addFilters(Collection<Filter> filters)
Adds an ordered list of filters to the filter chain.


setServlet

public void setServlet(Servlet servlet)
Sets the servlet that will receive the request after all filters are processed.


doFilter

public void doFilter(ServletRequest request,
                     ServletResponse response)
              throws IOException,
                     ServletException
Used to coordinate the execution of the filters.

Specified by:
doFilter in interface FilterChain
Throws:
IOException
ServletException


? Copyright 2005-2006, Stripes Development Team.