FilterChainFactory is responsible for building a jakarta.servlet.FilterChain instance with the
Filters that need to be invoked for a particular request URI.
Todo
We should look into how to cache these. They currently are re-built on each request.
| Modifier and Type | Field and Description |
|---|---|
| private final WebappContext |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private FilterChainImpl | buildFilterChain(final Servlet servlet, final String requestPath, final DispatcherType dispatcherType)
|
| public FilterChainImpl | createFilterChain(final ServletRequest
The servlet request we are processing request, final Servlet The servlet instance to be wrapped servlet, final DispatcherType dispatcherType)Construct and return a FilterChain implementation that will wrap the execution of the specified servlet instance. |
| public FilterChainImpl | createFilterChain(final Request
The servlet request we are processing request, final Servlet The servlet instance to be wrapped servlet, final DispatcherType dispatcherType)Construct and return a FilterChain implementation that will wrap the execution of the specified servlet instance. |
| private String | |
| private String | |
| private boolean | matchFiltersServlet(FilterMap
Filter mapping being checked filterMap, String Servlet name being checked servletName)Return |
| private boolean | matchFiltersURL(FilterMap
Filter mapping being checked filterMap, String Context-relative request path of this request requestPath)Return |
| ctx | back to summary |
|---|---|
| private final WebappContext ctx | |
| FilterChainFactory | back to summary |
|---|---|
| public FilterChainFactory(final WebappContext ctx) | |
| buildFilterChain | back to summary |
|---|---|
| private FilterChainImpl buildFilterChain(final Servlet servlet, final String requestPath, final DispatcherType dispatcherType) | |
| createFilterChain | back to summary |
|---|---|
| public FilterChainImpl createFilterChain(final ServletRequest request, final Servlet servlet, final DispatcherType dispatcherType) Construct and return a FilterChain implementation that will wrap the execution of the specified servlet instance. If
we should not execute a filter chain at all, return
| |
| createFilterChain | back to summary |
|---|---|
| public FilterChainImpl createFilterChain(final Request request, final Servlet servlet, final DispatcherType dispatcherType) Construct and return a FilterChain implementation that will wrap the execution of the specified servlet instance. If
we should not execute a filter chain at all, return | |
| getRequestPath | back to summary |
|---|---|
| private String getRequestPath(ServletRequest request) | |
| getRequestPath | back to summary |
|---|---|
| private String getRequestPath(Request request) | |
| matchFiltersServlet | back to summary |
|---|---|
| private boolean matchFiltersServlet(FilterMap filterMap, String servletName) Return | |
| matchFiltersURL | back to summary |
|---|---|
| private boolean matchFiltersURL(FilterMap filterMap, String requestPath) Return | |