Class ConnectionStatistics

java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.io.ConnectionStatistics
All Implemented Interfaces:
EventListener, Connection.Listener, Dumpable, LifeCycle
Direct Known Subclasses:
IncludeExcludeConnectionStatistics, ServerConnectionStatistics

@ManagedObject("Tracks statistics on connections") public class ConnectionStatistics extends AbstractLifeCycle implements Connection.Listener, Dumpable

A Connection.Listener that tracks connection statistics.

Adding an instance of this class as a bean to a ServerConnector or ConnectionFactory (for the server) or to HttpClient (for the client) will trigger the tracking of the connection statistics for all connections managed by the server or by the client.

The statistics for a connection are gathered when the connection is closed.

ConnectionStatistics instances must be started to collect statistics, either as part of starting the whole component tree, or explicitly if the component tree has already been started.