summaryrefslogtreecommitdiff
path: root/same/src/main/java/com
diff options
context:
space:
mode:
authorKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-03-20 10:10:14 +0100
committerKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-03-20 10:10:14 +0100
commitac5b56dfcd1233eb2c6273ec94c3c4eebbea2461 (patch)
tree5ea44c85e922e943bdd39c69d3c09d54a55f0e66 /same/src/main/java/com
parent1a2497d1a6ab3c577faf81ca692c218bbdc33fa6 (diff)
Add Broadcaster in Client.
Diffstat (limited to 'same/src/main/java/com')
-rw-r--r--same/src/main/java/com/orbekk/same/Client.java4
-rw-r--r--same/src/main/java/com/orbekk/same/SameController.java2
2 files changed, 4 insertions, 2 deletions
diff --git a/same/src/main/java/com/orbekk/same/Client.java b/same/src/main/java/com/orbekk/same/Client.java
index d4ec19e..7079016 100644
--- a/same/src/main/java/com/orbekk/same/Client.java
+++ b/same/src/main/java/com/orbekk/same/Client.java
@@ -24,6 +24,7 @@ public class Client implements DiscoveryListener {
String masterUrl;
private int masterId = -1;
private MasterController masterController = null;
+ private Broadcaster broadcaster;
private List<StateChangedListener> stateListeners =
new ArrayList<StateChangedListener>();
@@ -134,10 +135,11 @@ public class Client implements DiscoveryListener {
};
public Client(State state, ConnectionManager connections,
- String myUrl) {
+ String myUrl, Broadcaster broadcaster) {
this.state = state;
this.connections = connections;
this.myUrl = myUrl;
+ this.broadcaster = broadcaster;
}
public void start() {
diff --git a/same/src/main/java/com/orbekk/same/SameController.java b/same/src/main/java/com/orbekk/same/SameController.java
index a9b389c..ceeca73 100644
--- a/same/src/main/java/com/orbekk/same/SameController.java
+++ b/same/src/main/java/com/orbekk/same/SameController.java
@@ -77,7 +77,7 @@ public class SameController {
// masterUrl, configuration.get("networkName"));
Client client = new Client(clientState, connections,
- clientUrl);
+ clientUrl, BroadcasterImpl.getDefaultBroadcastRunner());
PaxosServiceImpl paxos = new PaxosServiceImpl("");
DiscoveryService discoveryService = null;