Package org.eclipse.jetty.ee10.servlets
Class CloseableDoSFilter
java.lang.Object
org.eclipse.jetty.ee10.servlets.DoSFilter
org.eclipse.jetty.ee10.servlets.CloseableDoSFilter
- All Implemented Interfaces:
jakarta.servlet.Filter
This is an extension to
DoSFilter
that uses Jetty APIs to
abruptly close the connection when the request times out.-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.ee10.servlets.DoSFilter
DoSFilter.Action, DoSFilter.Listener, DoSFilter.OverLimit, DoSFilter.RateType
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
onRequestTimeout
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Thread handlingThread) Invoked when the request handling exceedsDoSFilter.getMaxRequestMs()
.Methods inherited from class org.eclipse.jetty.ee10.servlets.DoSFilter
addWhitelistAddress, checkWhitelist, clearWhitelist, destroy, doFilter, doFilter, doFilterChain, extractUserId, getDelayMs, getListener, getMaxIdleTrackerMs, getMaxPriority, getMaxRequestMs, getMaxRequestsPerSec, getMaxWaitMs, getName, getThrottledRequests, getThrottleMs, getTooManyCode, getWhitelist, init, isEnabled, isInsertHeaders, isRemotePort, isTrackSessions, removeFromRateTracker, removeWhitelistAddress, setDelayMs, setEnabled, setInsertHeaders, setListener, setMaxIdleTrackerMs, setMaxRequestMs, setMaxRequestsPerSec, setMaxWaitMs, setName, setRemotePort, setThrottledRequests, setThrottleMs, setTooManyCode, setTrackSessions, setWhitelist, startScheduler, stopScheduler, subnetMatch
-
Constructor Details
-
CloseableDoSFilter
public CloseableDoSFilter()
-
-
Method Details
-
onRequestTimeout
protected void onRequestTimeout(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Thread handlingThread) Description copied from class:DoSFilter
Invoked when the request handling exceedsDoSFilter.getMaxRequestMs()
.By default, an HTTP 503 response is returned and the handling thread is interrupted.
- Overrides:
onRequestTimeout
in classDoSFilter
- Parameters:
request
- the current requestresponse
- the current responsehandlingThread
- the handling thread
-