Skip to content

Most visited

Recently visited

navigation

HttpConnectionMetrics | Android Developers

to top
Android APIs
Added in API level 1
public interface

HttpConnectionMetrics

org.apache.http.HttpConnectionMetrics
Known Indirect Subclasses

Class Overview

The point of access to the statistics of an HttpConnection.

Summary

Public Methods
abstract Object getMetric(String metricName)
Return the value for the specified metric.
abstract long getReceivedBytesCount()
Returns the number of bytes transferred over the connection, 0 if not available.
abstract long getRequestCount()
Returns the number of requests transferred over the connection, 0 if not available.
abstract long getResponseCount()
Returns the number of responses transferred over the connection, 0 if not available.
abstract long getSentBytesCount()
Returns the number of bytes transferred over the connection, 0 if not available.
abstract void reset()
Resets the counts

Public Methods

public abstract 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 abstract long getReceivedBytesCount ()

Added in API level 1

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

public abstract long getRequestCount ()

Added in API level 1

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

public abstract long getResponseCount ()

Added in API level 1

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

public abstract long getSentBytesCount ()

Added in API level 1

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

public abstract void reset ()

Added in API level 1

Resets the counts

This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.