Class ExchangeThrottler

java.lang.Object
dev.katsute.simplehttpserver.handler.throttler.ExchangeThrottler

public class ExchangeThrottler extends Object
A throttler that limits the amount of simultaneous connections based on the exchange.
Since:
5.0.0
Version:
5.0.0
Author:
Katsute
See Also:
  • Constructor Details

    • ExchangeThrottler

      public ExchangeThrottler()
      Creates a throttler.
      Since:
      5.0.0
  • Method Details

    • getMaxConnections

      public int getMaxConnections(SimpleHttpExchange exchange)
      Returns the maximum number of connections allowed for an exchange. Return -1 for unlimited connections.
      Parameters:
      exchange - exchange
      Returns:
      maximum connections
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object