|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.owasp.esapi.filters.RequestRateThrottleFilter
public class RequestRateThrottleFilter
A simple servlet filter that limits the request rate to a certain threshold of requests per second. The default rate is 5 hits in 10 seconds. This can be overridden in the web.xml file by adding parameters named "hits" and "period" with the desired values. When the rate is exceeded, a short string is written to the response output stream and the chain method is not invoked. Otherwise, processing proceeds as normal.
Constructor Summary | |
---|---|
RequestRateThrottleFilter()
|
Method Summary | |
---|---|
void |
destroy()
Called by the web container to indicate to a filter that it is being taken out of service. |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
Checks to see if the current session has exceeded the allowed number of requests in the specified time period. |
void |
init(javax.servlet.FilterConfig filterConfig)
Called by the web container to indicate to a filter that it is being placed into service. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RequestRateThrottleFilter()
Method Detail |
---|
public void init(javax.servlet.FilterConfig filterConfig)
init
in interface javax.servlet.Filter
filterConfig
- configuration objectpublic void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws java.io.IOException, javax.servlet.ServletException
doFilter
in interface javax.servlet.Filter
request
- response
- chain
-
java.io.IOException
javax.servlet.ServletException
public void destroy()
destroy
in interface javax.servlet.Filter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |