Class ThrottledHandler
- java.lang.Object
-
- com.kttdevelopment.simplehttpserver.handler.ThrottledHandler
-
- All Implemented Interfaces:
HttpHandler
public class ThrottledHandler extends Object implements HttpHandler
This handler limits the amount of active connections to a handler. This can be used to limit the amount of simultaneous downloads, or prevent duplicate connections by users.- Since:
- 03.03.00
- Version:
- 03.05.07
- Author:
- Ktt Development
- See Also:
ExchangeThrottler,ServerExchangeThrottler,SessionThrottler,ServerSessionThrottler
-
-
Constructor Summary
Constructors Constructor Description ThrottledHandler(HttpHandler handler, com.kttdevelopment.simplehttpserver.handler.ConnectionThrottler throttler)Creates a throttled handler using a throttler.
-
-
-
Constructor Detail
-
ThrottledHandler
public ThrottledHandler(HttpHandler handler, com.kttdevelopment.simplehttpserver.handler.ConnectionThrottler throttler)
Creates a throttled handler using a throttler.- Parameters:
handler- handler to usethrottler- how to throttle connections- Since:
- 03.03.00
- See Also:
HttpHandler,ExchangeThrottler,ServerExchangeThrottler,SessionThrottler,ServerSessionThrottler
-
-
Method Detail
-
handle
public final void handle(HttpExchange exchange) throws IOException
- Specified by:
handlein interfaceHttpHandler- Throws:
IOException
-
-