public class HttpConnectionMetricsImpl extends Object implements HttpConnectionMetrics
HttpConnectionMetrics interface.| Modifier and Type | Field and Description |
|---|---|
static String |
RECEIVED_BYTES_COUNT |
static String |
REQUEST_COUNT |
static String |
RESPONSE_COUNT |
static String |
SENT_BYTES_COUNT |
| Constructor and Description |
|---|
HttpConnectionMetricsImpl(HttpTransportMetrics inTransportMetric,
HttpTransportMetrics outTransportMetric) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getMetric(String metricName)
Return the value for the specified metric.
|
long |
getReceivedBytesCount()
Returns the number of bytes transferred over the connection,
0 if not available.
|
long |
getRequestCount()
Returns the number of requests transferred over the connection,
0 if not available.
|
long |
getResponseCount()
Returns the number of responses transferred over the connection,
0 if not available.
|
long |
getSentBytesCount()
Returns the number of bytes transferred over the connection,
0 if not available.
|
void |
incrementRequestCount() |
void |
incrementResponseCount() |
void |
reset()
Resets the counts
|
void |
setMetric(String metricName,
Object obj) |
public static final String REQUEST_COUNT
public static final String RESPONSE_COUNT
public static final String SENT_BYTES_COUNT
public static final String RECEIVED_BYTES_COUNT
public HttpConnectionMetricsImpl(HttpTransportMetrics inTransportMetric, HttpTransportMetrics outTransportMetric)
public long getReceivedBytesCount()
HttpConnectionMetricsgetReceivedBytesCount in interface HttpConnectionMetricspublic long getSentBytesCount()
HttpConnectionMetricsgetSentBytesCount in interface HttpConnectionMetricspublic long getRequestCount()
HttpConnectionMetricsgetRequestCount in interface HttpConnectionMetricspublic void incrementRequestCount()
public long getResponseCount()
HttpConnectionMetricsgetResponseCount in interface HttpConnectionMetricspublic void incrementResponseCount()
public Object getMetric(String metricName)
HttpConnectionMetricsgetMetric in interface HttpConnectionMetricsmetricName - the name of the metric to query.null if the metric cannot not found.public void reset()
HttpConnectionMetricsreset in interface HttpConnectionMetricsCopyright © 2005–2022 The Apache Software Foundation. All rights reserved.