diff options
Diffstat (limited to 'java/demo/Ice/hello/Client.java')
-rw-r--r-- | java/demo/Ice/hello/Client.java | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/java/demo/Ice/hello/Client.java b/java/demo/Ice/hello/Client.java index db51bc8d5e3..fefa66ec80b 100644 --- a/java/demo/Ice/hello/Client.java +++ b/java/demo/Ice/hello/Client.java @@ -34,7 +34,7 @@ public class Client Ice.Properties properties = communicator.getProperties(); final String refProperty = "Hello.Hello"; String ref = properties.getProperty(refProperty); - if (ref.length() == 0) + if(ref.length() == 0) { System.err.println("property `" + refProperty + "' not set"); return 1; @@ -42,7 +42,7 @@ public class Client Ice.ObjectPrx base = communicator.stringToProxy(ref); HelloPrx twoway = HelloPrxHelper.checkedCast(base.ice_twoway().ice_timeout(-1).ice_secure(false)); - if (twoway == null) + if(twoway == null) { System.err.println("invalid object reference"); return 1; @@ -67,38 +67,38 @@ public class Client System.out.print("==> "); System.out.flush(); line = in.readLine(); - if (line == null) + if(line == null) { break; } - if (line.equals("t")) + if(line.equals("t")) { twoway.hello(); } - else if (line.equals("o")) + else if(line.equals("o")) { oneway.hello(); } - else if (line.equals("O")) + else if(line.equals("O")) { batchOneway.hello(); } - else if (line.equals("d")) + else if(line.equals("d")) { datagram.hello(); } - else if (line.equals("D")) + else if(line.equals("D")) { batchDatagram.hello(); } - else if (line.equals("f")) + else if(line.equals("f")) { batchOneway.ice_flush(); batchDatagram.ice_flush(); } - else if (line.equals("T")) + else if(line.equals("T")) { - if (timeout == -1) + if(timeout == -1) { timeout = 2000; } @@ -111,7 +111,7 @@ public class Client oneway = HelloPrxHelper.uncheckedCast(oneway.ice_timeout(timeout)); batchOneway = HelloPrxHelper.uncheckedCast(batchOneway.ice_timeout(timeout)); - if (timeout == -1) + if(timeout == -1) { System.out.println("timeout is now switched off"); } @@ -120,7 +120,7 @@ public class Client System.out.println("timeout is now set to 2000ms"); } } - else if (line.equals("S")) + else if(line.equals("S")) { secure = !secure; @@ -130,7 +130,7 @@ public class Client datagram = HelloPrxHelper.uncheckedCast(datagram.ice_secure(secure)); batchDatagram = HelloPrxHelper.uncheckedCast(batchDatagram.ice_secure(secure)); - if (secure) + if(secure) { System.out.println("secure mode is now on"); } @@ -139,15 +139,15 @@ public class Client System.out.println("secure mode is now off"); } } - else if (line.equals("s")) + else if(line.equals("s")) { twoway.shutdown(); } - else if (line.equals("x")) + else if(line.equals("x")) { // Nothing to do } - else if (line.equals("?")) + else if(line.equals("?")) { menu(); } @@ -166,7 +166,7 @@ public class Client ex.printStackTrace(); } } - while (!line.equals("x")); + while(!line.equals("x")); return 0; } @@ -190,7 +190,7 @@ public class Client status = 1; } - if (communicator != null) + if(communicator != null) { try { |