@NotThreadSafe public class HttpConnectionMetricsImpl extends java.lang.Object implements HttpConnectionMetrics
HttpConnectionMetrics interface.| 限定符和类型 | 字段和说明 |
|---|---|
static java.lang.String |
RECEIVED_BYTES_COUNT |
static java.lang.String |
REQUEST_COUNT |
static java.lang.String |
RESPONSE_COUNT |
static java.lang.String |
SENT_BYTES_COUNT |
| 构造器和说明 |
|---|
HttpConnectionMetricsImpl(HttpTransportMetrics inTransportMetric,
HttpTransportMetrics outTransportMetric) |
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.Object |
getMetric(java.lang.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(java.lang.String metricName,
java.lang.Object obj) |
public static final java.lang.String REQUEST_COUNT
public static final java.lang.String RESPONSE_COUNT
public static final java.lang.String SENT_BYTES_COUNT
public static final java.lang.String RECEIVED_BYTES_COUNT
public HttpConnectionMetricsImpl(HttpTransportMetrics inTransportMetric, HttpTransportMetrics outTransportMetric)
public long getReceivedBytesCount()
HttpConnectionMetricsgetReceivedBytesCount 在接口中 HttpConnectionMetricspublic long getSentBytesCount()
HttpConnectionMetricsgetSentBytesCount 在接口中 HttpConnectionMetricspublic long getRequestCount()
HttpConnectionMetricsgetRequestCount 在接口中 HttpConnectionMetricspublic void incrementRequestCount()
public long getResponseCount()
HttpConnectionMetricsgetResponseCount 在接口中 HttpConnectionMetricspublic void incrementResponseCount()
public java.lang.Object getMetric(java.lang.String metricName)
HttpConnectionMetricsgetMetric 在接口中 HttpConnectionMetricsmetricName - the name of the metric to query.null if the metric cannot not found.public void setMetric(java.lang.String metricName,
java.lang.Object obj)
public void reset()
HttpConnectionMetricsreset 在接口中 HttpConnectionMetrics