summaryrefslogtreecommitdiff
path: root/java/src/IceBox/Admin.java
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2007-02-01 17:09:49 +0000
committerBernard Normier <bernard@zeroc.com>2007-02-01 17:09:49 +0000
commitabada90e3f84dc703b8ddc9efcbed8a946fadead (patch)
tree2c6f9dccd510ea97cb927a7bd635422efaae547a /java/src/IceBox/Admin.java
parentremoving trace message (diff)
downloadice-abada90e3f84dc703b8ddc9efcbed8a946fadead.tar.bz2
ice-abada90e3f84dc703b8ddc9efcbed8a946fadead.tar.xz
ice-abada90e3f84dc703b8ddc9efcbed8a946fadead.zip
Expanded tabs into spaces
Diffstat (limited to 'java/src/IceBox/Admin.java')
-rw-r--r--java/src/IceBox/Admin.java146
1 files changed, 73 insertions, 73 deletions
diff --git a/java/src/IceBox/Admin.java b/java/src/IceBox/Admin.java
index d5cf19af4ea..79a88217d46 100644
--- a/java/src/IceBox/Admin.java
+++ b/java/src/IceBox/Admin.java
@@ -61,43 +61,43 @@ public final class Admin
Ice.Properties properties = communicator().getProperties();
- Ice.Identity managerIdentity = new Ice.Identity();
- managerIdentity.category = properties.getPropertyWithDefault("IceBox.InstanceName", "IceBox");
- managerIdentity.name = "ServiceManager";
-
- String managerProxy;
- if(properties.getProperty("Ice.Default.Locator").length() == 0)
- {
- //
- // DEPREACTED PROPERTIES: Remove extra code in future release.
- //
- String managerEndpoints =
- properties.getPropertyWithDefault("Ice.OA.IceBox.ServiceManager.Endpoints",
- properties.getProperty("IceBox.ServiceManager.Endpoints"));
- if(managerEndpoints.length() == 0)
- {
- System.err.println(appName() + ": property `IceBox.ServiceManager.Endpoints' is not set");
- return 1;
- }
-
- managerProxy = "\"" + communicator().identityToString(managerIdentity) + "\" :" + managerEndpoints;
- }
- else
- {
- //
- // DEPREACTED PROPERTIES: Remove extra code in future release.
- //
- String managerAdapterId =
- properties.getPropertyWithDefault("Ice.OA.IceBox.ServiceManager.AdapterId",
- properties.getProperty("IceBox.ServiceManager.AdapterId"));
- if(managerAdapterId.length() == 0)
- {
- System.err.println(appName() + ": property `IceBox.ServiceManager.AdapterId' is not set");
- return 1;
- }
-
- managerProxy = "\"" + communicator().identityToString(managerIdentity) + "\" @" + managerAdapterId;
- }
+ Ice.Identity managerIdentity = new Ice.Identity();
+ managerIdentity.category = properties.getPropertyWithDefault("IceBox.InstanceName", "IceBox");
+ managerIdentity.name = "ServiceManager";
+
+ String managerProxy;
+ if(properties.getProperty("Ice.Default.Locator").length() == 0)
+ {
+ //
+ // DEPREACTED PROPERTIES: Remove extra code in future release.
+ //
+ String managerEndpoints =
+ properties.getPropertyWithDefault("Ice.OA.IceBox.ServiceManager.Endpoints",
+ properties.getProperty("IceBox.ServiceManager.Endpoints"));
+ if(managerEndpoints.length() == 0)
+ {
+ System.err.println(appName() + ": property `IceBox.ServiceManager.Endpoints' is not set");
+ return 1;
+ }
+
+ managerProxy = "\"" + communicator().identityToString(managerIdentity) + "\" :" + managerEndpoints;
+ }
+ else
+ {
+ //
+ // DEPREACTED PROPERTIES: Remove extra code in future release.
+ //
+ String managerAdapterId =
+ properties.getPropertyWithDefault("Ice.OA.IceBox.ServiceManager.AdapterId",
+ properties.getProperty("IceBox.ServiceManager.AdapterId"));
+ if(managerAdapterId.length() == 0)
+ {
+ System.err.println(appName() + ": property `IceBox.ServiceManager.AdapterId' is not set");
+ return 1;
+ }
+
+ managerProxy = "\"" + communicator().identityToString(managerIdentity) + "\" @" + managerAdapterId;
+ }
Ice.ObjectPrx base = communicator().stringToProxy(managerProxy);
IceBox.ServiceManagerPrx manager = IceBox.ServiceManagerPrxHelper.checkedCast(base);
@@ -115,49 +115,49 @@ public final class Admin
manager.shutdown();
}
else if(command.equals("start"))
- {
- if(++i >= commands.size())
- {
+ {
+ if(++i >= commands.size())
+ {
System.err.println(appName() + ": no service name specified.");
return 1;
- }
-
- String service = (String)commands.get(i);
- try
- {
- manager.startService(service);
- }
- catch(IceBox.NoSuchServiceException ex)
- {
+ }
+
+ String service = (String)commands.get(i);
+ try
+ {
+ manager.startService(service);
+ }
+ catch(IceBox.NoSuchServiceException ex)
+ {
System.err.println(appName() + ": unknown service `" + service + "'");
- }
- catch(IceBox.AlreadyStartedException ex)
- {
- System.err.println(appName() + "service already started.");
- }
- }
+ }
+ catch(IceBox.AlreadyStartedException ex)
+ {
+ System.err.println(appName() + "service already started.");
+ }
+ }
else if(command.equals("stop"))
- {
- if(++i >= commands.size())
- {
+ {
+ if(++i >= commands.size())
+ {
System.err.println(appName() + ": no service name specified.");
return 1;
- }
-
- String service = (String)commands.get(i);
- try
- {
- manager.stopService(service);
- }
- catch(IceBox.NoSuchServiceException ex)
- {
+ }
+
+ String service = (String)commands.get(i);
+ try
+ {
+ manager.stopService(service);
+ }
+ catch(IceBox.NoSuchServiceException ex)
+ {
System.err.println(appName() + ": unknown service `" + service + "'");
- }
- catch(IceBox.AlreadyStoppedException ex)
- {
- System.err.println(appName() + "service already stopped.");
- }
- }
+ }
+ catch(IceBox.AlreadyStoppedException ex)
+ {
+ System.err.println(appName() + "service already stopped.");
+ }
+ }
else
{
System.err.println(appName() + ": unknown command `" + command + "'");