Class ExchangeThrottler
- java.lang.Object
-
- com.kttdevelopment.simplehttpserver.handler.ExchangeThrottler
-
public class ExchangeThrottler extends Object
Limits connections per address to the server.- Since:
- 03.05.00
- Version:
- 03.05.00
- Author:
- Ktt Development
- See Also:
HttpExchange,ThrottledHandler,ServerExchangeThrottler,SessionThrottler,ServerSessionThrottler
-
-
Constructor Summary
Constructors Constructor Description ExchangeThrottler()Creates a throttler with limits on each exchange.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetMaxConnections(HttpExchange exchange)Returns the maximum number of connections for an exchange.StringtoString()
-
-
-
Method Detail
-
getMaxConnections
public int getMaxConnections(HttpExchange exchange)
Returns the maximum number of connections for an exchange. A value of-1means unlimited connections.- Parameters:
exchange- exchange to process- Returns:
- maximum number of connections allowed
- See Also:
HttpExchange,addConnection(HttpExchange),deleteConnection(HttpExchange)
-
-