Package org.eclipse.jetty.io
Class ConnectionStatistics
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.io.ConnectionStatistics
- All Implemented Interfaces:
Connection.Listener,Dumpable,LifeCycle
- Direct Known Subclasses:
IncludeExcludeConnectionStatistics,ServerConnectionStatistics
@ManagedObject("Tracks statistics on connections")
@Deprecated(since="2021-05-27")
public class ConnectionStatistics
extends AbstractLifeCycle
implements Connection.Listener, Dumpable
Deprecated.
The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
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.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListenerNested classes/interfaces inherited from interface org.eclipse.jetty.io.Connection.Listener
Connection.Listener.AdapterNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddump(Appendable out, String indent) Deprecated.Dump this object (and children) into an Appendable using the provided indent after any new lines.longDeprecated.doubleDeprecated.doubleDeprecated.longDeprecated.longDeprecated.Deprecated.longDeprecated.longDeprecated.longDeprecated.longDeprecated.longDeprecated.longDeprecated.longDeprecated.longDeprecated.longDeprecated.voidonClosed(Connection connection) Deprecated.voidonOpened(Connection connection) Deprecated.voidreset()Deprecated.toString()Deprecated.Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop
-
Constructor Details
-
ConnectionStatistics
public ConnectionStatistics()Deprecated.
-
-
Method Details
-
reset
Deprecated. -
onOpened
Deprecated.- Specified by:
onOpenedin interfaceConnection.Listener
-
onClosed
Deprecated.- Specified by:
onClosedin interfaceConnection.Listener
-
getReceivedBytes
@ManagedAttribute("Total number of bytes received by tracked connections") public long getReceivedBytes()Deprecated. -
getReceivedBytesRate
@ManagedAttribute("Total number of bytes received per second since the last invocation of this method") public long getReceivedBytesRate()Deprecated. -
getSentBytes
Deprecated. -
getSentBytesRate
@ManagedAttribute("Total number of bytes sent per second since the last invocation of this method") public long getSentBytesRate()Deprecated. -
getConnectionDurationMax
Deprecated. -
getConnectionDurationMean
@ManagedAttribute("The mean duration of a connection in ms") public double getConnectionDurationMean()Deprecated. -
getConnectionDurationStdDev
@ManagedAttribute("The standard deviation of the duration of a connection") public double getConnectionDurationStdDev()Deprecated. -
getConnectionsTotal
Deprecated. -
getConnections
Deprecated. -
getConnectionsMax
Deprecated. -
getReceivedMessages
Deprecated. -
getReceivedMessagesRate
@ManagedAttribute("Total number of messages received per second since the last invocation of this method") public long getReceivedMessagesRate()Deprecated. -
getSentMessages
Deprecated. -
getSentMessagesRate
@ManagedAttribute("Total number of messages sent per second since the last invocation of this method") public long getSentMessagesRate()Deprecated. -
getConnectionStatisticsGroups
Deprecated. -
dump
Deprecated.Description copied from interface:DumpableDump this object (and children) into an Appendable using the provided indent after any new lines. The indent should not be applied to the first object dumped.- Specified by:
dumpin interfaceDumpable- Parameters:
out- The appendable to dump toindent- The indent to apply after any new lines.- Throws:
IOException- if unable to write to Appendable
-
toString
Deprecated.- Overrides:
toStringin classAbstractLifeCycle
-