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 HttpTransportMetrics
private final HttpTransportMetrics
private final AtomicLong
private final AtomicLong
-
Constructor Summary
ConstructorsConstructorDescriptionBasicHttpConnectionMetrics
(HttpTransportMetrics inTransportMetric, HttpTransportMetrics outTransportMetric) -
Method Summary
Modifier and TypeMethodDescriptionlong
Gets the number of bytes transferred over the connection, 0 if not available.long
Gets the number of requests transferred over the connection, 0 if not available.long
Gets the number of responses transferred over the connection, 0 if not available.long
Gets the number of bytes transferred over the connection, 0 if not available.void
void
-
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:HttpConnectionMetrics
Gets the number of bytes transferred over the connection, 0 if not available.- Specified by:
getReceivedBytesCount
in interfaceHttpConnectionMetrics
-
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 interfaceHttpConnectionMetrics
-
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 interfaceHttpConnectionMetrics
-
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 interfaceHttpConnectionMetrics
-
incrementResponseCount
public void incrementResponseCount()
-