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

What the "Add receiver" input does (tasks 5.4, 5.5, 5.7). More...

Collaboration diagram for de.yaacc.fcast.discovery.FCastAddReceiver:
Collaboration graph

Classes

interface  Environment
 The world of the input: the receivers found, the network tests, the store, the clock. More...
 
enum  Outcome
 
class  Result
 What happened.
 

Public Member Functions

 FCastAddReceiver (Environment environment)
 
Result add (String input)
 

Static Public Attributes

static final int SEARCH_ROUNDS = 4
 The search of step (c): rounds and the wait of each (about 4 seconds).
 
static final long SEARCH_ROUND_MILLIS = 1_000L
 

Detailed Description

What the "Add receiver" input does (tasks 5.4, 5.5, 5.7).

One text goes in; the order is:

  1. a connection URL (fcast://r/..., FCastConnectionUrl): the addresses are tried in order, the first that answers is added with the name of the link;
  2. an IP address (host:port with an IP literal, port optional): added at once, without testing it (a receiver that is switched off can be added);
  3. a name: (a) a receiver that was found already (by its announced name, or the computer's host name that the default name FCast-<host> contains; whole name, upper or lower case, .local ignored; two receivers with that name give Outcome#AMBIGUOUS); (b) the system's name lookup for something that can be a host name (the address must be of the local network); (c) a search of a few seconds for a receiver of that name, only while discovery runs. The failure says what was tried.

The stored entry keeps the resolved address and the name that was typed, so a changed address is found again by the name (D6). Pure: the network and the clock are behind Environment.


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