Class 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.

    • Constructor Detail

      • ConnectionStatistics

        public ConnectionStatistics()
        Deprecated.
    • Method Detail

      • 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

        @ManagedAttribute("Total number of bytes sent by tracked connections")
        public long getSentBytes()
        Deprecated.
      • getSentBytesRate

        @ManagedAttribute("Total number of bytes sent per second since the last invocation of this method")
        public long getSentBytesRate()
        Deprecated.
      • getConnectionDurationMax

        @ManagedAttribute("The max duration of a connection in ms")
        public long 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

        @ManagedAttribute("The total number of connections opened")
        public long getConnectionsTotal()
        Deprecated.
      • getConnections

        @ManagedAttribute("The current number of open connections")
        public long getConnections()
        Deprecated.
      • getConnectionsMax

        @ManagedAttribute("The max number of open connections")
        public long getConnectionsMax()
        Deprecated.
      • getReceivedMessages

        @ManagedAttribute("The total number of messages received")
        public long getReceivedMessages()
        Deprecated.
      • getReceivedMessagesRate

        @ManagedAttribute("Total number of messages received per second since the last invocation of this method")
        public long getReceivedMessagesRate()
        Deprecated.
      • getSentMessages

        @ManagedAttribute("The total number of messages sent")
        public long getSentMessages()
        Deprecated.
      • getSentMessagesRate

        @ManagedAttribute("Total number of messages sent per second since the last invocation of this method")
        public long getSentMessagesRate()
        Deprecated.
      • getConnectionStatisticsGroups

        public java.util.Map<java.lang.String,​ConnectionStatistics.Stats> getConnectionStatisticsGroups()
        Deprecated.
      • dump

        public void dump​(java.lang.Appendable out,
                         java.lang.String indent)
                  throws java.io.IOException
        Deprecated.
        Description copied from interface: Dumpable
        Dump 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:
        dump in interface Dumpable
        Parameters:
        out - The appendable to dump to
        indent - The indent to apply after any new lines.
        Throws:
        java.io.IOException - if unable to write to Appendable