|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.filters.ThrottleFilter
public class ThrottleFilter
Throttles the filter to only a limited number of requests.
| Constructor Summary | |
|---|---|
ThrottleFilter()
|
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ThrottleFilter()
| Method Detail |
|---|
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 FilterServletException
public void doFilter(ServletRequest request,
ServletResponse response,
FilterChain nextFilter)
throws ServletException,
java.io.IOException
Filter
doFilter in interface Filterrequest - the servlet requestresponse - the servlet responsenextFilter - the next filter in the chain
ServletException
java.io.IOExceptionpublic void destroy()
destroy in interface Filter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||