Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public class

HttpConnectionMetricsImpl

extends Object
implements HttpConnectionMetrics
java.lang.Object
   ↳ org.apache.http.impl.HttpConnectionMetricsImpl

Class Overview

Implementation of the metrics interface.

Summary

Constants
String RECEIVED_BYTES_COUNT
String REQUEST_COUNT
String RESPONSE_COUNT
String SENT_BYTES_COUNT
Public Constructors
HttpConnectionMetricsImpl ( HttpTransportMetrics inTransportMetric, HttpTransportMetrics outTransportMetric)
Public Methods
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)
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.http.HttpConnectionMetrics

Constants

public static final String RECEIVED_BYTES_COUNT

Added in API level 1

Constant Value: "http.received-bytes-count"

public static final String REQUEST_COUNT

Added in API level 1

Constant Value: "http.request-count"

public static final String RESPONSE_COUNT

Added in API level 1

Constant Value: "http.response-count"

public static final String SENT_BYTES_COUNT

Added in API level 1

Constant Value: "http.sent-bytes-count"

Public Constructors

public HttpConnectionMetricsImpl ( HttpTransportMetrics inTransportMetric, HttpTransportMetrics outTransportMetric)

Added in API level 1

Public Methods

public Object getMetric ( String metricName)

Added in API level 1

Return the value for the specified metric.

Parameters
metricName the name of the metric to query.
Returns
  • the object representing the metric requested, null if the metric cannot not found.

public long getReceivedBytesCount ()

Added in API level 1

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

public long getRequestCount ()

Added in API level 1

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

public long getResponseCount ()

Added in API level 1

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

public long getSentBytesCount ()

Added in API level 1

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

public void incrementRequestCount ()

Added in API level 1

public void incrementResponseCount ()

Added in API level 1

public void reset ()

Added in API level 1

Resets the counts

public void setMetric ( String metricName, Object obj)

Added in API level 1