diff options
author | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-04-24 14:45:42 +0200 |
---|---|---|
committer | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-04-24 14:45:42 +0200 |
commit | 6f28bd85613280e3fd3f55f9a122b0421bd07620 (patch) | |
tree | c2452f280802b0354897a8735617c25728decaae /same/src/main | |
parent | 9f4ddb42153f55675f7739eadacdcc8294fe07be (diff) |
Remember to register client service.
Diffstat (limited to 'same/src/main')
-rw-r--r-- | same/src/main/java/com/orbekk/same/DirectoryApp.java | 2 | ||||
-rw-r--r-- | same/src/main/java/com/orbekk/same/Master.java | 1 | ||||
-rw-r--r-- | same/src/main/java/com/orbekk/same/SameController.java | 6 |
3 files changed, 6 insertions, 3 deletions
diff --git a/same/src/main/java/com/orbekk/same/DirectoryApp.java b/same/src/main/java/com/orbekk/same/DirectoryApp.java index 08c3cc5..ceca49d 100644 --- a/same/src/main/java/com/orbekk/same/DirectoryApp.java +++ b/same/src/main/java/com/orbekk/same/DirectoryApp.java @@ -31,7 +31,7 @@ public class DirectoryApp { final Rpc rpc = new Rpc(); MasterState request = MasterState.newBuilder() .setNetworkName("Test network") - .setMasterUrl("invalid:invalid") + .setMasterLocation("invalid:invalid") .build(); RpcCallback<Empty> done = new RpcCallback<Empty>() { @Override public void run(Empty unused) { diff --git a/same/src/main/java/com/orbekk/same/Master.java b/same/src/main/java/com/orbekk/same/Master.java index c83d4a6..fb3306e 100644 --- a/same/src/main/java/com/orbekk/same/Master.java +++ b/same/src/main/java/com/orbekk/same/Master.java @@ -93,7 +93,6 @@ public class Master { done.run(Empty.getDefaultInstance()); } - @Override public void updateStateRequest(RpcController controller, Services.Component request, RpcCallback<Services.UpdateComponentResponse> done) { diff --git a/same/src/main/java/com/orbekk/same/SameController.java b/same/src/main/java/com/orbekk/same/SameController.java index c44d3bb..a16f57a 100644 --- a/same/src/main/java/com/orbekk/same/SameController.java +++ b/same/src/main/java/com/orbekk/same/SameController.java @@ -79,6 +79,7 @@ public class SameController { .build(); SimpleProtobufServer pServer = SimpleProtobufServer.create(pport); + pServer.registerService(client.getNewService()); SameController controller = new SameController( configuration, connections, server, master, client, @@ -153,6 +154,10 @@ public class SameController { return master; } + public void registerCurrentNetwork() { + registerNetwork(master); + } + public void registerNetwork(Master master) { Services.Directory directory = getDirectory(); if (directory == null) { @@ -160,7 +165,6 @@ public class SameController { } Services.MasterState request = Services.MasterState.newBuilder() .setNetworkName(master.getNetworkName()) - .setMasterUrl(master.getUrl()) .setMasterLocation(master.getLocation()) .build(); final Rpc rpc = new Rpc(); |