public class FilterChainHolder
extends java.lang.Object
implements javax.servlet.FilterChain
FilterChain interface. FilterChainHolder objects should be accessed through the
FilterChainManager. Once a filter chain is loaded, use the doFilter emthod to run the chain
during a request lifecycle| Constructor and Description |
|---|
FilterChainHolder()
Creates a new empty
FilterChainHolder |
FilterChainHolder(java.util.List<FilterHolder> allFilters)
Creates a new instance of a filter chain holder
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFilter(FilterHolder newFilter)
Add a filter to the chain.
|
void |
doFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse) |
int |
filterCount()
Returns the number of filters loaded in the chain holder
|
FilterHolder |
getFilter(int idx)
Get the
FilterHolder object from the chain at the given index. |
public FilterChainHolder()
FilterChainHolderpublic FilterChainHolder(java.util.List<FilterHolder> allFilters)
allFilters - A populated list of FilterHolder objectspublic void doFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse)
throws java.io.IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.FilterChainjava.io.IOExceptionjavax.servlet.ServletExceptionpublic void addFilter(FilterHolder newFilter)
newFilter - The filter to be added at the end of the chainpublic int filterCount()
public FilterHolder getFilter(int idx)
FilterHolder object from the chain at the given index.idx - The index in the chain. Use the filterCount method to get the filter countCopyright © 2017. All Rights Reserved.