blob: 1af605c407e6d267d1c613d58db76bcd5902f5b1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package com.orbekk.same;
import java.util.List;
/**
* This class is used in tests.
*/
public class TestBroadcaster implements Broadcaster {
public ConnectionManager connections;
public TestBroadcaster() {
}
public TestBroadcaster(ConnectionManager connections) {
this.connections = connections;
}
public void broadcast(final List<String> targets,
final ServiceOperation operation) {
for (String t : targets) {
ClientService client = connections.getClient(t);
operation.run(client);
}
}
}
|