summaryrefslogtreecommitdiff
path: root/jsonrpc/src/main/java/com/orbekk/rpc/Client.java
diff options
context:
space:
mode:
authorKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-01-10 22:24:01 +0100
committerKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-01-10 22:33:00 +0100
commitfc7ef2ba156db641e1d193cc2e3f1352eaa74bd8 (patch)
treeb020dbcee136476eaf1cf6c8c22a7530789887d1 /jsonrpc/src/main/java/com/orbekk/rpc/Client.java
parent3fd156ef2cd87e0b70dc5906aad7071ab908cedf (diff)
Add SameState class to manage the state of a client.
The SameState class manages a view of the 'Same' network. Some functionality was moved from SameServiceImpl to SameState.
Diffstat (limited to 'jsonrpc/src/main/java/com/orbekk/rpc/Client.java')
-rw-r--r--jsonrpc/src/main/java/com/orbekk/rpc/Client.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/jsonrpc/src/main/java/com/orbekk/rpc/Client.java b/jsonrpc/src/main/java/com/orbekk/rpc/Client.java
index ba77df6..99abf93 100644
--- a/jsonrpc/src/main/java/com/orbekk/rpc/Client.java
+++ b/jsonrpc/src/main/java/com/orbekk/rpc/Client.java
@@ -10,11 +10,12 @@ import com.googlecode.jsonrpc4j.ProxyUtil;
public class Client {
public static void main(String[] args) {
- if (args.length < 1) {
- System.err.println("Arguments: networkAddress");
+ if (args.length < 2) {
+ System.err.println("Arguments: networkAddress port");
System.exit(1);
}
String networkAddress = args[0];
+ int port = Integer.parseInt(args[1]);
JsonRpcHttpClient client = null;
try {
client = new JsonRpcHttpClient(new URL(networkAddress));
@@ -26,6 +27,6 @@ public class Client {
SameService.class,
client);
service.notifyNetwork("NoNetwork");
- System.out.println(service.participateNetwork("FirstNetwork"));
+ service.participateNetwork("FirstNetwork", port);
}
}