summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2006-05-12 16:19:39 +0000
committerDwayne Boone <dwayne@zeroc.com>2006-05-12 16:19:39 +0000
commitf90a2c19d6809e9262b8cdd2d31c92a3da11f348 (patch)
treea5bdbc4c35932d9cfa360fbcfed3ac918f60c29b /java
parentUse commuinicator-stringToIdentity (diff)
downloadice-f90a2c19d6809e9262b8cdd2d31c92a3da11f348.tar.bz2
ice-f90a2c19d6809e9262b8cdd2d31c92a3da11f348.tar.xz
ice-f90a2c19d6809e9262b8cdd2d31c92a3da11f348.zip
Use communicator stringToIdentity
Diffstat (limited to 'java')
-rw-r--r--java/demo/Freeze/library/Collocated.java2
-rw-r--r--java/demo/Freeze/library/Server.java2
-rw-r--r--java/demo/Freeze/phonebook/Collocated.java2
-rw-r--r--java/demo/Freeze/phonebook/Server.java2
-rw-r--r--java/demo/Glacier2/callback/Client.java2
-rw-r--r--java/demo/Glacier2/callback/Server.java2
-rw-r--r--java/demo/Glacier2/callback/SessionServer.java4
-rwxr-xr-xjava/demo/Ice/bidir/CallbackSenderI.java10
-rwxr-xr-xjava/demo/Ice/bidir/Server.java2
-rw-r--r--java/demo/Ice/callback/Client.java4
-rw-r--r--java/demo/Ice/callback/Server.java2
-rw-r--r--java/demo/Ice/hello/Server.java2
-rw-r--r--java/demo/Ice/invoke/Server.java2
-rw-r--r--java/demo/Ice/latency/Server.java2
-rwxr-xr-xjava/demo/Ice/minimal/Server.java2
-rw-r--r--java/demo/Ice/nested/Client.java4
-rw-r--r--java/demo/Ice/nested/NestedClient.java4
-rw-r--r--java/demo/Ice/nested/NestedServer.java4
-rw-r--r--java/demo/Ice/nested/Server.java4
-rw-r--r--java/demo/Ice/session/Server.java2
-rw-r--r--java/demo/Ice/throughput/Server.java2
-rw-r--r--java/demo/Ice/value/Server.java2
-rw-r--r--java/demo/IceBox/hello/HelloServiceI.java2
-rw-r--r--java/demo/IceGrid/simple/Server.java2
-rwxr-xr-xjava/demo/book/printer/Server.java2
-rwxr-xr-xjava/demo/book/simple_filesystem/Filesystem/DirectoryI.java3
-rwxr-xr-xjava/demo/book/simple_filesystem/Filesystem/FileI.java2
-rw-r--r--java/src/IceBox/ServiceManagerI.java2
-rw-r--r--java/src/IceInternal/ReferenceFactory.java2
-rw-r--r--java/test/Freeze/evictor/RemoteEvictorFactoryI.java2
-rw-r--r--java/test/Freeze/evictor/RemoteEvictorI.java2
-rw-r--r--java/test/Freeze/evictor/Server.java2
-rw-r--r--java/test/Glacier2/router/CallbackClient.java6
-rw-r--r--java/test/Glacier2/router/CallbackServer.java8
-rw-r--r--java/test/Ice/binding/RemoteObjectAdapterI.java3
-rw-r--r--java/test/Ice/binding/Server.java2
-rw-r--r--java/test/Ice/checksum/server/Server.java2
-rw-r--r--java/test/Ice/custom/Collocated.java2
-rw-r--r--java/test/Ice/custom/Server.java2
-rw-r--r--java/test/Ice/exceptions/AllTests.java22
-rw-r--r--java/test/Ice/exceptions/Collocated.java2
-rw-r--r--java/test/Ice/exceptions/Server.java2
-rw-r--r--java/test/Ice/exceptionsAMD/Server.java2
-rw-r--r--java/test/Ice/facets/AllTests.java26
-rw-r--r--java/test/Ice/facets/Collocated.java8
-rw-r--r--java/test/Ice/facets/Server.java8
-rw-r--r--java/test/Ice/faultTolerance/Server.java2
-rw-r--r--java/test/Ice/hold/Server.java2
-rw-r--r--java/test/Ice/inheritance/Collocated.java2
-rw-r--r--java/test/Ice/inheritance/Server.java2
-rw-r--r--java/test/Ice/location/AllTests.java2
-rw-r--r--java/test/Ice/location/Server.java8
-rw-r--r--java/test/Ice/location/ServerManagerI.java4
-rw-r--r--java/test/Ice/location/TestI.java9
-rw-r--r--java/test/Ice/objects/Collocated.java2
-rw-r--r--java/test/Ice/objects/Server.java2
-rw-r--r--java/test/Ice/operations/AllTests.java4
-rw-r--r--java/test/Ice/operations/Collocated.java4
-rw-r--r--java/test/Ice/operations/MyDerivedClassI.java2
-rw-r--r--java/test/Ice/operations/Server.java4
-rw-r--r--java/test/Ice/operations/Twoways.java6
-rw-r--r--java/test/Ice/operations/TwowaysAMI.java14
-rw-r--r--java/test/Ice/operationsAMD/MyDerivedClassI.java2
-rw-r--r--java/test/Ice/operationsAMD/Server.java4
-rw-r--r--java/test/Ice/package/Server.java2
-rw-r--r--java/test/Ice/retry/Server.java2
-rw-r--r--java/test/Ice/slicing/exceptionsAMD/Server.java2
-rw-r--r--java/test/Ice/slicing/objectsAMD/Server.java2
-rw-r--r--java/test/Ice/timeout/Server.java2
-rw-r--r--java/test/IceGrid/simple/Server.java2
-rw-r--r--java/test/IceSSL/configuration/Server.java2
71 files changed, 145 insertions, 124 deletions
diff --git a/java/demo/Freeze/library/Collocated.java b/java/demo/Freeze/library/Collocated.java
index 6cecf6ed8c6..eef5dcdb598 100644
--- a/java/demo/Freeze/library/Collocated.java
+++ b/java/demo/Freeze/library/Collocated.java
@@ -35,7 +35,7 @@ class LibraryCollocated extends Ice.Application
// Create the library, and add it to the Object Adapter.
//
LibraryI library = new LibraryI(communicator(), _envName, "authors", evictor);
- adapter.add(library, Ice.Util.stringToIdentity("library"));
+ adapter.add(library, communicator().stringToIdentity("library"));
//
// Create and install a factory and initializer for books.
diff --git a/java/demo/Freeze/library/Server.java b/java/demo/Freeze/library/Server.java
index b5c6c536f67..957eae01534 100644
--- a/java/demo/Freeze/library/Server.java
+++ b/java/demo/Freeze/library/Server.java
@@ -35,7 +35,7 @@ class LibraryServer extends Ice.Application
// Create the library, and add it to the object adapter.
//
LibraryI library = new LibraryI(communicator(), _envName, "authors", evictor);
- adapter.add(library, Ice.Util.stringToIdentity("library"));
+ adapter.add(library, communicator().stringToIdentity("library"));
//
// Create and install a factory for books.
diff --git a/java/demo/Freeze/phonebook/Collocated.java b/java/demo/Freeze/phonebook/Collocated.java
index 0be1002ea22..79e81882395 100644
--- a/java/demo/Freeze/phonebook/Collocated.java
+++ b/java/demo/Freeze/phonebook/Collocated.java
@@ -63,7 +63,7 @@ class PhoneBookCollocated extends Ice.Application
// Create the phonebook, and add it to the Object Adapter.
//
PhoneBookI phoneBook = new PhoneBookI(evictor, contactFactory, index);
- adapter.add(phoneBook, Ice.Util.stringToIdentity("phonebook"));
+ adapter.add(phoneBook, communicator().stringToIdentity("phonebook"));
//
// Everything ok, let's go.
diff --git a/java/demo/Freeze/phonebook/Server.java b/java/demo/Freeze/phonebook/Server.java
index 91b3d558b55..dbb871fce97 100644
--- a/java/demo/Freeze/phonebook/Server.java
+++ b/java/demo/Freeze/phonebook/Server.java
@@ -63,7 +63,7 @@ class PhoneBookServer extends Ice.Application
// Create the phonebook, and add it to the object adapter.
//
PhoneBookI phoneBook = new PhoneBookI(evictor, contactFactory, index);
- adapter.add(phoneBook, Ice.Util.stringToIdentity("phonebook"));
+ adapter.add(phoneBook, communicator().stringToIdentity("phonebook"));
//
// Everything ok, let's go.
diff --git a/java/demo/Glacier2/callback/Client.java b/java/demo/Glacier2/callback/Client.java
index f46a389f370..48020f1556a 100644
--- a/java/demo/Glacier2/callback/Client.java
+++ b/java/demo/Glacier2/callback/Client.java
@@ -195,7 +195,7 @@ public class Client extends Ice.Application
}
System.out.println("callback receiver identity: " +
- Ice.Util.identityToString(twowayR.ice_getIdentity()));
+ communicator().identityToString(twowayR.ice_getIdentity()));
}
else if(line.equals("s"))
{
diff --git a/java/demo/Glacier2/callback/Server.java b/java/demo/Glacier2/callback/Server.java
index 205a1f242c2..186cbcb47ec 100644
--- a/java/demo/Glacier2/callback/Server.java
+++ b/java/demo/Glacier2/callback/Server.java
@@ -15,7 +15,7 @@ public class Server extends Ice.Application
run(String[] args)
{
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Callback.Server");
- adapter.add(new CallbackI(), Ice.Util.stringToIdentity("callback"));
+ adapter.add(new CallbackI(), communicator().stringToIdentity("callback"));
adapter.activate();
communicator().waitForShutdown();
return 0;
diff --git a/java/demo/Glacier2/callback/SessionServer.java b/java/demo/Glacier2/callback/SessionServer.java
index cc1e5d8a1ce..286a7ee7df4 100644
--- a/java/demo/Glacier2/callback/SessionServer.java
+++ b/java/demo/Glacier2/callback/SessionServer.java
@@ -25,8 +25,8 @@ public class SessionServer
run(String[] args)
{
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("SessionServer");
- adapter.add(new DummyPermissionVerifierI(), Ice.Util.stringToIdentity("verifier"));
- adapter.add(new SessionManagerI(), Ice.Util.stringToIdentity("sessionmanager"));
+ adapter.add(new DummyPermissionVerifierI(), communicator().stringToIdentity("verifier"));
+ adapter.add(new SessionManagerI(), communicator().stringToIdentity("sessionmanager"));
adapter.activate();
communicator().waitForShutdown();
return 0;
diff --git a/java/demo/Ice/bidir/CallbackSenderI.java b/java/demo/Ice/bidir/CallbackSenderI.java
index e0571088893..dfa01811ecb 100755
--- a/java/demo/Ice/bidir/CallbackSenderI.java
+++ b/java/demo/Ice/bidir/CallbackSenderI.java
@@ -11,6 +11,11 @@ import Demo.*;
class CallbackSenderI extends _CallbackSenderDisp implements java.lang.Runnable
{
+ CallbackSenderI(Ice.Communicator communicator)
+ {
+ _communicator = communicator;
+ }
+
synchronized public void
destroy()
{
@@ -23,7 +28,7 @@ class CallbackSenderI extends _CallbackSenderDisp implements java.lang.Runnable
synchronized public void
addClient(Ice.Identity ident, Ice.Current current)
{
- System.out.println("adding client `" + Ice.Util.identityToString(ident) + "'");
+ System.out.println("adding client `" + _communicator.identityToString(ident) + "'");
Ice.ObjectPrx base = current.con.createProxy(ident);
CallbackReceiverPrx client = CallbackReceiverPrxHelper.uncheckedCast(base);
@@ -57,7 +62,7 @@ class CallbackSenderI extends _CallbackSenderDisp implements java.lang.Runnable
}
catch(Exception ex)
{
- System.out.println("removing client `" + Ice.Util.identityToString(r.ice_getIdentity()) + "':");
+ System.out.println("removing client `" + _communicator.identityToString(r.ice_getIdentity()) + "':");
ex.printStackTrace();
p.remove();
}
@@ -66,6 +71,7 @@ class CallbackSenderI extends _CallbackSenderDisp implements java.lang.Runnable
}
}
+ private Ice.Communicator _communicator;
private boolean _destroy = false;
private int _num = 0;
private java.util.Vector _clients = new java.util.Vector();
diff --git a/java/demo/Ice/bidir/Server.java b/java/demo/Ice/bidir/Server.java
index 950433cd3df..6e6df3aa858 100755
--- a/java/demo/Ice/bidir/Server.java
+++ b/java/demo/Ice/bidir/Server.java
@@ -16,7 +16,7 @@ public class Server extends Ice.Application
{
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Callback.Server");
CallbackSenderI sender = new CallbackSenderI();
- adapter.add(sender, Ice.Util.stringToIdentity("sender"));
+ adapter.add(sender, communicator().stringToIdentity("sender"));
adapter.activate();
Thread t = new Thread(sender);
diff --git a/java/demo/Ice/callback/Client.java b/java/demo/Ice/callback/Client.java
index 025c6f4a5db..98beff052c8 100644
--- a/java/demo/Ice/callback/Client.java
+++ b/java/demo/Ice/callback/Client.java
@@ -53,12 +53,12 @@ public class Client extends Ice.Application
CallbackSenderPrx batchDatagram = CallbackSenderPrxHelper.uncheckedCast(twoway.ice_batchDatagram());
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Callback.Client");
- adapter.add(new CallbackReceiverI(), Ice.Util.stringToIdentity("callbackReceiver"));
+ adapter.add(new CallbackReceiverI(), communicator().stringToIdentity("callbackReceiver"));
adapter.activate();
CallbackReceiverPrx twowayR =
CallbackReceiverPrxHelper.uncheckedCast(adapter.createProxy(
- Ice.Util.stringToIdentity("callbackReceiver")));
+ communicator().stringToIdentity("callbackReceiver")));
CallbackReceiverPrx onewayR = CallbackReceiverPrxHelper.uncheckedCast(twowayR.ice_oneway());
CallbackReceiverPrx datagramR = CallbackReceiverPrxHelper.uncheckedCast(twowayR.ice_datagram());
diff --git a/java/demo/Ice/callback/Server.java b/java/demo/Ice/callback/Server.java
index b743dbbad84..15d7ba964f8 100644
--- a/java/demo/Ice/callback/Server.java
+++ b/java/demo/Ice/callback/Server.java
@@ -15,7 +15,7 @@ public class Server extends Ice.Application
run(String[] args)
{
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Callback.Server");
- adapter.add(new CallbackSenderI(), Ice.Util.stringToIdentity("callback"));
+ adapter.add(new CallbackSenderI(), communicator().stringToIdentity("callback"));
adapter.activate();
communicator().waitForShutdown();
return 0;
diff --git a/java/demo/Ice/hello/Server.java b/java/demo/Ice/hello/Server.java
index 8d6b80a5536..f75aec33b8a 100644
--- a/java/demo/Ice/hello/Server.java
+++ b/java/demo/Ice/hello/Server.java
@@ -15,7 +15,7 @@ public class Server extends Ice.Application
run(String[] args)
{
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Hello");
- adapter.add(new HelloI(), Ice.Util.stringToIdentity("hello"));
+ adapter.add(new HelloI(), communicator().stringToIdentity("hello"));
adapter.activate();
communicator().waitForShutdown();
return 0;
diff --git a/java/demo/Ice/invoke/Server.java b/java/demo/Ice/invoke/Server.java
index 966f6aad221..cdf2104af92 100644
--- a/java/demo/Ice/invoke/Server.java
+++ b/java/demo/Ice/invoke/Server.java
@@ -15,7 +15,7 @@ public class Server extends Ice.Application
run(String[] args)
{
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Printer");
- adapter.add(new PrinterI(), Ice.Util.stringToIdentity("printer"));
+ adapter.add(new PrinterI(), communicator().stringToIdentity("printer"));
adapter.activate();
communicator().waitForShutdown();
return 0;
diff --git a/java/demo/Ice/latency/Server.java b/java/demo/Ice/latency/Server.java
index ebfa99d0797..e21b610572f 100644
--- a/java/demo/Ice/latency/Server.java
+++ b/java/demo/Ice/latency/Server.java
@@ -15,7 +15,7 @@ public class Server extends Ice.Application
run(String[] args)
{
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Latency");
- adapter.add(new Ping(), Ice.Util.stringToIdentity("ping"));
+ adapter.add(new Ping(), communicator().stringToIdentity("ping"));
adapter.activate();
communicator().waitForShutdown();
return 0;
diff --git a/java/demo/Ice/minimal/Server.java b/java/demo/Ice/minimal/Server.java
index 82fd99294e7..47a34498cdd 100755
--- a/java/demo/Ice/minimal/Server.java
+++ b/java/demo/Ice/minimal/Server.java
@@ -15,7 +15,7 @@ public class Server
run(String[] args, Ice.Communicator communicator)
{
Ice.ObjectAdapter adapter = communicator.createObjectAdapterWithEndpoints("Hello", "tcp -p 10000");
- adapter.add(new HelloI(), Ice.Util.stringToIdentity("hello"));
+ adapter.add(new HelloI(), communicator.stringToIdentity("hello"));
adapter.activate();
communicator.waitForShutdown();
return 0;
diff --git a/java/demo/Ice/nested/Client.java b/java/demo/Ice/nested/Client.java
index c3215782ffd..96addcfb717 100644
--- a/java/demo/Ice/nested/Client.java
+++ b/java/demo/Ice/nested/Client.java
@@ -31,8 +31,8 @@ public class Client extends Ice.Application
}
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Nested.Client");
- NestedPrx self = NestedPrxHelper.uncheckedCast(adapter.createProxy(Ice.Util.stringToIdentity("nestedClient")));
- adapter.add(new NestedI(self), Ice.Util.stringToIdentity("nestedClient"));
+ NestedPrx self = NestedPrxHelper.uncheckedCast(adapter.createProxy(communicator().stringToIdentity("nestedClient")));
+ adapter.add(new NestedI(self), communicator().stringToIdentity("nestedClient"));
adapter.activate();
System.out.println("Note: The maximum nesting level is sz * 2, with sz being");
diff --git a/java/demo/Ice/nested/NestedClient.java b/java/demo/Ice/nested/NestedClient.java
index c305579ddce..af93218a5f8 100644
--- a/java/demo/Ice/nested/NestedClient.java
+++ b/java/demo/Ice/nested/NestedClient.java
@@ -31,8 +31,8 @@ class NestedClient extends Ice.Application
}
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Nested.Client");
- NestedPrx self = NestedPrxHelper.uncheckedCast(adapter.createProxy(Ice.Util.stringToIdentity("nestedClient")));
- adapter.add(new NestedI(self), Ice.Util.stringToIdentity("nestedClient"));
+ NestedPrx self = NestedPrxHelper.uncheckedCast(adapter.createProxy(communicator().stringToIdentity("nestedClient")));
+ adapter.add(new NestedI(self), communicator().stringToIdentity("nestedClient"));
adapter.activate();
System.out.println("Note: The maximum nesting level is sz * 2, with sz being");
diff --git a/java/demo/Ice/nested/NestedServer.java b/java/demo/Ice/nested/NestedServer.java
index 3fd560012ab..1259c0e8e81 100644
--- a/java/demo/Ice/nested/NestedServer.java
+++ b/java/demo/Ice/nested/NestedServer.java
@@ -15,8 +15,8 @@ class NestedServer extends Ice.Application
run(String[] args)
{
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Nested.Server");
- NestedPrx self = NestedPrxHelper.uncheckedCast(adapter.createProxy(Ice.Util.stringToIdentity("nestedServer")));
- adapter.add(new NestedI(self), Ice.Util.stringToIdentity("nestedServer"));
+ NestedPrx self = NestedPrxHelper.uncheckedCast(adapter.createProxy(communicator().stringToIdentity("nestedServer")));
+ adapter.add(new NestedI(self), communicator().stringToIdentity("nestedServer"));
adapter.activate();
communicator().waitForShutdown();
return 0;
diff --git a/java/demo/Ice/nested/Server.java b/java/demo/Ice/nested/Server.java
index 91cae195227..49c50f00525 100644
--- a/java/demo/Ice/nested/Server.java
+++ b/java/demo/Ice/nested/Server.java
@@ -15,8 +15,8 @@ public class Server extends Ice.Application
run(String[] args)
{
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Nested.Server");
- NestedPrx self = NestedPrxHelper.uncheckedCast(adapter.createProxy(Ice.Util.stringToIdentity("nestedServer")));
- adapter.add(new NestedI(self), Ice.Util.stringToIdentity("nestedServer"));
+ NestedPrx self = NestedPrxHelper.uncheckedCast(adapter.createProxy(communicator().stringToIdentity("nestedServer")));
+ adapter.add(new NestedI(self), communicator().stringToIdentity("nestedServer"));
adapter.activate();
communicator().waitForShutdown();
return 0;
diff --git a/java/demo/Ice/session/Server.java b/java/demo/Ice/session/Server.java
index 58877b9fe9e..7129f757488 100644
--- a/java/demo/Ice/session/Server.java
+++ b/java/demo/Ice/session/Server.java
@@ -18,7 +18,7 @@ public class Server extends Ice.Application
ReapThread reaper = new ReapThread();
reaper.start();
- adapter.add(new SessionFactoryI(reaper), Ice.Util.stringToIdentity("SessionFactory"));
+ adapter.add(new SessionFactoryI(reaper), communicator().stringToIdentity("SessionFactory"));
adapter.activate();
communicator().waitForShutdown();
diff --git a/java/demo/Ice/throughput/Server.java b/java/demo/Ice/throughput/Server.java
index 8caf6b71d53..7bba2ca9488 100644
--- a/java/demo/Ice/throughput/Server.java
+++ b/java/demo/Ice/throughput/Server.java
@@ -15,7 +15,7 @@ public class Server extends Ice.Application
run(String[] args)
{
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Throughput");
- adapter.add(new ThroughputI(), Ice.Util.stringToIdentity("throughput"));
+ adapter.add(new ThroughputI(), communicator().stringToIdentity("throughput"));
adapter.activate();
communicator().waitForShutdown();
return 0;
diff --git a/java/demo/Ice/value/Server.java b/java/demo/Ice/value/Server.java
index 2e725928e9d..f9634900f68 100644
--- a/java/demo/Ice/value/Server.java
+++ b/java/demo/Ice/value/Server.java
@@ -14,7 +14,7 @@ public class Server extends Ice.Application
{
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Value");
Ice.Object object = new InitialI(adapter);
- adapter.add(object, Ice.Util.stringToIdentity("initial"));
+ adapter.add(object, communicator().stringToIdentity("initial"));
adapter.activate();
communicator().waitForShutdown();
return 0;
diff --git a/java/demo/IceBox/hello/HelloServiceI.java b/java/demo/IceBox/hello/HelloServiceI.java
index a6c6bd22001..040f0321a31 100644
--- a/java/demo/IceBox/hello/HelloServiceI.java
+++ b/java/demo/IceBox/hello/HelloServiceI.java
@@ -13,7 +13,7 @@ public class HelloServiceI extends Ice.LocalObjectImpl implements IceBox.Service
start(String name, Ice.Communicator communicator, String[] args)
{
_adapter = communicator.createObjectAdapter(name);
- _adapter.add(new HelloI(), Ice.Util.stringToIdentity("hello"));
+ _adapter.add(new HelloI(), communicator.stringToIdentity("hello"));
_adapter.activate();
}
diff --git a/java/demo/IceGrid/simple/Server.java b/java/demo/IceGrid/simple/Server.java
index c069bc00ad1..5ad0ec96c4d 100644
--- a/java/demo/IceGrid/simple/Server.java
+++ b/java/demo/IceGrid/simple/Server.java
@@ -14,7 +14,7 @@ public class Server extends Ice.Application
{
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Hello");
Ice.Properties properties = communicator().getProperties();
- Ice.Identity id = Ice.Util.stringToIdentity(properties.getProperty("Identity"));
+ Ice.Identity id = communicator().stringToIdentity(properties.getProperty("Identity"));
adapter.add(new HelloI(properties.getProperty("Ice.ServerId")), id);
adapter.activate();
communicator().waitForShutdown();
diff --git a/java/demo/book/printer/Server.java b/java/demo/book/printer/Server.java
index d1919a97e06..0547d76058a 100755
--- a/java/demo/book/printer/Server.java
+++ b/java/demo/book/printer/Server.java
@@ -21,7 +21,7 @@ public class Server {
Ice.Object object = new PrinterI();
adapter.add(
object,
- Ice.Util.stringToIdentity("SimplePrinter"));
+ ic.stringToIdentity("SimplePrinter"));
adapter.activate();
ic.waitForShutdown();
} catch (Exception e) {
diff --git a/java/demo/book/simple_filesystem/Filesystem/DirectoryI.java b/java/demo/book/simple_filesystem/Filesystem/DirectoryI.java
index 44e6c5a9a3e..e4200b11ac8 100755
--- a/java/demo/book/simple_filesystem/Filesystem/DirectoryI.java
+++ b/java/demo/book/simple_filesystem/Filesystem/DirectoryI.java
@@ -21,7 +21,8 @@ public final class DirectoryI extends _DirectoryDisp
// Create an identity. The parent has the fixed identity "/"
//
- Ice.Identity myID = Ice.Util.stringToIdentity(_parent != null ? Ice.Util.generateUUID() : "RootDir");
+ Ice.Identity myID =
+ _adapter.getCommunicator().stringToIdentity(_parent != null ? Ice.Util.generateUUID() : "RootDir");
// Add the identity to the object adapter
//
diff --git a/java/demo/book/simple_filesystem/Filesystem/FileI.java b/java/demo/book/simple_filesystem/Filesystem/FileI.java
index b8a7b888141..d77fa50ac1d 100755
--- a/java/demo/book/simple_filesystem/Filesystem/FileI.java
+++ b/java/demo/book/simple_filesystem/Filesystem/FileI.java
@@ -23,7 +23,7 @@ public class FileI extends _FileDisp
// Create an identity
//
- Ice.Identity myID = Ice.Util.stringToIdentity(Ice.Util.generateUUID());
+ Ice.Identity myID = _adapter.getCommunicator().stringToIdentity(Ice.Util.generateUUID());
// Add the identity to the object adapter
//
diff --git a/java/src/IceBox/ServiceManagerI.java b/java/src/IceBox/ServiceManagerI.java
index f61143cd1a7..445e01744bd 100644
--- a/java/src/IceBox/ServiceManagerI.java
+++ b/java/src/IceBox/ServiceManagerI.java
@@ -54,7 +54,7 @@ public class ServiceManagerI extends _ServiceManagerDisp
{
identity = properties.getPropertyWithDefault("IceBox.InstanceName", "IceBox") + "/ServiceManager";
}
- adapter.add(this, Ice.Util.stringToIdentity(identity));
+ adapter.add(this, _server.communicator().stringToIdentity(identity));
//
// Parse the IceBox.LoadOrder property.
diff --git a/java/src/IceInternal/ReferenceFactory.java b/java/src/IceInternal/ReferenceFactory.java
index 31a4923f613..da999462291 100644
--- a/java/src/IceInternal/ReferenceFactory.java
+++ b/java/src/IceInternal/ReferenceFactory.java
@@ -170,7 +170,7 @@ public final class ReferenceFactory
//
// Parsing the identity may raise IdentityParseException.
//
- Ice.Identity ident = Ice.Util.stringToIdentity(idstr);
+ Ice.Identity ident = _communicator.stringToIdentity(idstr);
if(ident.name.length() == 0)
{
diff --git a/java/test/Freeze/evictor/RemoteEvictorFactoryI.java b/java/test/Freeze/evictor/RemoteEvictorFactoryI.java
index e6b10dbf45b..f2483e4fd90 100644
--- a/java/test/Freeze/evictor/RemoteEvictorFactoryI.java
+++ b/java/test/Freeze/evictor/RemoteEvictorFactoryI.java
@@ -21,7 +21,7 @@ public final class RemoteEvictorFactoryI extends Test._RemoteEvictorFactoryDisp
{
RemoteEvictorI remoteEvictor = new RemoteEvictorI(_adapter, _envName, name);
return Test.RemoteEvictorPrxHelper.
- uncheckedCast(_adapter.add(remoteEvictor, Ice.Util.stringToIdentity(name)));
+ uncheckedCast(_adapter.add(remoteEvictor, _adapter.getCommunicator().stringToIdentity(name)));
}
public void
diff --git a/java/test/Freeze/evictor/RemoteEvictorI.java b/java/test/Freeze/evictor/RemoteEvictorI.java
index e344c9de1d4..3bf94ca3036 100644
--- a/java/test/Freeze/evictor/RemoteEvictorI.java
+++ b/java/test/Freeze/evictor/RemoteEvictorI.java
@@ -115,7 +115,7 @@ public final class RemoteEvictorI extends Test._RemoteEvictorDisp
{
_evictorAdapter.deactivate();
_evictorAdapter.waitForDeactivate();
- _adapter.remove(Ice.Util.stringToIdentity(_category));
+ _adapter.remove(_adapter.getCommunicator().stringToIdentity(_category));
}
public void
diff --git a/java/test/Freeze/evictor/Server.java b/java/test/Freeze/evictor/Server.java
index 877d9a0b1e4..b5037579877 100644
--- a/java/test/Freeze/evictor/Server.java
+++ b/java/test/Freeze/evictor/Server.java
@@ -51,7 +51,7 @@ public class Server
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("Evictor");
RemoteEvictorFactoryI factory = new RemoteEvictorFactoryI(adapter, envName);
- adapter.add(factory, Ice.Util.stringToIdentity("factory"));
+ adapter.add(factory, communicator.stringToIdentity("factory"));
Ice.ObjectFactory servantFactory = new ServantFactory();
communicator.addObjectFactory(servantFactory, "::Test::Servant");
diff --git a/java/test/Glacier2/router/CallbackClient.java b/java/test/Glacier2/router/CallbackClient.java
index b03b117db13..cb48db7111d 100644
--- a/java/test/Glacier2/router/CallbackClient.java
+++ b/java/test/Glacier2/router/CallbackClient.java
@@ -271,7 +271,7 @@ class CallbackClient extends Ice.Application
java.util.Map context = new java.util.HashMap();
context.put("_fwd", "t");
CallbackPrx otherCategoryTwoway = CallbackPrxHelper.uncheckedCast(
- twoway.ice_identity(Ice.Util.stringToIdentity("c2/callback")));
+ twoway.ice_identity(communicator().stringToIdentity("c2/callback")));
otherCategoryTwoway.initiateCallback(twowayR, context);
test(callbackReceiverImpl.callbackOK());
System.out.println("ok");
@@ -285,7 +285,7 @@ class CallbackClient extends Ice.Application
try
{
CallbackPrx otherCategoryTwoway = CallbackPrxHelper.uncheckedCast(
- twoway.ice_identity(Ice.Util.stringToIdentity("c3/callback")));
+ twoway.ice_identity(communicator().stringToIdentity("c3/callback")));
otherCategoryTwoway.initiateCallback(twowayR, context);
test(false);
}
@@ -301,7 +301,7 @@ class CallbackClient extends Ice.Application
java.util.Map context = new java.util.HashMap();
context.put("_fwd", "t");
CallbackPrx otherCategoryTwoway = CallbackPrxHelper.uncheckedCast(
- twoway.ice_identity(Ice.Util.stringToIdentity("_userid/callback")));
+ twoway.ice_identity(communicator().stringToIdentity("_userid/callback")));
otherCategoryTwoway.initiateCallback(twowayR, context);
test(callbackReceiverImpl.callbackOK());
System.out.println("ok");
diff --git a/java/test/Glacier2/router/CallbackServer.java b/java/test/Glacier2/router/CallbackServer.java
index 5fbdcd09645..79650ddc031 100644
--- a/java/test/Glacier2/router/CallbackServer.java
+++ b/java/test/Glacier2/router/CallbackServer.java
@@ -17,13 +17,13 @@ class CallbackServer extends Ice.Application
communicator().getProperties().setProperty("CallbackAdapter.Endpoints", "tcp -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("CallbackAdapter");
adapter.add(new CallbackI(),
- Ice.Util.stringToIdentity("c1/callback")); // The test allows "c1" as category.
+ communicator().stringToIdentity("c1/callback")); // The test allows "c1" as category.
adapter.add(new CallbackI(),
- Ice.Util.stringToIdentity("c2/callback")); // The test allows "c2" as category.
+ communicator().stringToIdentity("c2/callback")); // The test allows "c2" as category.
adapter.add(new CallbackI(),
- Ice.Util.stringToIdentity("c3/callback")); // The test rejects "c3" as category.
+ communicator().stringToIdentity("c3/callback")); // The test rejects "c3" as category.
adapter.add(new CallbackI(),
- Ice.Util.stringToIdentity("_userid/callback")); // The test allows the prefixed userid.
+ communicator().stringToIdentity("_userid/callback")); // The test allows the prefixed userid.
adapter.activate();
communicator().waitForShutdown();
return 0;
diff --git a/java/test/Ice/binding/RemoteObjectAdapterI.java b/java/test/Ice/binding/RemoteObjectAdapterI.java
index 8ec906976c1..c50fdb3dcf4 100644
--- a/java/test/Ice/binding/RemoteObjectAdapterI.java
+++ b/java/test/Ice/binding/RemoteObjectAdapterI.java
@@ -15,7 +15,8 @@ public class RemoteObjectAdapterI extends _RemoteObjectAdapterDisp
RemoteObjectAdapterI(Ice.ObjectAdapter adapter)
{
_adapter = adapter;
- _testIntf = TestIntfPrxHelper.uncheckedCast(_adapter.add(new TestI(), Ice.Util.stringToIdentity("test")));
+ _testIntf = TestIntfPrxHelper.uncheckedCast(_adapter.add(new TestI(),
+ _adapter.getCommunicator().stringToIdentity("test")));
_adapter.activate();
}
diff --git a/java/test/Ice/binding/Server.java b/java/test/Ice/binding/Server.java
index a0d6c2d3042..908c3c1d27e 100644
--- a/java/test/Ice/binding/Server.java
+++ b/java/test/Ice/binding/Server.java
@@ -14,7 +14,7 @@ public class Server
{
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010:udp");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
- Ice.Identity id = Ice.Util.stringToIdentity("communicator");
+ Ice.Identity id = communicator.stringToIdentity("communicator");
adapter.add(new RemoteCommunicatorI(), id);
adapter.activate();
diff --git a/java/test/Ice/checksum/server/Server.java b/java/test/Ice/checksum/server/Server.java
index 986496f96da..e152d0680f2 100644
--- a/java/test/Ice/checksum/server/Server.java
+++ b/java/test/Ice/checksum/server/Server.java
@@ -15,7 +15,7 @@ public class Server
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object object = new ChecksumI(adapter);
- adapter.add(object, Ice.Util.stringToIdentity("test"));
+ adapter.add(object, communicator.stringToIdentity("test"));
adapter.activate();
communicator.waitForShutdown();
return 0;
diff --git a/java/test/Ice/custom/Collocated.java b/java/test/Ice/custom/Collocated.java
index 91d1a0aa4d3..4a698d51fca 100644
--- a/java/test/Ice/custom/Collocated.java
+++ b/java/test/Ice/custom/Collocated.java
@@ -15,7 +15,7 @@ public class Collocated
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object test = new TestI(communicator);
- adapter.add(test, Ice.Util.stringToIdentity("test"));
+ adapter.add(test, communicator.stringToIdentity("test"));
AllTests.allTests(communicator);
diff --git a/java/test/Ice/custom/Server.java b/java/test/Ice/custom/Server.java
index 51d5d2c607c..fe6082914bd 100644
--- a/java/test/Ice/custom/Server.java
+++ b/java/test/Ice/custom/Server.java
@@ -15,7 +15,7 @@ public class Server
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object test = new TestI(communicator);
- adapter.add(test, Ice.Util.stringToIdentity("test"));
+ adapter.add(test, communicator.stringToIdentity("test"));
adapter.activate();
communicator.waitForShutdown();
diff --git a/java/test/Ice/exceptions/AllTests.java b/java/test/Ice/exceptions/AllTests.java
index 4f483d6928f..c5e3287ab9d 100644
--- a/java/test/Ice/exceptions/AllTests.java
+++ b/java/test/Ice/exceptions/AllTests.java
@@ -107,6 +107,11 @@ public class AllTests
private static class AMI_Thrower_throwAasAObjectNotExistI extends AMI_Thrower_throwAasA
{
+ AMI_Thrower_throwAasAObjectNotExistI(Ice.Communicator communicator)
+ {
+ _communicator = communicator;
+ }
+
public void
ice_response()
{
@@ -122,7 +127,7 @@ public class AllTests
}
catch(Ice.ObjectNotExistException ex)
{
- Ice.Identity id = Ice.Util.stringToIdentity("does not exist");
+ Ice.Identity id = _communicator.stringToIdentity("does not exist");
test(ex.id.equals(id));
}
catch(Exception ex)
@@ -147,6 +152,7 @@ public class AllTests
}
private Callback callback = new Callback();
+ private Ice.Communicator _communicator;
}
private static class AMI_Thrower_throwAasAFacetNotExistI extends AMI_Thrower_throwAasA
@@ -744,20 +750,20 @@ public class AllTests
System.out.print("testing servant registration exceptions... ");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter1");
Ice.Object obj = new EmptyI();
- adapter.add(obj, Ice.Util.stringToIdentity("x"));
+ adapter.add(obj, communicator.stringToIdentity("x"));
try
{
- adapter.add(obj, Ice.Util.stringToIdentity("x"));
+ adapter.add(obj, communicator.stringToIdentity("x"));
test(false);
}
catch(Ice.AlreadyRegisteredException ex)
{
}
- adapter.remove(Ice.Util.stringToIdentity("x"));
+ adapter.remove(communicator.stringToIdentity("x"));
try
{
- adapter.remove(Ice.Util.stringToIdentity("x"));
+ adapter.remove(communicator.stringToIdentity("x"));
test(false);
}
catch(Ice.NotRegisteredException ex)
@@ -1081,7 +1087,7 @@ public class AllTests
System.out.flush();
{
- Ice.Identity id = Ice.Util.stringToIdentity("does not exist");
+ Ice.Identity id = communicator.stringToIdentity("does not exist");
try
{
ThrowerPrx thrower2 = ThrowerPrxHelper.uncheckedCast(thrower.ice_identity(id));
@@ -1313,9 +1319,9 @@ public class AllTests
System.out.flush();
{
- Ice.Identity id = Ice.Util.stringToIdentity("does not exist");
+ Ice.Identity id = communicator.stringToIdentity("does not exist");
ThrowerPrx thrower2 = ThrowerPrxHelper.uncheckedCast(thrower.ice_identity(id));
- AMI_Thrower_throwAasAObjectNotExistI cb = new AMI_Thrower_throwAasAObjectNotExistI();
+ AMI_Thrower_throwAasAObjectNotExistI cb = new AMI_Thrower_throwAasAObjectNotExistI(communicator);
thrower2.throwAasA_async(cb, 1);
test(cb.check());
}
diff --git a/java/test/Ice/exceptions/Collocated.java b/java/test/Ice/exceptions/Collocated.java
index 2451a4df821..e66910ef1a9 100644
--- a/java/test/Ice/exceptions/Collocated.java
+++ b/java/test/Ice/exceptions/Collocated.java
@@ -15,7 +15,7 @@ public class Collocated
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object object = new ThrowerI(adapter);
- adapter.add(object, Ice.Util.stringToIdentity("thrower"));
+ adapter.add(object, communicator.stringToIdentity("thrower"));
AllTests.allTests(communicator, true);
diff --git a/java/test/Ice/exceptions/Server.java b/java/test/Ice/exceptions/Server.java
index 19b8f86a150..16aceacb26e 100644
--- a/java/test/Ice/exceptions/Server.java
+++ b/java/test/Ice/exceptions/Server.java
@@ -18,7 +18,7 @@ public class Server
properties.setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000:udp");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object object = new ThrowerI(adapter);
- adapter.add(object, Ice.Util.stringToIdentity("thrower"));
+ adapter.add(object, communicator.stringToIdentity("thrower"));
adapter.activate();
communicator.waitForShutdown();
return 0;
diff --git a/java/test/Ice/exceptionsAMD/Server.java b/java/test/Ice/exceptionsAMD/Server.java
index be5e6b6f7df..145d755516c 100644
--- a/java/test/Ice/exceptionsAMD/Server.java
+++ b/java/test/Ice/exceptionsAMD/Server.java
@@ -18,7 +18,7 @@ public class Server
properties.setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000:udp");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object object = new ThrowerI(adapter);
- adapter.add(object, Ice.Util.stringToIdentity("thrower"));
+ adapter.add(object, communicator.stringToIdentity("thrower"));
adapter.activate();
communicator.waitForShutdown();
return 0;
diff --git a/java/test/Ice/facets/AllTests.java b/java/test/Ice/facets/AllTests.java
index 9a158a54928..0afcf68b445 100644
--- a/java/test/Ice/facets/AllTests.java
+++ b/java/test/Ice/facets/AllTests.java
@@ -26,20 +26,20 @@ public class AllTests
System.out.print("testing facet registration exceptions... ");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("FacetExceptionTestAdapter");
Ice.Object obj = new EmptyI();
- adapter.add(obj, Ice.Util.stringToIdentity("d"));
- adapter.addFacet(obj, Ice.Util.stringToIdentity("d"), "facetABCD");
+ adapter.add(obj, communicator.stringToIdentity("d"));
+ adapter.addFacet(obj, communicator.stringToIdentity("d"), "facetABCD");
try
{
- adapter.addFacet(obj, Ice.Util.stringToIdentity("d"), "facetABCD");
+ adapter.addFacet(obj, communicator.stringToIdentity("d"), "facetABCD");
test(false);
}
catch(Ice.AlreadyRegisteredException ex)
{
}
- adapter.removeFacet(Ice.Util.stringToIdentity("d"), "facetABCD");
+ adapter.removeFacet(communicator.stringToIdentity("d"), "facetABCD");
try
{
- adapter.removeFacet(Ice.Util.stringToIdentity("d"), "facetABCD");
+ adapter.removeFacet(communicator.stringToIdentity("d"), "facetABCD");
test(false);
}
catch(Ice.NotRegisteredException ex)
@@ -50,25 +50,25 @@ public class AllTests
System.out.print("testing removeAllFacets... ");
Ice.Object obj1 = new EmptyI();
Ice.Object obj2 = new EmptyI();
- adapter.addFacet(obj1, Ice.Util.stringToIdentity("id1"), "f1");
- adapter.addFacet(obj2, Ice.Util.stringToIdentity("id1"), "f2");
+ adapter.addFacet(obj1, communicator.stringToIdentity("id1"), "f1");
+ adapter.addFacet(obj2, communicator.stringToIdentity("id1"), "f2");
Ice.Object obj3 = new EmptyI();
- adapter.addFacet(obj1, Ice.Util.stringToIdentity("id2"), "f1");
- adapter.addFacet(obj2, Ice.Util.stringToIdentity("id2"), "f2");
- adapter.addFacet(obj3, Ice.Util.stringToIdentity("id2"), "");
- java.util.Map fm = adapter.removeAllFacets(Ice.Util.stringToIdentity("id1"));
+ adapter.addFacet(obj1, communicator.stringToIdentity("id2"), "f1");
+ adapter.addFacet(obj2, communicator.stringToIdentity("id2"), "f2");
+ adapter.addFacet(obj3, communicator.stringToIdentity("id2"), "");
+ java.util.Map fm = adapter.removeAllFacets(communicator.stringToIdentity("id1"));
test(fm.size() == 2);
test(fm.get("f1") == obj1);
test(fm.get("f2") == obj2);
try
{
- adapter.removeAllFacets(Ice.Util.stringToIdentity("id1"));
+ adapter.removeAllFacets(communicator.stringToIdentity("id1"));
test(false);
}
catch(Ice.NotRegisteredException ex)
{
}
- fm = adapter.removeAllFacets(Ice.Util.stringToIdentity("id2"));
+ fm = adapter.removeAllFacets(communicator.stringToIdentity("id2"));
test(fm.size() == 3);
test(fm.get("f1") == obj1);
test(fm.get("f2") == obj2);
diff --git a/java/test/Ice/facets/Collocated.java b/java/test/Ice/facets/Collocated.java
index 69edf7732dc..57dae86829f 100644
--- a/java/test/Ice/facets/Collocated.java
+++ b/java/test/Ice/facets/Collocated.java
@@ -15,12 +15,12 @@ public class Collocated
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object d = new DI();
- adapter.add(d, Ice.Util.stringToIdentity("d"));
- adapter.addFacet(d, Ice.Util.stringToIdentity("d"), "facetABCD");
+ adapter.add(d, communicator.stringToIdentity("d"));
+ adapter.addFacet(d, communicator.stringToIdentity("d"), "facetABCD");
Ice.Object f = new FI();
- adapter.addFacet(f, Ice.Util.stringToIdentity("d"), "facetEF");
+ adapter.addFacet(f, communicator.stringToIdentity("d"), "facetEF");
Ice.Object h = new HI(communicator);
- adapter.addFacet(h, Ice.Util.stringToIdentity("d"), "facetGH");
+ adapter.addFacet(h, communicator.stringToIdentity("d"), "facetGH");
AllTests.allTests(communicator);
diff --git a/java/test/Ice/facets/Server.java b/java/test/Ice/facets/Server.java
index a45525e464f..1b96f6bd22a 100644
--- a/java/test/Ice/facets/Server.java
+++ b/java/test/Ice/facets/Server.java
@@ -15,12 +15,12 @@ public class Server
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object d = new DI();
- adapter.add(d, Ice.Util.stringToIdentity("d"));
- adapter.addFacet(d, Ice.Util.stringToIdentity("d"), "facetABCD");
+ adapter.add(d, communicator.stringToIdentity("d"));
+ adapter.addFacet(d, communicator.stringToIdentity("d"), "facetABCD");
Ice.Object f = new FI();
- adapter.addFacet(f, Ice.Util.stringToIdentity("d"), "facetEF");
+ adapter.addFacet(f, communicator.stringToIdentity("d"), "facetEF");
Ice.Object h = new HI(communicator);
- adapter.addFacet(h, Ice.Util.stringToIdentity("d"), "facetGH");
+ adapter.addFacet(h, communicator.stringToIdentity("d"), "facetGH");
adapter.activate();
communicator.waitForShutdown();
diff --git a/java/test/Ice/faultTolerance/Server.java b/java/test/Ice/faultTolerance/Server.java
index 167a55f20ef..13dd5cac5d4 100644
--- a/java/test/Ice/faultTolerance/Server.java
+++ b/java/test/Ice/faultTolerance/Server.java
@@ -57,7 +57,7 @@ public class Server
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p " + port + ":udp");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object object = new TestI(adapter, port);
- adapter.add(object, Ice.Util.stringToIdentity("test"));
+ adapter.add(object, communicator.stringToIdentity("test"));
adapter.activate();
communicator.waitForShutdown();
return 0;
diff --git a/java/test/Ice/hold/Server.java b/java/test/Ice/hold/Server.java
index 99d2530b6a4..cf67f2624a5 100644
--- a/java/test/Ice/hold/Server.java
+++ b/java/test/Ice/hold/Server.java
@@ -14,7 +14,7 @@ public class Server
{
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000:udp");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
- adapter.add(new HoldI(), Ice.Util.stringToIdentity("hold"));
+ adapter.add(new HoldI(), communicator.stringToIdentity("hold"));
adapter.activate();
communicator.waitForShutdown();
return 0;
diff --git a/java/test/Ice/inheritance/Collocated.java b/java/test/Ice/inheritance/Collocated.java
index f692e779b93..2c3bb3c32bf 100644
--- a/java/test/Ice/inheritance/Collocated.java
+++ b/java/test/Ice/inheritance/Collocated.java
@@ -15,7 +15,7 @@ public class Collocated
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object object = new InitialI(adapter);
- adapter.add(object, Ice.Util.stringToIdentity("initial"));
+ adapter.add(object, communicator.stringToIdentity("initial"));
AllTests.allTests(communicator);
diff --git a/java/test/Ice/inheritance/Server.java b/java/test/Ice/inheritance/Server.java
index 7c0b967fd3a..72f64a3e2dc 100644
--- a/java/test/Ice/inheritance/Server.java
+++ b/java/test/Ice/inheritance/Server.java
@@ -15,7 +15,7 @@ public class Server
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object object = new InitialI(adapter);
- adapter.add(object, Ice.Util.stringToIdentity("initial"));
+ adapter.add(object, communicator.stringToIdentity("initial"));
adapter.activate();
communicator.waitForShutdown();
return 0;
diff --git a/java/test/Ice/location/AllTests.java b/java/test/Ice/location/AllTests.java
index 7d5b236698b..5acac13d7d2 100644
--- a/java/test/Ice/location/AllTests.java
+++ b/java/test/Ice/location/AllTests.java
@@ -339,7 +339,7 @@ public class AllTests
try
{
HelloPrx helloPrx = HelloPrxHelper.checkedCast(
- communicator.stringToProxy("\"" + Ice.Util.identityToString(id) + "\""));
+ communicator.stringToProxy("\"" + communicator.identityToString(id) + "\""));
Ice.Connection connection = helloPrx.ice_connection();
test(false);
}
diff --git a/java/test/Ice/location/Server.java b/java/test/Ice/location/Server.java
index 77d07bb07ad..d5f29b1d6e5 100644
--- a/java/test/Ice/location/Server.java
+++ b/java/test/Ice/location/Server.java
@@ -29,15 +29,15 @@ public class Server
// 'servers' created with the server manager interface.
//
ServerLocatorRegistry registry = new ServerLocatorRegistry();
- registry.addObject(adapter.createProxy(Ice.Util.stringToIdentity("ServerManager")));
+ registry.addObject(adapter.createProxy(communicator.stringToIdentity("ServerManager")));
Ice.Object object = new ServerManagerI(adapter, registry);
- adapter.add(object, Ice.Util.stringToIdentity("ServerManager"));
+ adapter.add(object, communicator.stringToIdentity("ServerManager"));
Ice.LocatorRegistryPrx registryPrx =
- Ice.LocatorRegistryPrxHelper.uncheckedCast(adapter.add(registry, Ice.Util.stringToIdentity("registry")));
+ Ice.LocatorRegistryPrxHelper.uncheckedCast(adapter.add(registry, communicator.stringToIdentity("registry")));
ServerLocator locator = new ServerLocator(registry, registryPrx);
- adapter.add(locator, Ice.Util.stringToIdentity("locator"));
+ adapter.add(locator, communicator.stringToIdentity("locator"));
adapter.activate();
communicator.waitForShutdown();
diff --git a/java/test/Ice/location/ServerManagerI.java b/java/test/Ice/location/ServerManagerI.java
index 112114a0ee9..3cad936b385 100644
--- a/java/test/Ice/location/ServerManagerI.java
+++ b/java/test/Ice/location/ServerManagerI.java
@@ -55,8 +55,8 @@ public class ServerManagerI extends _ServerManagerDisp
adapter2.setLocator(Ice.LocatorPrxHelper.uncheckedCast(locator));
Ice.Object object = new TestI(adapter, adapter2, _registry);
- _registry.addObject(adapter.add(object, Ice.Util.stringToIdentity("test")));
- _registry.addObject(adapter.add(object, Ice.Util.stringToIdentity("test2")));
+ _registry.addObject(adapter.add(object, serverCommunicator.stringToIdentity("test")));
+ _registry.addObject(adapter.add(object, serverCommunicator.stringToIdentity("test2")));
adapter.activate();
adapter2.activate();
diff --git a/java/test/Ice/location/TestI.java b/java/test/Ice/location/TestI.java
index 1b390b650a1..c22a18cf968 100644
--- a/java/test/Ice/location/TestI.java
+++ b/java/test/Ice/location/TestI.java
@@ -17,7 +17,7 @@ public class TestI extends _TestIntfDisp
_adapter2 = adapter2;
_registry = registry;
- _registry.addObject(_adapter1.add(new HelloI(), Ice.Util.stringToIdentity("hello")));
+ _registry.addObject(_adapter1.add(new HelloI(), _adapter1.getCommunicator().stringToIdentity("hello")));
}
public void
@@ -29,19 +29,20 @@ public class TestI extends _TestIntfDisp
public HelloPrx
getHello(Ice.Current current)
{
- return HelloPrxHelper.uncheckedCast(_adapter1.createIndirectProxy(Ice.Util.stringToIdentity("hello")));
+ return HelloPrxHelper.uncheckedCast(_adapter1.createIndirectProxy(
+ _adapter1.getCommunicator().stringToIdentity("hello")));
}
public HelloPrx
getReplicatedHello(Ice.Current current)
{
- return HelloPrxHelper.uncheckedCast(_adapter1.createProxy(Ice.Util.stringToIdentity("hello")));
+ return HelloPrxHelper.uncheckedCast(_adapter1.createProxy(_adapter1.getCommunicator().stringToIdentity("hello")));
}
public void
migrateHello(Ice.Current current)
{
- final Ice.Identity id = Ice.Util.stringToIdentity("hello");
+ final Ice.Identity id = _adapter1.getCommunicator().stringToIdentity("hello");
try
{
_registry.addObject(_adapter2.add(_adapter1.remove(id), id));
diff --git a/java/test/Ice/objects/Collocated.java b/java/test/Ice/objects/Collocated.java
index 69ee5dcd402..693a7314c42 100644
--- a/java/test/Ice/objects/Collocated.java
+++ b/java/test/Ice/objects/Collocated.java
@@ -17,7 +17,7 @@ public class Collocated
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Initial initial = new InitialI(adapter);
- adapter.add(initial, Ice.Util.stringToIdentity("initial"));
+ adapter.add(initial, communicator.stringToIdentity("initial"));
AllTests.allTests(communicator, true);
// We must call shutdown even in the collocated case for cyclic dependency cleanup
initial.shutdown();
diff --git a/java/test/Ice/objects/Server.java b/java/test/Ice/objects/Server.java
index 7c0b967fd3a..72f64a3e2dc 100644
--- a/java/test/Ice/objects/Server.java
+++ b/java/test/Ice/objects/Server.java
@@ -15,7 +15,7 @@ public class Server
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object object = new InitialI(adapter);
- adapter.add(object, Ice.Util.stringToIdentity("initial"));
+ adapter.add(object, communicator.stringToIdentity("initial"));
adapter.activate();
communicator.waitForShutdown();
return 0;
diff --git a/java/test/Ice/operations/AllTests.java b/java/test/Ice/operations/AllTests.java
index 6ae5a3c187c..0ddc337abde 100644
--- a/java/test/Ice/operations/AllTests.java
+++ b/java/test/Ice/operations/AllTests.java
@@ -35,8 +35,8 @@ public class AllTests
System.out.print("testing proxy methods... ");
System.out.flush();
- test(Ice.Util.identityToString(
- base.ice_identity(Ice.Util.stringToIdentity("other")).ice_getIdentity()).equals("other"));
+ test(communicator.identityToString(
+ base.ice_identity(communicator.stringToIdentity("other")).ice_getIdentity()).equals("other"));
test(base.ice_facet("facet").ice_getFacet().equals("facet"));
test(base.ice_adapterId("id").ice_getAdapterId().equals("id"));
test(base.ice_twoway().ice_isTwoway());
diff --git a/java/test/Ice/operations/Collocated.java b/java/test/Ice/operations/Collocated.java
index c39aa334315..b9e984dc00d 100644
--- a/java/test/Ice/operations/Collocated.java
+++ b/java/test/Ice/operations/Collocated.java
@@ -14,9 +14,9 @@ public class Collocated
{
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
- Ice.Identity id = Ice.Util.stringToIdentity("test");
+ Ice.Identity id = communicator.stringToIdentity("test");
adapter.add(new MyDerivedClassI(adapter, id), id);
- adapter.add(new TestCheckedCastI(), Ice.Util.stringToIdentity("context"));
+ adapter.add(new TestCheckedCastI(), communicator.stringToIdentity("context"));
adapter.activate();
AllTests.allTests(communicator, true);
diff --git a/java/test/Ice/operations/MyDerivedClassI.java b/java/test/Ice/operations/MyDerivedClassI.java
index 6d3c44f9d3a..3715bd37619 100644
--- a/java/test/Ice/operations/MyDerivedClassI.java
+++ b/java/test/Ice/operations/MyDerivedClassI.java
@@ -216,7 +216,7 @@ public final class MyDerivedClassI extends Test.MyDerivedClass
{
p2.value = p1;
p3.value = Test.MyClassPrxHelper.uncheckedCast(
- _adapter.createProxy(Ice.Util.stringToIdentity("noSuchIdentity")));
+ _adapter.createProxy(_adapter.getCommunicator().stringToIdentity("noSuchIdentity")));
return Test.MyClassPrxHelper.uncheckedCast(_adapter.createProxy(_identity));
}
diff --git a/java/test/Ice/operations/Server.java b/java/test/Ice/operations/Server.java
index 5b6fa29073a..d7d387b9150 100644
--- a/java/test/Ice/operations/Server.java
+++ b/java/test/Ice/operations/Server.java
@@ -14,9 +14,9 @@ public class Server
{
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010:udp");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
- Ice.Identity id = Ice.Util.stringToIdentity("test");
+ Ice.Identity id = communicator.stringToIdentity("test");
adapter.add(new MyDerivedClassI(adapter, id), id);
- adapter.add(new TestCheckedCastI(), Ice.Util.stringToIdentity("context"));
+ adapter.add(new TestCheckedCastI(), communicator.stringToIdentity("context"));
adapter.activate();
communicator.waitForShutdown();
diff --git a/java/test/Ice/operations/Twoways.java b/java/test/Ice/operations/Twoways.java
index b8e62ca877d..63ade37abd3 100644
--- a/java/test/Ice/operations/Twoways.java
+++ b/java/test/Ice/operations/Twoways.java
@@ -118,9 +118,9 @@ class Twoways
test(Ice.Util.proxyIdentityAndFacetCompare(c1.value, p) == 0);
test(Ice.Util.proxyIdentityAndFacetCompare(c2.value, p) != 0);
test(Ice.Util.proxyIdentityAndFacetCompare(r, p) == 0);
- test(c1.value.ice_getIdentity().equals(Ice.Util.stringToIdentity("test")));
- test(c2.value.ice_getIdentity().equals(Ice.Util.stringToIdentity("noSuchIdentity")));
- test(r.ice_getIdentity().equals(Ice.Util.stringToIdentity("test")));
+ test(c1.value.ice_getIdentity().equals(communicator.stringToIdentity("test")));
+ test(c2.value.ice_getIdentity().equals(communicator.stringToIdentity("noSuchIdentity")));
+ test(r.ice_getIdentity().equals(communicator.stringToIdentity("test")));
r.opVoid();
c1.value.opVoid();
try
diff --git a/java/test/Ice/operations/TwowaysAMI.java b/java/test/Ice/operations/TwowaysAMI.java
index 746b9513bd0..c6ac1634f76 100644
--- a/java/test/Ice/operations/TwowaysAMI.java
+++ b/java/test/Ice/operations/TwowaysAMI.java
@@ -286,12 +286,17 @@ class TwowaysAMI
private static class AMI_MyClass_opMyClassI extends Test.AMI_MyClass_opMyClass
{
+ AMI_MyClass_opMyClassI(Ice.Communicator communicator)
+ {
+ _communicator = communicator;
+ }
+
public void
ice_response(Test.MyClassPrx r, Test.MyClassPrx c1, Test.MyClassPrx c2)
{
- test(c1.ice_getIdentity().equals(Ice.Util.stringToIdentity("test")));
- test(c2.ice_getIdentity().equals(Ice.Util.stringToIdentity("noSuchIdentity")));
- test(r.ice_getIdentity().equals(Ice.Util.stringToIdentity("test")));
+ test(c1.ice_getIdentity().equals(_communicator.stringToIdentity("test")));
+ test(c2.ice_getIdentity().equals(_communicator.stringToIdentity("noSuchIdentity")));
+ test(r.ice_getIdentity().equals(_communicator.stringToIdentity("test")));
// We can't do the callbacks below in thread per connection mode.
if(Ice.Util.getDefaultProperties().getPropertyAsInt("Ice.ThreadPerConnection") == 0)
{
@@ -322,6 +327,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
+ private Ice.Communicator _communicator;
}
private static class AMI_MyClass_opStructI extends Test.AMI_MyClass_opStruct
@@ -1146,7 +1152,7 @@ class TwowaysAMI
}
{
- AMI_MyClass_opMyClassI cb = new AMI_MyClass_opMyClassI();
+ AMI_MyClass_opMyClassI cb = new AMI_MyClass_opMyClassI(communicator);
p.opMyClass_async(cb, p);
test(cb.check());
}
diff --git a/java/test/Ice/operationsAMD/MyDerivedClassI.java b/java/test/Ice/operationsAMD/MyDerivedClassI.java
index e44c08ac310..413881579ad 100644
--- a/java/test/Ice/operationsAMD/MyDerivedClassI.java
+++ b/java/test/Ice/operationsAMD/MyDerivedClassI.java
@@ -259,7 +259,7 @@ public final class MyDerivedClassI extends Test.MyDerivedClass
{
Test.MyClassPrx p2 = p1;
Test.MyClassPrx p3 = Test.MyClassPrxHelper.uncheckedCast(
- _adapter.createProxy(Ice.Util.stringToIdentity("noSuchIdentity")));
+ _adapter.createProxy(_adapter.getCommunicator().stringToIdentity("noSuchIdentity")));
cb.ice_response(Test.MyClassPrxHelper.uncheckedCast(_adapter.createProxy(_identity)), p2, p3);
}
diff --git a/java/test/Ice/operationsAMD/Server.java b/java/test/Ice/operationsAMD/Server.java
index 16a1104ba14..543c7adc2c1 100644
--- a/java/test/Ice/operationsAMD/Server.java
+++ b/java/test/Ice/operationsAMD/Server.java
@@ -14,9 +14,9 @@ public class Server
{
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000:udp");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
- Ice.Identity id = Ice.Util.stringToIdentity("test");
+ Ice.Identity id = communicator.stringToIdentity("test");
adapter.add(new MyDerivedClassI(adapter, id), id);
- adapter.add(new TestCheckedCastI(), Ice.Util.stringToIdentity("context"));
+ adapter.add(new TestCheckedCastI(), communicator.stringToIdentity("context"));
adapter.activate();
communicator.waitForShutdown();
diff --git a/java/test/Ice/package/Server.java b/java/test/Ice/package/Server.java
index 540827749f2..f654daa8c1a 100644
--- a/java/test/Ice/package/Server.java
+++ b/java/test/Ice/package/Server.java
@@ -15,7 +15,7 @@ public class Server
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object object = new InitialI();
- adapter.add(object, Ice.Util.stringToIdentity("initial"));
+ adapter.add(object, communicator.stringToIdentity("initial"));
adapter.activate();
communicator.waitForShutdown();
return 0;
diff --git a/java/test/Ice/retry/Server.java b/java/test/Ice/retry/Server.java
index 000102c6346..07599c76676 100644
--- a/java/test/Ice/retry/Server.java
+++ b/java/test/Ice/retry/Server.java
@@ -23,7 +23,7 @@ public class Server
}
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
- adapter.add(new RetryI(), Ice.Util.stringToIdentity("retry"));
+ adapter.add(new RetryI(), communicator.stringToIdentity("retry"));
adapter.activate();
communicator.waitForShutdown();
diff --git a/java/test/Ice/slicing/exceptionsAMD/Server.java b/java/test/Ice/slicing/exceptionsAMD/Server.java
index 838720c51da..26f31323549 100644
--- a/java/test/Ice/slicing/exceptionsAMD/Server.java
+++ b/java/test/Ice/slicing/exceptionsAMD/Server.java
@@ -17,7 +17,7 @@ public class Server
properties.setProperty("TestAdapter.Endpoints", "default -p 12010 -t 2000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object object = new TestI(adapter);
- adapter.add(object, Ice.Util.stringToIdentity("Test"));
+ adapter.add(object, communicator.stringToIdentity("Test"));
adapter.activate();
communicator.waitForShutdown();
return 0;
diff --git a/java/test/Ice/slicing/objectsAMD/Server.java b/java/test/Ice/slicing/objectsAMD/Server.java
index 838720c51da..26f31323549 100644
--- a/java/test/Ice/slicing/objectsAMD/Server.java
+++ b/java/test/Ice/slicing/objectsAMD/Server.java
@@ -17,7 +17,7 @@ public class Server
properties.setProperty("TestAdapter.Endpoints", "default -p 12010 -t 2000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object object = new TestI(adapter);
- adapter.add(object, Ice.Util.stringToIdentity("Test"));
+ adapter.add(object, communicator.stringToIdentity("Test"));
adapter.activate();
communicator.waitForShutdown();
return 0;
diff --git a/java/test/Ice/timeout/Server.java b/java/test/Ice/timeout/Server.java
index 84c2e52d1b2..94d7baa75db 100644
--- a/java/test/Ice/timeout/Server.java
+++ b/java/test/Ice/timeout/Server.java
@@ -23,7 +23,7 @@ public class Server
}
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
- adapter.add(new TimeoutI(), Ice.Util.stringToIdentity("timeout"));
+ adapter.add(new TimeoutI(), communicator.stringToIdentity("timeout"));
adapter.activate();
communicator.waitForShutdown();
diff --git a/java/test/IceGrid/simple/Server.java b/java/test/IceGrid/simple/Server.java
index 471203b4b0c..2a70efe8305 100644
--- a/java/test/IceGrid/simple/Server.java
+++ b/java/test/IceGrid/simple/Server.java
@@ -17,7 +17,7 @@ public class Server extends Ice.Application
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("TestAdapter");
Ice.Object object = new TestI(adapter);
- adapter.add(object, Ice.Util.stringToIdentity("test"));
+ adapter.add(object, communicator().stringToIdentity("test"));
shutdownOnInterrupt();
try
{
diff --git a/java/test/IceSSL/configuration/Server.java b/java/test/IceSSL/configuration/Server.java
index 4cad38214ac..72417152f35 100644
--- a/java/test/IceSSL/configuration/Server.java
+++ b/java/test/IceSSL/configuration/Server.java
@@ -14,7 +14,7 @@ public class Server
{
communicator.getProperties().setProperty("TestAdapter.Endpoints", "tcp -p 12010");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
- Ice.Identity id = Ice.Util.stringToIdentity("factory");
+ Ice.Identity id = communicator.stringToIdentity("factory");
adapter.add(new ServerFactoryI(), id);
adapter.activate();