summaryrefslogtreecommitdiff
path: root/same/src/main
diff options
context:
space:
mode:
authorKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-01-26 19:44:55 +0100
committerKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-01-26 19:44:55 +0100
commit52c1e7a6643d4a010c5571f565386440e17fe5e6 (patch)
treef3596b8a4b8baec5a9e1ab7b1f82ddb38ea99146 /same/src/main
parent70ada562e71093faefe7001b49259f3329c7c959 (diff)
Use SameController in ClientApp.
Diffstat (limited to 'same/src/main')
-rw-r--r--same/src/main/java/com/orbekk/same/ClientApp.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/same/src/main/java/com/orbekk/same/ClientApp.java b/same/src/main/java/com/orbekk/same/ClientApp.java
index b8b6730..3c67ae2 100644
--- a/same/src/main/java/com/orbekk/same/ClientApp.java
+++ b/same/src/main/java/com/orbekk/same/ClientApp.java
@@ -53,12 +53,14 @@ public class ClientApp {
public void run(int port, String networkName,
String masterUrl) {
- getClient(port, networkName, masterUrl);
+ SameController controller = SameController.create(port);
try {
- server.join();
- } catch (InterruptedException e) {
- logger.warn("Interrupted.", e);
+ controller.start();
+ } catch (Exception e) {
+ logger.error("Failed to start Same", e);
}
+ controller.joinNetwork(masterUrl);
+ controller.join();
}
public static void main(String[] args) {