update javadoc for DoSFilter
This commit is contained in:
parent
a3b89897d3
commit
904b6a113f
|
@ -31,9 +31,11 @@ import java.util.concurrent.Semaphore;
|
|||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.servlet.AsyncContext;
|
||||
import javax.servlet.AsyncEvent;
|
||||
import javax.servlet.AsyncListener;
|
||||
import javax.servlet.DispatcherType;
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.FilterConfig;
|
||||
|
@ -126,6 +128,10 @@ import org.eclipse.jetty.util.thread.Scheduler;
|
|||
* manage the configuration of the filter.</dd>
|
||||
* </dl>
|
||||
* </p>
|
||||
* <p>
|
||||
* This filter should be configured for {@link DispatcherType#REQUEST} and {@link DispatcherType#ASYNC} and with
|
||||
* <code><async-supported>true</async-supported></code>.
|
||||
* </p>
|
||||
*/
|
||||
@ManagedObject("limits exposure to abuse from request flooding, whether malicious, or as a result of a misconfigured client")
|
||||
public class DoSFilter implements Filter
|
||||
|
|
|
@ -69,7 +69,7 @@ public abstract class AbstractDoSFilterTest
|
|||
|
||||
_tester.getContext().addServlet(TestServlet.class, "/*");
|
||||
|
||||
_dosFilter = _tester.getContext().addFilter(filter, "/dos/*", EnumSet.allOf(DispatcherType.class));
|
||||
_dosFilter = _tester.getContext().addFilter(filter, "/dos/*", EnumSet.of(DispatcherType.REQUEST,DispatcherType.ASYNC));
|
||||
_dosFilter.setInitParameter("maxRequestsPerSec", "4");
|
||||
_dosFilter.setInitParameter("delayMs", "200");
|
||||
_dosFilter.setInitParameter("throttledRequests", "1");
|
||||
|
@ -78,7 +78,7 @@ public abstract class AbstractDoSFilterTest
|
|||
_dosFilter.setInitParameter("remotePort", "false");
|
||||
_dosFilter.setInitParameter("insertHeaders", "true");
|
||||
|
||||
_timeoutFilter = _tester.getContext().addFilter(filter, "/timeout/*", EnumSet.allOf(DispatcherType.class));
|
||||
_timeoutFilter = _tester.getContext().addFilter(filter, "/timeout/*", EnumSet.of(DispatcherType.REQUEST,DispatcherType.ASYNC));
|
||||
_timeoutFilter.setInitParameter("maxRequestsPerSec", "4");
|
||||
_timeoutFilter.setInitParameter("delayMs", "200");
|
||||
_timeoutFilter.setInitParameter("throttledRequests", "1");
|
||||
|
|
Loading…
Reference in New Issue