summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2006-05-26 15:44:23 +0000
committerDwayne Boone <dwayne@zeroc.com>2006-05-26 15:44:23 +0000
commitb4d4280b01ee02fd05046b657b06e5fe745becde (patch)
treeec09f8ccac8b0de03d9efcfac65277529daf225b /java
parentUpdated icon (diff)
downloadice-b4d4280b01ee02fd05046b657b06e5fe745becde.tar.bz2
ice-b4d4280b01ee02fd05046b657b06e5fe745becde.tar.xz
ice-b4d4280b01ee02fd05046b657b06e5fe745becde.zip
More changes to inconsistent ice_ proxy methods
Diffstat (limited to 'java')
-rwxr-xr-xjava/demo/Ice/bidir/Client.java2
-rw-r--r--java/src/Ice/ObjectPrx.java18
-rw-r--r--java/src/Ice/ObjectPrxHelperBase.java37
-rw-r--r--java/src/IceInternal/RouterInfo.java4
-rw-r--r--java/test/Ice/binding/AllTests.java56
-rw-r--r--java/test/Ice/location/AllTests.java2
-rw-r--r--java/test/Ice/operations/AllTests.java8
-rw-r--r--java/test/Ice/operations/BatchOneways.java4
-rw-r--r--java/test/Ice/timeout/AllTests.java4
-rw-r--r--java/test/IceSSL/configuration/AllTests.java8
10 files changed, 97 insertions, 46 deletions
diff --git a/java/demo/Ice/bidir/Client.java b/java/demo/Ice/bidir/Client.java
index b6a8d26006a..6d736ba0b1f 100755
--- a/java/demo/Ice/bidir/Client.java
+++ b/java/demo/Ice/bidir/Client.java
@@ -36,7 +36,7 @@ public class Client extends Ice.Application
ident.category = "";
adapter.add(new CallbackReceiverI(), ident);
adapter.activate();
- server.ice_connection().setAdapter(adapter);
+ server.ice_getConnection().setAdapter(adapter);
server.addClient(ident);
communicator().waitForShutdown();
diff --git a/java/src/Ice/ObjectPrx.java b/java/src/Ice/ObjectPrx.java
index cbf5f99e4e2..0e930d7137f 100644
--- a/java/src/Ice/ObjectPrx.java
+++ b/java/src/Ice/ObjectPrx.java
@@ -11,9 +11,17 @@ package Ice;
public interface ObjectPrx
{
+ /**
+ * @deprecated This method has been replaced with ice_getHash.
+ **/
int ice_hash();
+ int ice_getHash();
+ /**
+ * @deprecated This method has been replaced with ice_getCommunicator.
+ **/
Communicator ice_communicator();
+ Communicator ice_getCommunicator();
String ice_toString();
@@ -92,8 +100,12 @@ public interface ObjectPrx
Ice.LocatorPrx ice_getLocator();
ObjectPrx ice_locator(Ice.LocatorPrx locator);
- boolean ice_getCollocationOptimization();
+ boolean ice_isCollocationOptimized();
+ /**
+ * @deprecated This method has been replaced with ice_collocationOptimized.
+ **/
ObjectPrx ice_collocationOptimization(boolean b);
+ ObjectPrx ice_collocationOptimized(boolean b);
ObjectPrx ice_twoway();
boolean ice_isTwoway();
@@ -110,7 +122,11 @@ public interface ObjectPrx
ObjectPrx ice_timeout(int t);
ObjectPrx ice_connectionId(String connectionId);
+ /**
+ * @deprecated This method has been replaced with ice_getConnection.
+ **/
Connection ice_connection();
+ Connection ice_getConnection();
boolean equals(java.lang.Object r);
}
diff --git a/java/src/Ice/ObjectPrxHelperBase.java b/java/src/Ice/ObjectPrxHelperBase.java
index a82c2cede1f..e572c56bf82 100644
--- a/java/src/Ice/ObjectPrxHelperBase.java
+++ b/java/src/Ice/ObjectPrxHelperBase.java
@@ -17,14 +17,31 @@ public class ObjectPrxHelperBase implements ObjectPrx
return _reference.hashCode();
}
+ /**
+ * @deprecated This method has been replaced with ice_getHash.
+ **/
public final int
ice_hash()
{
+ return ice_getHash();
+ }
+
+ public final int
+ ice_getHash()
+ {
return _reference.hashCode();
}
+ /**
+ * @deprecated This method has been replaced with ice_getCommunicator.
+ **/
public final Communicator ice_communicator()
{
+ return ice_getCommunicator();
+ }
+
+ public final Communicator ice_getCommunicator()
+ {
return _reference.getCommunicator();
}
@@ -494,14 +511,23 @@ public class ObjectPrxHelperBase implements ObjectPrx
}
public final boolean
- ice_getCollocationOptimization()
+ ice_isCollocationOptimized()
{
return _reference.getCollocationOptimization();
}
+ /**
+ * @deprecated This method has been replaced with ice_collocationOptimized.
+ **/
public final ObjectPrx
ice_collocationOptimization(boolean b)
{
+ return ice_collocationOptimized(b);
+ }
+
+ public final ObjectPrx
+ ice_collocationOptimized(boolean b)
+ {
if(b == _reference.getCollocationOptimization())
{
return this;
@@ -667,9 +693,18 @@ public class ObjectPrxHelperBase implements ObjectPrx
}
}
+ /**
+ * @deprecated This method has been replaced with ice_collocationOptimized.
+ **/
public final Connection
ice_connection()
{
+ return ice_getConnection();
+ }
+
+ public final Connection
+ ice_getConnection()
+ {
int __cnt = 0;
while(true)
{
diff --git a/java/src/IceInternal/RouterInfo.java b/java/src/IceInternal/RouterInfo.java
index 5c3b36c17b3..36f61c5956d 100644
--- a/java/src/IceInternal/RouterInfo.java
+++ b/java/src/IceInternal/RouterInfo.java
@@ -72,7 +72,7 @@ public final class RouterInfo
//
try
{
- _clientProxy = _clientProxy.ice_timeout(_router.ice_connection().timeout());
+ _clientProxy = _clientProxy.ice_timeout(_router.ice_getConnection().timeout());
}
catch(Ice.CollocationOptimizationException ex)
{
@@ -95,7 +95,7 @@ public final class RouterInfo
//
try
{
- _clientProxy = _clientProxy.ice_timeout(_router.ice_connection().timeout());
+ _clientProxy = _clientProxy.ice_timeout(_router.ice_getConnection().timeout());
}
catch(Ice.CollocationOptimizationException ex)
{
diff --git a/java/test/Ice/binding/AllTests.java b/java/test/Ice/binding/AllTests.java
index 8870f547216..38761a6e340 100644
--- a/java/test/Ice/binding/AllTests.java
+++ b/java/test/Ice/binding/AllTests.java
@@ -107,7 +107,7 @@ public class AllTests
TestIntfPrx test1 = adapter.getTestIntf();
TestIntfPrx test2 = adapter.getTestIntf();
- test(test1.ice_connection() == test2.ice_connection());
+ test(test1.ice_getConnection() == test2.ice_getConnection());
test1.ice_ping();
test2.ice_ping();
@@ -115,8 +115,8 @@ public class AllTests
com.deactivateObjectAdapter(adapter);
TestIntfPrx test3 = TestIntfPrxHelper.uncheckedCast(test1);
- test(test3.ice_connection() == test1.ice_connection());
- test(test3.ice_connection() == test2.ice_connection());
+ test(test3.ice_getConnection() == test1.ice_getConnection());
+ test(test3.ice_getConnection() == test2.ice_getConnection());
try
{
@@ -155,11 +155,11 @@ public class AllTests
java.util.Collections.shuffle(adpts);
TestIntfPrx test3 = createTestIntfPrx(adpts);
- test(test1.ice_connection() == test2.ice_connection());
- test(test2.ice_connection() == test3.ice_connection());
+ test(test1.ice_getConnection() == test2.ice_getConnection());
+ test(test2.ice_getConnection() == test3.ice_getConnection());
names.remove(test1.getAdapterName());
- test1.ice_connection().close(false);
+ test1.ice_getConnection().close(false);
}
//
@@ -183,7 +183,7 @@ public class AllTests
p = adapters.iterator();
while(p.hasNext())
{
- ((RemoteObjectAdapterPrx)p.next()).getTestIntf().ice_connection().close(false);
+ ((RemoteObjectAdapterPrx)p.next()).getTestIntf().ice_getConnection().close(false);
}
}
@@ -204,11 +204,11 @@ public class AllTests
java.util.Collections.shuffle(adpts);
TestIntfPrx test3 = createTestIntfPrx(adpts);
- test(test1.ice_connection() == test2.ice_connection());
- test(test2.ice_connection() == test3.ice_connection());
+ test(test1.ice_getConnection() == test2.ice_getConnection());
+ test(test2.ice_getConnection() == test3.ice_getConnection());
names.remove(test1.getAdapterName());
- test1.ice_connection().close(false);
+ test1.ice_getConnection().close(false);
}
//
@@ -249,11 +249,11 @@ public class AllTests
java.util.Collections.shuffle(adpts);
TestIntfPrx test3 = createTestIntfPrx(adpts);
- test(test1.ice_connection() == test2.ice_connection());
- test(test2.ice_connection() == test3.ice_connection());
+ test(test1.ice_getConnection() == test2.ice_getConnection());
+ test(test2.ice_getConnection() == test3.ice_getConnection());
names.remove(getAdapterNameWithAMI(test1));
- test1.ice_connection().close(false);
+ test1.ice_getConnection().close(false);
}
//
@@ -277,7 +277,7 @@ public class AllTests
p = adapters.iterator();
while(p.hasNext())
{
- ((RemoteObjectAdapterPrx)p.next()).getTestIntf().ice_connection().close(false);
+ ((RemoteObjectAdapterPrx)p.next()).getTestIntf().ice_getConnection().close(false);
}
}
@@ -298,11 +298,11 @@ public class AllTests
java.util.Collections.shuffle(adpts);
TestIntfPrx test3 = createTestIntfPrx(adpts);
- test(test1.ice_connection() == test2.ice_connection());
- test(test2.ice_connection() == test3.ice_connection());
+ test(test1.ice_getConnection() == test2.ice_getConnection());
+ test(test2.ice_getConnection() == test3.ice_getConnection());
names.remove(getAdapterNameWithAMI(test1));
- test1.ice_connection().close(false);
+ test1.ice_getConnection().close(false);
}
//
@@ -335,7 +335,7 @@ public class AllTests
while(!names.isEmpty())
{
names.remove(test.getAdapterName());
- test.ice_connection().close(false);
+ test.ice_getConnection().close(false);
}
test = TestIntfPrxHelper.uncheckedCast(test.ice_endpointSelection(Ice.EndpointSelectionType.Random));
@@ -347,7 +347,7 @@ public class AllTests
while(!names.isEmpty())
{
names.remove(test.getAdapterName());
- test.ice_connection().close(false);
+ test.ice_getConnection().close(false);
}
deactivate(com, adapters);
@@ -401,11 +401,11 @@ public class AllTests
adapters.add(com.createObjectAdapter("Adapter36", endpoints[2].toString()));
for(i = 0; i < nRetry && test.getAdapterName().equals("Adapter36"); i++);
test(i == nRetry);
- test.ice_connection().close(false);
+ test.ice_getConnection().close(false);
adapters.add(com.createObjectAdapter("Adapter35", endpoints[1].toString()));
for(i = 0; i < nRetry && test.getAdapterName().equals("Adapter35"); i++);
test(i == nRetry);
- test.ice_connection().close(false);
+ test.ice_getConnection().close(false);
adapters.add(com.createObjectAdapter("Adapter34", endpoints[0].toString()));
for(i = 0; i < nRetry && test.getAdapterName().equals("Adapter34"); i++);
test(i == nRetry);
@@ -423,7 +423,7 @@ public class AllTests
TestIntfPrx test2 = TestIntfPrxHelper.uncheckedCast(adapter.getTestIntf().ice_cacheConnection(false));
test(!test1.ice_getCacheConnection());
test(!test2.ice_getCacheConnection());
- test(test1.ice_connection() == test2.ice_connection());
+ test(test1.ice_getConnection() == test2.ice_getConnection());
test1.ice_ping();
@@ -432,7 +432,7 @@ public class AllTests
TestIntfPrx test3 = TestIntfPrxHelper.uncheckedCast(test1);
try
{
- test(test3.ice_connection() == test1.ice_connection());
+ test(test3.ice_getConnection() == test1.ice_getConnection());
test(false);
}
catch(Ice.ConnectionRefusedException ex)
@@ -648,7 +648,7 @@ public class AllTests
test(test.getAdapterName().equals("Adapter71"));
TestIntfPrx testUDP = TestIntfPrxHelper.uncheckedCast(test.ice_datagram());
- test(test.ice_connection() != testUDP.ice_connection());
+ test(test.ice_getConnection() != testUDP.ice_getConnection());
try
{
testUDP.getAdapterName();
@@ -673,7 +673,7 @@ public class AllTests
for(i = 0; i < 5; i++)
{
test(test.getAdapterName().equals("Adapter82"));
- test.ice_connection().close(false);
+ test.ice_getConnection().close(false);
}
TestIntfPrx testSecure = TestIntfPrxHelper.uncheckedCast(test.ice_secure(true));
@@ -682,14 +682,14 @@ public class AllTests
test(!testSecure.ice_getSecure());
testSecure = TestIntfPrxHelper.uncheckedCast(test.ice_secure(true));
test(testSecure.ice_getSecure());
- test(test.ice_connection() != testSecure.ice_connection());
+ test(test.ice_getConnection() != testSecure.ice_getConnection());
com.deactivateObjectAdapter((RemoteObjectAdapterPrx)adapters.get(1));
for(i = 0; i < 5; i++)
{
test(test.getAdapterName().equals("Adapter81"));
- test.ice_connection().close(false);
+ test.ice_getConnection().close(false);
}
com.createObjectAdapter("Adapter83", (test.ice_getEndpoints()[1]).toString()); // Reactive tcp OA.
@@ -697,7 +697,7 @@ public class AllTests
for(i = 0; i < 5; i++)
{
test(test.getAdapterName().equals("Adapter83"));
- test.ice_connection().close(false);
+ test.ice_getConnection().close(false);
}
com.deactivateObjectAdapter((RemoteObjectAdapterPrx)adapters.get(0));
diff --git a/java/test/Ice/location/AllTests.java b/java/test/Ice/location/AllTests.java
index 5acac13d7d2..aaeaa7b549a 100644
--- a/java/test/Ice/location/AllTests.java
+++ b/java/test/Ice/location/AllTests.java
@@ -340,7 +340,7 @@ public class AllTests
{
HelloPrx helloPrx = HelloPrxHelper.checkedCast(
communicator.stringToProxy("\"" + communicator.identityToString(id) + "\""));
- Ice.Connection connection = helloPrx.ice_connection();
+ Ice.Connection connection = helloPrx.ice_getConnection();
test(false);
}
catch(Ice.CollocationOptimizationException ex)
diff --git a/java/test/Ice/operations/AllTests.java b/java/test/Ice/operations/AllTests.java
index 0ddc337abde..d9fa88abc15 100644
--- a/java/test/Ice/operations/AllTests.java
+++ b/java/test/Ice/operations/AllTests.java
@@ -28,9 +28,9 @@ public class AllTests
test(base != null);
System.out.println("ok");
- System.out.print("testing ice_communicator... ");
+ System.out.print("testing ice_getCommunicator... ");
System.out.flush();
- test(base.ice_communicator() == communicator);
+ test(base.ice_getCommunicator() == communicator);
System.out.println("ok");
System.out.print("testing proxy methods... ");
@@ -46,8 +46,8 @@ public class AllTests
test(base.ice_batchDatagram().ice_isBatchDatagram());
test(base.ice_secure(true).ice_getSecure());
test(!base.ice_secure(false).ice_getSecure());
- test(base.ice_collocationOptimization(true).ice_getCollocationOptimization());
- test(!base.ice_collocationOptimization(false).ice_getCollocationOptimization());
+ test(base.ice_collocationOptimized(true).ice_isCollocationOptimized());
+ test(!base.ice_collocationOptimized(false).ice_isCollocationOptimized());
System.out.println("ok");
System.out.print("testing checked cast... ");
diff --git a/java/test/Ice/operations/BatchOneways.java b/java/test/Ice/operations/BatchOneways.java
index 8f98f6991c5..b25aea5ebed 100644
--- a/java/test/Ice/operations/BatchOneways.java
+++ b/java/test/Ice/operations/BatchOneways.java
@@ -69,7 +69,7 @@ class BatchOneways
test(false);
}
- batch.ice_connection().flushBatchRequests();
+ batch.ice_getConnection().flushBatchRequests();
}
for(int i = 0 ; i < 10 ; ++i)
@@ -97,7 +97,7 @@ class BatchOneways
test(false);
}
- batch.ice_connection().flushBatchRequests();
+ batch.ice_getConnection().flushBatchRequests();
}
}
}
diff --git a/java/test/Ice/timeout/AllTests.java b/java/test/Ice/timeout/AllTests.java
index b8a50011192..ab5ea1e1df8 100644
--- a/java/test/Ice/timeout/AllTests.java
+++ b/java/test/Ice/timeout/AllTests.java
@@ -174,7 +174,7 @@ public class AllTests
//
TimeoutPrx to = TimeoutPrxHelper.uncheckedCast(obj.ice_timeout(500));
to.holdAdapter(750);
- to.ice_connection().close(true); // Force a reconnect.
+ to.ice_getConnection().close(true); // Force a reconnect.
try
{
to.op();
@@ -192,7 +192,7 @@ public class AllTests
timeout.op(); // Ensure adapter is active.
TimeoutPrx to = TimeoutPrxHelper.uncheckedCast(obj.ice_timeout(1000));
to.holdAdapter(500);
- to.ice_connection().close(true); // Force a reconnect.
+ to.ice_getConnection().close(true); // Force a reconnect.
try
{
to.op();
diff --git a/java/test/IceSSL/configuration/AllTests.java b/java/test/IceSSL/configuration/AllTests.java
index fee65402387..1b8f565def2 100644
--- a/java/test/IceSSL/configuration/AllTests.java
+++ b/java/test/IceSSL/configuration/AllTests.java
@@ -243,7 +243,7 @@ public class AllTests
//
try
{
- IceSSL.ConnectionInfo info = IceSSL.Util.getConnectionInfo(server.ice_connection());
+ IceSSL.ConnectionInfo info = IceSSL.Util.getConnectionInfo(server.ice_getConnection());
test(info.certs.length == 2);
}
catch(IceSSL.ConnectionInvalidException ex)
@@ -372,7 +372,7 @@ public class AllTests
java.security.cert.X509Certificate caCert =
(java.security.cert.X509Certificate)serverKeystore.getCertificate("cacert");
- IceSSL.ConnectionInfo info = IceSSL.Util.getConnectionInfo(server.ice_connection());
+ IceSSL.ConnectionInfo info = IceSSL.Util.getConnectionInfo(server.ice_getConnection());
test(info.certs.length == 2);
@@ -513,7 +513,7 @@ public class AllTests
{
String cipherSub = "DH_anon";
server.checkCipher(cipherSub);
- IceSSL.ConnectionInfo info = IceSSL.Util.getConnectionInfo(server.ice_connection());
+ IceSSL.ConnectionInfo info = IceSSL.Util.getConnectionInfo(server.ice_getConnection());
test(info.cipher.indexOf(cipherSub) >= 0);
}
catch(Ice.LocalException ex)
@@ -529,7 +529,7 @@ public class AllTests
//
verifier.reset();
verifier.returnValue(false);
- server.ice_connection().close(false);
+ server.ice_getConnection().close(false);
try
{
server.ice_ping();