|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.http.impl.HttpConnectionMetricsImpl
public class HttpConnectionMetricsImpl
Implementation of the metrics interface.
Field Summary | |
---|---|
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
|
Constructor Summary | |
---|---|
HttpConnectionMetricsImpl(HttpTransportMetrics inTransportMetric,
HttpTransportMetrics outTransportMetric)
|
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
public HttpConnectionMetricsImpl(HttpTransportMetrics inTransportMetric, HttpTransportMetrics outTransportMetric)
Method Detail |
---|
public long getReceivedBytesCount()
HttpConnectionMetrics
getReceivedBytesCount
in interface HttpConnectionMetrics
public long getSentBytesCount()
HttpConnectionMetrics
getSentBytesCount
in interface HttpConnectionMetrics
public long getRequestCount()
HttpConnectionMetrics
getRequestCount
in interface HttpConnectionMetrics
public void incrementRequestCount()
public long getResponseCount()
HttpConnectionMetrics
getResponseCount
in interface HttpConnectionMetrics
public void incrementResponseCount()
public java.lang.Object getMetric(java.lang.String metricName)
HttpConnectionMetrics
getMetric
in interface HttpConnectionMetrics
metricName
- 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()
HttpConnectionMetrics
reset
in interface HttpConnectionMetrics
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |