YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.browser.RendererStatusMonitor Class Reference

Monitors UPnP renderer status (transport state and track) by polling the AVTransport service. More...

Collaboration diagram for de.yaacc.browser.RendererStatusMonitor:
Collaboration graph

Classes

interface  StatusListener
 

Public Member Functions

void subscribe (StatusListener listener, Collection<? extends Device > devices)
 Registers the listener and starts polling every given device that isn't polled yet.
 
void unsubscribe (StatusListener listener)
 Removes the listener; it is not called again, even for results already queued.
 
RendererStatus getStatus (Device device)
 

Static Public Member Functions

static RendererStatusMonitor getShared ()
 The app-wide monitor.
 

Detailed Description

Monitors UPnP renderer status (transport state and track) by polling the AVTransport service.

Volume and mute are polled by ReceiverVolumeLiveUpdater, per host and only for the rows on screen.

One app-wide instance (getShared()) serves the Receiver tab and the device sheet, so opening the sheet doesn't start a second poller. Polling runs while at least one listener is subscribed; each device is polled by at most one chain. Unsubscribing the last listener bumps a generation counter, so requests still in flight neither notify anyone nor reschedule themselves. All public methods must be called on the main thread.

Member Function Documentation

◆ getShared()

static RendererStatusMonitor de.yaacc.browser.RendererStatusMonitor.getShared ( )
static

The app-wide monitor.

Holds no Context; listeners are held only until they unsubscribe.

◆ subscribe()

void de.yaacc.browser.RendererStatusMonitor.subscribe ( StatusListener listener,
Collection<? extends Device > devices )

Registers the listener and starts polling every given device that isn't polled yet.

Subscribing an already subscribed listener only adds devices.

◆ unsubscribe()

void de.yaacc.browser.RendererStatusMonitor.unsubscribe ( StatusListener listener)

Removes the listener; it is not called again, even for results already queued.

Polling stops once no listener is left.


The documentation for this class was generated from the following file: