org.apache.hc.core5.http.impl

## Class BasicHttpConnectionMetrics

- java.lang.Object
- - org.apache.hc.core5.http.impl.BasicHttpConnectionMetrics

- All Implemented Interfaces:
    HttpConnectionMetrics

      public final class BasicHttpConnectionMetrics
      extends Object
      implements HttpConnectionMetrics

  Default implementation of the `HttpConnectionMetrics` interface.
  Since:
    4.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BasicHttpConnectionMetrics(HttpTransportMetrics inTransportMetric, HttpTransportMetrics outTransportMetric)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getReceivedBytesCount()` Gets the number of bytes transferred over the connection, 0 if not available.
    `long` | `getRequestCount()` Gets the number of requests transferred over the connection, 0 if not available.
    `long` | `getResponseCount()` Gets the number of responses transferred over the connection, 0 if not available.
    `long` | `getSentBytesCount()` Gets the number of bytes transferred over the connection, 0 if not available.
    `void` | `incrementRequestCount()`
    `void` | `incrementResponseCount()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BasicHttpConnectionMetrics

          public BasicHttpConnectionMetrics(HttpTransportMetrics inTransportMetric,
                                    HttpTransportMetrics outTransportMetric)

  - ### Method Detail

    - #### getReceivedBytesCount

          public long getReceivedBytesCount()

      Description copied from interface: `HttpConnectionMetrics`
      Gets the number of bytes transferred over the connection, 0 if not available.
      Specified by:
        `getReceivedBytesCount` in interface `HttpConnectionMetrics`

    - #### getSentBytesCount

          public long getSentBytesCount()

      Description copied from interface: `HttpConnectionMetrics`
      Gets the number of bytes transferred over the connection, 0 if not available.
      Specified by:
        `getSentBytesCount` in interface `HttpConnectionMetrics`

    - #### getRequestCount

          public long getRequestCount()

      Description copied from interface: `HttpConnectionMetrics`
      Gets the number of requests transferred over the connection, 0 if not available.
      Specified by:
        `getRequestCount` in interface `HttpConnectionMetrics`

    - #### incrementRequestCount

          public void incrementRequestCount()

    - #### getResponseCount

          public long getResponseCount()

      Description copied from interface: `HttpConnectionMetrics`
      Gets the number of responses transferred over the connection, 0 if not available.
      Specified by:
        `getResponseCount` in interface `HttpConnectionMetrics`

    - #### incrementResponseCount

          public void incrementResponseCount()

Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.