summaryrefslogtreecommitdiff
path: root/jsonrpc/src/main/java/com/orbekk/same/SameService.java
diff options
context:
space:
mode:
authorKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-01-11 15:33:19 +0100
committerKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-01-11 15:33:19 +0100
commitee0b57e81fce368e931a0d7282d8d84a9ecffd71 (patch)
tree549062eb4601e703c0333199da200fe5abf90eb2 /jsonrpc/src/main/java/com/orbekk/same/SameService.java
parent47e43eefebae63afee1a1743602c15e3b1ede8ff (diff)
Add participant synchronization.
- No error handling in the protocol at the moment.
Diffstat (limited to 'jsonrpc/src/main/java/com/orbekk/same/SameService.java')
-rw-r--r--jsonrpc/src/main/java/com/orbekk/same/SameService.java23
1 files changed, 19 insertions, 4 deletions
diff --git a/jsonrpc/src/main/java/com/orbekk/same/SameService.java b/jsonrpc/src/main/java/com/orbekk/same/SameService.java
index 9e1071d..8f239da 100644
--- a/jsonrpc/src/main/java/com/orbekk/same/SameService.java
+++ b/jsonrpc/src/main/java/com/orbekk/same/SameService.java
@@ -14,12 +14,27 @@ public interface SameService {
/**
* A request from the callee to participate in 'networkName'.
*/
- void participateNetwork(String networkName, String clientId,
- String url);
+ void participateNetwork(String networkName, String clientId, String url);
/**
* Notification of participation in network.
*/
- void notifyParticipation(String networkName, String masterId,
- Map<String, String> participants);
+ void notifyParticipation(String networkName, String masterId);
+
+ /**
+ * New state.
+ *
+ * When sent to a non-master from the master, use 'newState' as the
+ * current state.
+ *
+ * When sent to a master, broadcast the new state to all clients.
+ */
+ void setState(String newState);
+
+ /**
+ * Notify all nodes of network participants.
+ *
+ * Only sent from master to non-master.
+ */
+ void setParticipants(Map<String, String> participants);
}