Package org.apache.http
Interface HttpConnectionMetrics
-
- All Known Implementing Classes:
HttpConnectionMetricsImpl
public interface HttpConnectionMetricsThe point of access to the statistics of anHttpConnection.- Since:
- 4.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.ObjectgetMetric(java.lang.String metricName)Return the value for the specified metric.longgetReceivedBytesCount()Returns the number of bytes transferred over the connection, 0 if not available.longgetRequestCount()Returns the number of requests transferred over the connection, 0 if not available.longgetResponseCount()Returns the number of responses transferred over the connection, 0 if not available.longgetSentBytesCount()Returns the number of bytes transferred over the connection, 0 if not available.voidreset()Resets the counts
-
-
-
Method Detail
-
getRequestCount
long getRequestCount()
Returns the number of requests transferred over the connection, 0 if not available.
-
getResponseCount
long getResponseCount()
Returns the number of responses transferred over the connection, 0 if not available.
-
getSentBytesCount
long getSentBytesCount()
Returns the number of bytes transferred over the connection, 0 if not available.
-
getReceivedBytesCount
long getReceivedBytesCount()
Returns the number of bytes transferred over the connection, 0 if not available.
-
getMetric
java.lang.Object getMetric(java.lang.String metricName)
Return the value for the specified metric.- Parameters:
metricName- the name of the metric to query.- Returns:
- the object representing the metric requested,
nullif the metric cannot not found.
-
reset
void reset()
Resets the counts
-
-