summaryrefslogtreecommitdiff
path: root/same/src
diff options
context:
space:
mode:
authorKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-04-30 12:04:45 +0200
committerKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-04-30 12:04:45 +0200
commitd87e94e9765c33ccf49d4743d2e4be94d65a5e76 (patch)
tree6940946b338572176bbe31b22b09c6b8a67b536d /same/src
parent5c3fa20e73f4f3ae7ab276f6f53dd8f8feb18a48 (diff)
Add master kill switch.
Diffstat (limited to 'same/src')
-rw-r--r--same/src/main/java/com/orbekk/same/SameController.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/same/src/main/java/com/orbekk/same/SameController.java b/same/src/main/java/com/orbekk/same/SameController.java
index 068ad68..c7e18fa 100644
--- a/same/src/main/java/com/orbekk/same/SameController.java
+++ b/same/src/main/java/com/orbekk/same/SameController.java
@@ -46,7 +46,9 @@ public class SameController {
@Override
public void disableMaster() {
if (master != null) {
+ pServer.removeService(master.getNewService());
master.interrupt();
+ master = null;
}
}
};
@@ -173,4 +175,8 @@ public class SameController {
public VariableFactory createVariableFactory() {
return new VariableFactory(client.getInterface());
}
+
+ public void killMaster() {
+ masterController.disableMaster();
+ }
}