Package 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 java.lang.Object implements HttpConnectionMetrics
Default implementation of theHttpConnectionMetricsinterface.- Since:
- 4.0
-
-
Field Summary
Fields Modifier and Type Field Description private HttpTransportMetricsinTransportMetricprivate HttpTransportMetricsoutTransportMetricprivate java.util.concurrent.atomic.AtomicLongrequestCountprivate java.util.concurrent.atomic.AtomicLongresponseCount
-
Constructor Summary
Constructors Constructor Description BasicHttpConnectionMetrics(HttpTransportMetrics inTransportMetric, HttpTransportMetrics outTransportMetric)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetReceivedBytesCount()Gets the number of bytes transferred over the connection, 0 if not available.longgetRequestCount()Gets the number of requests transferred over the connection, 0 if not available.longgetResponseCount()Gets the number of responses transferred over the connection, 0 if not available.longgetSentBytesCount()Gets the number of bytes transferred over the connection, 0 if not available.voidincrementRequestCount()voidincrementResponseCount()
-
-
-
Field Detail
-
inTransportMetric
private final HttpTransportMetrics inTransportMetric
-
outTransportMetric
private final HttpTransportMetrics outTransportMetric
-
requestCount
private final java.util.concurrent.atomic.AtomicLong requestCount
-
responseCount
private final java.util.concurrent.atomic.AtomicLong responseCount
-
-
Constructor Detail
-
BasicHttpConnectionMetrics
public BasicHttpConnectionMetrics(HttpTransportMetrics inTransportMetric, HttpTransportMetrics outTransportMetric)
-
-
Method Detail
-
getReceivedBytesCount
public long getReceivedBytesCount()
Description copied from interface:HttpConnectionMetricsGets the number of bytes transferred over the connection, 0 if not available.- Specified by:
getReceivedBytesCountin interfaceHttpConnectionMetrics
-
getSentBytesCount
public long getSentBytesCount()
Description copied from interface:HttpConnectionMetricsGets the number of bytes transferred over the connection, 0 if not available.- Specified by:
getSentBytesCountin interfaceHttpConnectionMetrics
-
getRequestCount
public long getRequestCount()
Description copied from interface:HttpConnectionMetricsGets the number of requests transferred over the connection, 0 if not available.- Specified by:
getRequestCountin interfaceHttpConnectionMetrics
-
incrementRequestCount
public void incrementRequestCount()
-
getResponseCount
public long getResponseCount()
Description copied from interface:HttpConnectionMetricsGets the number of responses transferred over the connection, 0 if not available.- Specified by:
getResponseCountin interfaceHttpConnectionMetrics
-
incrementResponseCount
public void incrementResponseCount()
-
-