Skip to content

NetworkEventReporter

Anirudh Ramanan edited this page Jul 15, 2016 · 1 revision

NetworkEventReporter is an interface which is used to report success and failure response. The library provides NetworkEventReporterImpl which is the default implementation with following functionalities.

  • void responseReceived(InspectorRequest inspectorRequest, InspectorResponse inspectorResponse) : Notifies the NetworkEventReporter that the intercepted Response has been received.

  • void httpExchangeError(InspectorRequest inspectorRequest, IOException e) : Reports any IOException while the Response is being proceeded.

  • void httpExchangeError(InspectorRequest inspectorRequest, IOException e) : Reports error while getting the input steam from ResponseBody.

These callbacks create a RequestStats object with all the fields and pushes it to the NetworkRequestStatsHandler, which is where the network average speed etc are calculated.

Clone this wiki locally