Top Description Methods
org.apache.http

public Interface HttpConnectionMetrics

Known Direct Implementers
org.apache.http.impl.HttpConnectionMetricsImpl

The point of access to the statistics of an HttpConnection.
Since
4.0

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

the object representing the metric requested, null if the metric cannot not found.
getMetric
(String
the name of the metric to query.
metricName
)

Return the value for the specified metric.

public long
getReceivedBytesCount()

Returns the number of bytes transferred over the connection, 0 if not available.

public long
getRequestCount()

Returns the number of requests transferred over the connection, 0 if not available.

public long
getResponseCount()

Returns the number of responses transferred over the connection, 0 if not available.

public long
getSentBytesCount()

Returns the number of bytes transferred over the connection, 0 if not available.

public void
reset()

Resets the counts

Method Detail

getMetricback to summary
public Object getMetric(String metricName)

Return the value for the specified metric.

Parameters
metricName:String

the name of the metric to query.

Returns:Object

the object representing the metric requested, null if the metric cannot not found.

getReceivedBytesCountback to summary
public long getReceivedBytesCount()

Returns the number of bytes transferred over the connection, 0 if not available.

getRequestCountback to summary
public long getRequestCount()

Returns the number of requests transferred over the connection, 0 if not available.

getResponseCountback to summary
public long getResponseCount()

Returns the number of responses transferred over the connection, 0 if not available.

getSentBytesCountback to summary
public long getSentBytesCount()

Returns the number of bytes transferred over the connection, 0 if not available.

resetback to summary
public void reset()

Resets the counts