Constructor and Description |
---|
ThrottleFilter() |
Modifier and Type | Method and Description |
---|---|
void |
addPoisonedIp(java.lang.String address) |
void |
destroy()
Any cleanup for the filter.
|
void |
doFilter(ServletRequest request,
ServletResponse response,
FilterChain nextFilter)
doFilter performs the actual work of a filter, either modifying
the request or the response.
|
static ThrottleFilter |
getCurrent() |
void |
init(FilterConfig config)
Initialize the filter.
|
void |
setDelay(Period period) |
void |
setMaxConcurrentRequests(int max)
Sets the maximum number of concurrent requests for a single IP.
|
void |
setMaxTotalRequests(int max) |
void |
setTimeout(Period period) |
public static ThrottleFilter getCurrent()
public void setMaxConcurrentRequests(int max)
public void setMaxTotalRequests(int max)
public void setTimeout(Period period)
public void setDelay(Period period)
public void addPoisonedIp(java.lang.String address)
public void init(FilterConfig config) throws ServletException
Filter
init
in interface Filter
ServletException
public void doFilter(ServletRequest request, ServletResponse response, FilterChain nextFilter) throws ServletException, java.io.IOException
Filter
doFilter
in interface Filter
request
- the servlet requestresponse
- the servlet responsenextFilter
- the next filter in the chainServletException
java.io.IOException