Package org.springframework.mock.web
Class PassThroughFilterChain
- java.lang.Object
- org.springframework.mock.web.PassThroughFilterChain
- All Implemented Interfaces:
FilterChain
public class PassThroughFilterChain extends Object implements FilterChain
Implementation of theFilterConfig
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:
Filter
,Servlet
,MockFilterChain
Constructor Summary
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doFilter(ServletRequest request, ServletResponse response)
Pass the call on to the Filter/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 tonextFilterChain
- 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, IOException
Pass the call on to the Filter/Servlet.- Specified by:
doFilter
in interfaceFilterChain
- Parameters:
request
- the request to pass along the chain.response
- the response to pass along the chain.- Throws:
ServletException
- if an exception has occurred that interferes with the filterChain's normal operationIOException
- if an I/O related error has occurred during the processing