Interface DynamicBroadcastConfig
-
- All Known Implementing Classes:
DocumentBroadcastConfig
public interface DynamicBroadcastConfig
Broadcast configuration. Configuration is dynamic, that means can change over time. The configuration consists of a list of connected clients. Each client can connect and disconnect, and therefore allow other clients to connect to it.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
connect(Map<String,String> clientInfo)
Announce a new client to others.void
disconnect(String id)
Sign off.List<Map<String,String>>
getClientInfo()
Get the client info of all connected clients.String
getConfig()
Get the global configuration data that is not associated to a specific client.
-
-
-
Field Detail
-
ID
static final String ID
The unique id of this client.- See Also:
- Constant Field Values
-
LISTENER
static final String LISTENER
The listener address, for example the IP address and port.- See Also:
- Constant Field Values
-
-
Method Detail
-
getConfig
String getConfig()
Get the global configuration data that is not associated to a specific client.- Returns:
- the configuration
-
getClientInfo
List<Map<String,String>> getClientInfo()
Get the client info of all connected clients.- Returns:
- the list of client info maps
-
connect
String connect(Map<String,String> clientInfo)
Announce a new client to others.- Parameters:
clientInfo
- the client info- Returns:
- a unique id (to be used when disconnecting)
-
disconnect
void disconnect(String id)
Sign off.- Parameters:
id
- the unique id
-
-