Class ConnectionLimit

All Implemented Interfaces:
EventListener, Connection.Listener, SelectorManager.AcceptListener, LifeCycle

@ManagedObject @Deprecated(since="2021-05-27") public class ConnectionLimit extends AbstractLifeCycle implements Connection.Listener, SelectorManager.AcceptListener
Deprecated.
The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.

A Listener that limits the number of Connections.

This listener applies a limit to the number of connections, which when exceeded results in a call to AbstractConnector.setAccepting(boolean) to prevent further connections being received. It can be applied to an entire server or to a specific connector by adding it via Container.addBean(Object)

Usage:

    Server server = new Server();
    server.addBean(new ConnectionLimit(5000,server));
    ...
    server.start();
  
See Also: