org.eclipse.jetty.servlets

## Class CloseableDoSFilter

- java.lang.Object
- - org.eclipse.jetty.servlets.DoSFilter
  - - org.eclipse.jetty.servlets.CloseableDoSFilter

All Implemented Interfaces:
  javax.servlet.Filter

    public class CloseableDoSFilter
    extends DoSFilter

Closeable DoS Filter. This is an extension to the `DoSFilter` that uses Jetty APIs to allow connections to be closed cleanly.

### Field Summary

### Fields inherited from class org.eclipse.jetty.servlets.DoSFilter

`_delayMs, _insertHeaders, _listener, _maxIdleTrackerMs, _maxRequestMs, _maxRequestsPerSec, _maxWaitMs, _name, _passes, _queue, _rateTrackers, _remotePort, _throttledRequests, _throttleMs, _trackSessions, _whitelistStr`

### Constructor Summary

Constructors
Constructor and Description
`CloseableDoSFilter()`

### Method Summary

Methods
`protected void` `closeConnection(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Thread thread)` Takes drastic measures to return this response and stop this thread.

### Methods inherited from class org.eclipse.jetty.servlets.DoSFilter

`destroy, doFilter, doFilterChain, extractUserId, getDelayMs, getMaxIdleTrackerMs, getMaxPriority, getMaxRequestMs, getMaxRequestsPerSec, getMaxWaitMs, getPriority, getRateTracker, getThrottledRequests, getThrottleMs, getWhitelist, init, initWhitelist, isInsertHeaders, isRemotePort, isTrackSessions, setDelayMs, setInsertHeaders, setMaxIdleTrackerMs, setMaxRequestMs, setMaxRequestsPerSec, setMaxWaitMs, setRemotePort, setThrottledRequests, setThrottleMs, setTrackSessions, setWhitelist`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### CloseableDoSFilter

    public CloseableDoSFilter()

### Method Detail

#### closeConnection

    protected void closeConnection(javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response,
                       Thread thread)

Description copied from class: `DoSFilter`
Takes drastic measures to return this response and stop this thread. Due to the way the connection is interrupted, may return mixed up headers.

Overrides:
  `closeConnection` in class `DoSFilter`
Parameters:
  `request` - current request
  `response` - current response, which must be stopped
  `thread` - the handling thread