YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.snapcast.SnapcastServerLink Interface Reference

The live view of one snapserver that the receivers need: the key, the last status that was read (immutable), and whether the control connection is up. More...

Inheritance diagram for de.yaacc.snapcast.SnapcastServerLink:
Inheritance graph
Collaboration diagram for de.yaacc.snapcast.SnapcastServerLink:
Collaboration graph

Classes

interface  Listener
 Told when the status or the connection state changed; may be called on any thread, with no lock held. More...
 

Public Member Functions

ServerKey getKey ()
 
SnapcastServerStatus getStatus ()
 The last status that was read; null before the first one.
 
boolean isOnline ()
 True while the control connection is up.
 
void addListener (Listener listener)
 
void removeListener (Listener listener)
 
default SnapcastOperations getOperations ()
 The control calls of the server (they block: never on the main thread), or null for a link that has none (a fake in a test).
 
default InetAddress getPeerAddress ()
 The address the control connection is connected to, or null without one.
 
default long getConnectionGeneration ()
 A number that changes with every new control connection of this link and never goes back; 0 for a fake.
 
void start ()
 Opens the connection (does nothing when started already).
 
void retry ()
 Connects now if the link waits for a retry or gave up.
 
void close ()
 Releases the connection and every thread; the link can not be used again.
 

Detailed Description

The live view of one snapserver that the receivers need: the key, the last status that was read (immutable), and whether the control connection is up.

SnapcastSession is the real one; the lists and the live source work on this interface, so that they are tested with a fake.

Member Function Documentation

◆ close()

void de.yaacc.snapcast.SnapcastServerLink.close ( )

Releases the connection and every thread; the link can not be used again.

Tells its listeners once, before it drops them, that it is offline (the owner of a feed to this server must hear of it), and does nothing the second time.

Implemented in de.yaacc.snapcast.SnapcastSession.

◆ getConnectionGeneration()

default long de.yaacc.snapcast.SnapcastServerLink.getConnectionGeneration ( )

A number that changes with every new control connection of this link and never goes back; 0 for a fake.

Implemented in de.yaacc.snapcast.SnapcastSession.

◆ getOperations()

default SnapcastOperations de.yaacc.snapcast.SnapcastServerLink.getOperations ( )

The control calls of the server (they block: never on the main thread), or null for a link that has none (a fake in a test).

SnapcastSession has them for as long as it is open.

Implemented in de.yaacc.snapcast.SnapcastSession.

◆ getPeerAddress()

default InetAddress de.yaacc.snapcast.SnapcastServerLink.getPeerAddress ( )

The address the control connection is connected to, or null without one.

The feed of a stream connects to this address and to no other. It is an address of the local network: never log it. A link that has none (a fake) answers null.

Implemented in de.yaacc.snapcast.SnapcastSession.

◆ getStatus()

SnapcastServerStatus de.yaacc.snapcast.SnapcastServerLink.getStatus ( )

The last status that was read; null before the first one.

It is kept while the server is offline.

Implemented in de.yaacc.snapcast.SnapcastSession.

◆ isOnline()

boolean de.yaacc.snapcast.SnapcastServerLink.isOnline ( )

True while the control connection is up.

Implemented in de.yaacc.snapcast.SnapcastSession.

◆ retry()

void de.yaacc.snapcast.SnapcastServerLink.retry ( )

Connects now if the link waits for a retry or gave up.

Implemented in de.yaacc.snapcast.SnapcastSession.

◆ start()

void de.yaacc.snapcast.SnapcastServerLink.start ( )

Opens the connection (does nothing when started already).

Implemented in de.yaacc.snapcast.SnapcastSession.


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