|
YAACC - UPNP Client and Server
|
The Sendspin servers the phone controls (the controller role): the addresses the user added and one ControllerSession for each, made when the receivers are listed (it gives the card its state) and again when the user asks.
More...

Public Member Functions | |
| void | setYieldCheck (java.util.function.BiPredicate< Endpoint, String > check) |
Tells whether a session with the server at this address (and with this id) must stay away from it (see ControllerYield). | |
| void | setClientName (Supplier< String > clientName) |
| The name this app gives in the hello of its sessions (read when a session is made): "YAACC", or the shared network name if it is set. | |
| void | setCodePairing (Supplier< de.yaacc.sendspin.player.ClientCodePairing > codes) |
| The code-based pairing this app offers as a client (task 11.1): given to every session that is made after this call. | |
| synchronized void | windowOpened () |
| The operator opened the pairing window: the attempts that wait for it start. | |
| SendspinControllers (StringSetStore store, Supplier< Identity > identity, BooleanSupplier unpairedAllowed, Supplier< List< SendspinDirectory.Entry > > found, Connector connector, HubClock clock, SecureRandom random, java.util.function.Consumer< ControllerSession > changed) | |
| synchronized void | endSessionsOf (String serverId) |
| Ends the sessions with the server of this id; the user's next action makes them again. | |
| SendspinClientPairings | credentials () |
| The pairing records of this app as a client: the token it shows and the servers it is paired with. | |
| SendspinPlayers | servers () |
| The servers the user added; the settings dialog edits them. | |
| synchronized ControllerSession | session (Endpoint endpoint) |
| The current session of a server, or null if there is none (yet). | |
| synchronized boolean | offersSource (Endpoint endpoint) |
| True if the session with this server is up and the server takes audio from a source (it allows remote control and plays it). | |
| synchronized String | announcedName (Endpoint endpoint) |
| The name the server announced, or null. | |
| synchronized ControllerSession | acquire (Endpoint endpoint, boolean force) |
| The session of a server, made if there is none that is alive. | |
| synchronized void | remove (Endpoint endpoint) |
| Ends the session of a server and forgets the address. | |
| synchronized void | disconnect (Endpoint endpoint) |
| Ends the session of a server and keeps the address (the user asked to reconnect, or the switch went off). | |
| synchronized void | closeAll () |
| List< Endpoint > | listed () |
| The servers the user added, then the ones the network announced (a server in both lists is listed once). | |
| String | foundName (Endpoint endpoint) |
| The name a server announced by mDNS (cleaned, may be empty), or null if the network did not announce it. | |
Static Public Attributes | |
| static final int | SOURCE_RATE = 48000 |
| The rate of the audio this phone feeds into a server (the server converts it to the rate of its group). | |
The Sendspin servers the phone controls (the controller role): the addresses the user added and one ControllerSession for each, made when the receivers are listed (it gives the card its state) and again when the user asks.
After the guidance of the protocol a session that ended because the server wants pairing, did not authorize it, unpaired it, or sent something the client can not follow, or that the user closed, is not made again by a list refresh. The others are made again after a pause. Pure: the Android parts (preferences, identity storage) are passed in.
| synchronized ControllerSession de.yaacc.sendspin.SendspinControllers.acquire | ( | Endpoint | endpoint, |
| boolean | force ) |
The session of a server, made if there is none that is alive.
| force | true for an action of the user: a session that ended is made again whatever the reason |
Referenced by de.yaacc.sendspin.SendspinHub.receivers().

