Class PassThroughFilterChain
java.lang.Object
org.springframework.mock.web.PassThroughFilterChain
- All Implemented Interfaces:
jakarta.servlet.FilterChain
Implementation of the
FilterChain 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:
-
Constructor Summary
ConstructorsConstructorDescriptionPassThroughFilterChain(jakarta.servlet.Filter filter, jakarta.servlet.FilterChain nextFilterChain) Create a new PassThroughFilterChain that delegates to the given Filter, calling it with the given FilterChain.PassThroughFilterChain(jakarta.servlet.Servlet servlet) Create a new PassThroughFilterChain that delegates to the given Servlet. -
Method Summary
Modifier and TypeMethodDescriptionvoiddoFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response) Pass the call on to the Filter/Servlet.
-
Constructor Details
-
PassThroughFilterChain
public PassThroughFilterChain(jakarta.servlet.Filter filter, jakarta.servlet.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(jakarta.servlet.Servlet servlet) Create a new PassThroughFilterChain that delegates to the given Servlet.- Parameters:
servlet- the Servlet to delegate to
-
-
Method Details
-
doFilter
public void doFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response) throws jakarta.servlet.ServletException, IOException Pass the call on to the Filter/Servlet.- Specified by:
doFilterin interfacejakarta.servlet.FilterChain- Throws:
jakarta.servlet.ServletExceptionIOException
-