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

The stable identity of a snapserver for YAACC: its control endpoint, in the canonical text host:port (an IPv6 literal in brackets). More...

Collaboration diagram for de.yaacc.snapcast.discovery.ServerKey:
Collaboration graph

Public Member Functions

String asString ()
 The canonical text.
 
ServerEndpoint getEndpoint ()
 
boolean equals (Object other)
 
int hashCode ()
 
String toString ()
 

Static Public Member Functions

static ServerKey of (ServerEndpoint endpoint)
 
static ServerKey parse (String text)
 

Detailed Description

The stable identity of a snapserver for YAACC: its control endpoint, in the canonical text host:port (an IPv6 literal in brackets).

A server has no id of its own that can be trusted (the Snapcast status carries a host name and a MAC address that may be empty or invented), so the endpoint the user or the network gave us is the identity: one endpoint found twice, by mDNS and by hand, is one server. Immutable.

The text is used inside receiver ids (snapcast:<key>:<group id>); parse accepts only the canonical form, so an id that was written by someone else (or edited) is not a key. It carries an address of the local network: show it, never log it.

Member Function Documentation

◆ parse()

static ServerKey de.yaacc.snapcast.discovery.ServerKey.parse ( String text)
static
Returns
the key for exactly this canonical text, or null (also for a valid endpoint written in another form)

Referenced by de.yaacc.snapcast.SnapcastGroupDevice.parseId().

Here is the call graph for this function:
Here is the caller graph for this function:

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