BandwidthMeter.EventListener.EventDispatcher


public final class BandwidthMeter.EventListener.EventDispatcher


Event dispatcher which allows listener registration.

Summary

Public constructors

Creates an event dispatcher.

Public methods

void
addListener(
    Handler eventHandler,
    BandwidthMeter.EventListener eventListener
)

Adds a listener to the event dispatcher.

void
bandwidthSample(
    int elapsedMs,
    long bytesTransferred,
    long bitrateEstimate
)
void

Removes a listener from the event dispatcher.

Public constructors

EventDispatcher

public EventDispatcher()

Creates an event dispatcher.

Public methods

addListener

public void addListener(
    Handler eventHandler,
    BandwidthMeter.EventListener eventListener
)

Adds a listener to the event dispatcher.

bandwidthSample

public void bandwidthSample(
    int elapsedMs,
    long bytesTransferred,
    long bitrateEstimate
)

removeListener

public void removeListener(BandwidthMeter.EventListener eventListener)

Removes a listener from the event dispatcher.