What the mDNS discovery saw since the scan started, kept for the report the user can read and copy (task 11.6): the callbacks of NsdManager (start, stop, found, lost, resolve) with the failure codes, and exact counters per browsed type.
More...
|
| class | Event |
| | One event.
|
| |
| enum | Kind |
| | What happened. More...
|
| |
| class | Snapshot |
| | A copy of the log at one moment; later events do not change it.
|
| |
| class | TypeStats |
| | The numbers of one browsed type.
|
| |
|
|
| SnapcastDiscoveryLog (MonotonicClock clock) |
| |
|
synchronized void | scanStarted () |
| | A new scan starts: what the last one saw is forgotten.
|
| |
|
synchronized int | scanId () |
| | The number of the scan that runs now; a callback records with the number it was started with.
|
| |
|
synchronized void | record (int forScan, Kind kind, String type, String name, int code, String detail) |
| | As record(Kind, String, String, int, String), for a callback of the scan with this number: when a newer scan has started meanwhile (the page was hidden and shown again), a late callback of the earlier one, such as the confirmation of its stop, is dropped and does not change the new scan's lines.
|
| |
| synchronized void | record (Kind kind, String type, String name, int code, String detail) |
| | Records an event.
|
| |
|
synchronized Snapshot | snapshot () |
| |
|
|
static final int | CAPACITY = 40 |
| | The most events kept.
|
| |
What the mDNS discovery saw since the scan started, kept for the report the user can read and copy (task 11.6): the callbacks of NsdManager (start, stop, found, lost, resolve) with the failure codes, and exact counters per browsed type.
Bounded: the last {@value CAPACITY} events, the counters are numbers and exist for the browsed types only, so a network that announces a flood of services (or of types) grows nothing. Names and details come from the network and are cleaned and cut here. Never written to the app log (a name or an address of the local network is display text only). Thread safe.
◆ record()
| synchronized void de.yaacc.snapcast.discovery.SnapcastDiscoveryLog.record |
( |
Kind | kind, |
|
|
String | type, |
|
|
String | name, |
|
|
int | code, |
|
|
String | detail ) |
Records an event.
- Parameters
-
| type | the service type as the platform reported it |
| name | the service name, or empty |
| code | the failure code of NsdManager, 0 if the event has none |
| detail | an address and port, or empty |
The documentation for this class was generated from the following file:
- /github/workspace/yaacc/src/main/java/de/yaacc/snapcast/discovery/SnapcastDiscoveryLog.java