summaryrefslogtreecommitdiff
path: root/java/demo/IceGrid/simple
diff options
context:
space:
mode:
Diffstat (limited to 'java/demo/IceGrid/simple')
-rw-r--r--java/demo/IceGrid/simple/Client.java82
-rw-r--r--java/demo/IceGrid/simple/HelloI.java2
-rw-r--r--java/demo/IceGrid/simple/Server.java10
3 files changed, 47 insertions, 47 deletions
diff --git a/java/demo/IceGrid/simple/Client.java b/java/demo/IceGrid/simple/Client.java
index d877a201051..58ed8b8a64d 100644
--- a/java/demo/IceGrid/simple/Client.java
+++ b/java/demo/IceGrid/simple/Client.java
@@ -13,18 +13,18 @@ public class Client extends Ice.Application
{
class ShutdownHook extends Thread
{
- public void
- run()
- {
- try
- {
- communicator().destroy();
- }
- catch(Ice.LocalException ex)
- {
- ex.printStackTrace();
- }
- }
+ public void
+ run()
+ {
+ try
+ {
+ communicator().destroy();
+ }
+ catch(Ice.LocalException ex)
+ {
+ ex.printStackTrace();
+ }
+ }
}
private void
@@ -41,34 +41,34 @@ public class Client extends Ice.Application
public int
run(String[] args)
{
- //
- // Since this is an interactive demo we want to clear the
- // Application installed interrupt callback and install our
- // own shutdown hook.
- //
- setInterruptHook(new ShutdownHook());
+ //
+ // Since this is an interactive demo we want to clear the
+ // Application installed interrupt callback and install our
+ // own shutdown hook.
+ //
+ setInterruptHook(new ShutdownHook());
- //
- // First we try to connect to the object with the `hello'
- // identity. If it's not registered with the registry, we
- // search for an object with the ::Demo::Hello type.
- //
- HelloPrx hello = null;
- try
- {
- hello = HelloPrxHelper.checkedCast(communicator().stringToProxy("hello"));
- }
- catch(Ice.NotRegisteredException ex)
- {
- IceGrid.QueryPrx query =
- IceGrid.QueryPrxHelper.checkedCast(communicator().stringToProxy("DemoIceGrid/Query"));
- hello = HelloPrxHelper.checkedCast(query.findObjectByType("::Demo::Hello"));
- }
- if(hello == null)
- {
+ //
+ // First we try to connect to the object with the `hello'
+ // identity. If it's not registered with the registry, we
+ // search for an object with the ::Demo::Hello type.
+ //
+ HelloPrx hello = null;
+ try
+ {
+ hello = HelloPrxHelper.checkedCast(communicator().stringToProxy("hello"));
+ }
+ catch(Ice.NotRegisteredException ex)
+ {
+ IceGrid.QueryPrx query =
+ IceGrid.QueryPrxHelper.checkedCast(communicator().stringToProxy("DemoIceGrid/Query"));
+ hello = HelloPrxHelper.checkedCast(query.findObjectByType("::Demo::Hello"));
+ }
+ if(hello == null)
+ {
System.err.println("couldn't find a `::Demo::Hello' object");
- return 1;
- }
+ return 1;
+ }
menu();
@@ -125,8 +125,8 @@ public class Client extends Ice.Application
public static void
main(String[] args)
{
- Client app = new Client();
- int status = app.main("Client", args, "config.client");
- System.exit(status);
+ Client app = new Client();
+ int status = app.main("Client", args, "config.client");
+ System.exit(status);
}
}
diff --git a/java/demo/IceGrid/simple/HelloI.java b/java/demo/IceGrid/simple/HelloI.java
index cece7b2bc8b..39bfae4682d 100644
--- a/java/demo/IceGrid/simple/HelloI.java
+++ b/java/demo/IceGrid/simple/HelloI.java
@@ -13,7 +13,7 @@ public class HelloI extends _HelloDisp
{
public HelloI(String name)
{
- _name = name;
+ _name = name;
}
public void
diff --git a/java/demo/IceGrid/simple/Server.java b/java/demo/IceGrid/simple/Server.java
index b622578f9f4..1c7722e7a71 100644
--- a/java/demo/IceGrid/simple/Server.java
+++ b/java/demo/IceGrid/simple/Server.java
@@ -13,8 +13,8 @@ public class Server extends Ice.Application
run(String[] args)
{
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Hello");
- Ice.Properties properties = communicator().getProperties();
- Ice.Identity id = communicator().stringToIdentity(properties.getProperty("Identity"));
+ Ice.Properties properties = communicator().getProperties();
+ Ice.Identity id = communicator().stringToIdentity(properties.getProperty("Identity"));
adapter.add(new HelloI(properties.getProperty("Ice.ServerId")), id);
adapter.activate();
communicator().waitForShutdown();
@@ -24,8 +24,8 @@ public class Server extends Ice.Application
static public void
main(String[] args)
{
- Server app = new Server();
- int status = app.main("Server", args);
- System.exit(status);
+ Server app = new Server();
+ int status = app.main("Server", args);
+ System.exit(status);
}
}