Package org.apache.hc.core5.http.impl
Class BasicHttpConnectionMetrics
java.lang.Object
org.apache.hc.core5.http.impl.BasicHttpConnectionMetrics
- All Implemented Interfaces:
HttpConnectionMetrics
Default implementation of the
HttpConnectionMetrics interface.- Since:
- 4.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final HttpTransportMetricsprivate final HttpTransportMetricsprivate final AtomicLongprivate final AtomicLong -
Constructor Summary
ConstructorsConstructorDescriptionBasicHttpConnectionMetrics(HttpTransportMetrics inTransportMetric, HttpTransportMetrics outTransportMetric) -
Method Summary
Modifier and TypeMethodDescriptionlongGets the number of bytes transferred over the connection, 0 if not available.longGets the number of requests transferred over the connection, 0 if not available.longGets the number of responses transferred over the connection, 0 if not available.longGets the number of bytes transferred over the connection, 0 if not available.voidvoid
-
Field Details
-
inTransportMetric
-
outTransportMetric
-
requestCount
-
responseCount
-
-
Constructor Details
-
BasicHttpConnectionMetrics
public BasicHttpConnectionMetrics(HttpTransportMetrics inTransportMetric, HttpTransportMetrics outTransportMetric)
-
-
Method Details
-
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()
-