YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.snapcast.client.NotificationPolicy Class Reference

When the notification of the service is rebuilt. More...

Collaboration diagram for de.yaacc.snapcast.client.NotificationPolicy:
Collaboration graph

Public Member Functions

synchronized boolean shouldRefresh (Object key, boolean phaseChange, long nowMillis)
 

Static Public Attributes

static final long MIN_INTERVAL_MS = 1000L
 

Detailed Description

When the notification of the service is rebuilt.

A rebuild costs binder calls on the main thread, and the events that ask for one (every server settings message, every status) are driven by the server, so the rule is: never when the shown text would be the same, at once for a change of phase (connecting, playing, reconnecting), and at most once per second for any other change. A request that is held back is not remembered; the status asks again every 250 ms. Pure.

Member Function Documentation

◆ shouldRefresh()

synchronized boolean de.yaacc.snapcast.client.NotificationPolicy.shouldRefresh ( Object key,
boolean phaseChange,
long nowMillis )
Parameters
keywhat would be shown (the text); equal keys are the same notification
phaseChangetrue when the request comes from a change of phase
Returns
true when the notification is to be rebuilt now (the policy then counts it as shown)

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