BandwidthMeter.EventListener.EventDispatcher


class BandwidthMeter.EventListener.EventDispatcher


Event dispatcher which allows listener registration.

Summary

Public constructors

Creates an event dispatcher.

Public functions

Unit
addListener(
    eventHandler: Handler!,
    eventListener: BandwidthMeter.EventListener!
)

Adds a listener to the event dispatcher.

Unit
bandwidthSample(
    elapsedMs: Int,
    bytesTransferred: Long,
    bitrateEstimate: Long
)
Unit

Removes a listener from the event dispatcher.

Public constructors

EventDispatcher

EventDispatcher()

Creates an event dispatcher.

Public functions

addListener

fun addListener(
    eventHandler: Handler!,
    eventListener: BandwidthMeter.EventListener!
): Unit

Adds a listener to the event dispatcher.

bandwidthSample

fun bandwidthSample(
    elapsedMs: Int,
    bytesTransferred: Long,
    bitrateEstimate: Long
): Unit

removeListener

fun removeListener(eventListener: BandwidthMeter.EventListener!): Unit

Removes a listener from the event dispatcher.