diff options
author | Jose <jose@zeroc.com> | 2014-09-24 21:06:55 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2014-09-24 21:06:55 +0200 |
commit | b1087d646fa93c4208dd227d0c9df323ff7c858b (patch) | |
tree | 48532138bffdfac0dc5c818593d9c1958cfeeeb5 /java/test | |
parent | PHP dependency fixes (diff) | |
download | ice-b1087d646fa93c4208dd227d0c9df323ff7c858b.tar.bz2 ice-b1087d646fa93c4208dd227d0c9df323ff7c858b.tar.xz ice-b1087d646fa93c4208dd227d0c9df323ff7c858b.zip |
Fixed (ICE-5511) - Consider removing the deprecated AMI mapping
Diffstat (limited to 'java/test')
49 files changed, 526 insertions, 4146 deletions
diff --git a/java/test/Ice/exceptions/AllTests.java b/java/test/Ice/exceptions/AllTests.java index f11f576c2fb..960fae967aa 100644 --- a/java/test/Ice/exceptions/AllTests.java +++ b/java/test/Ice/exceptions/AllTests.java @@ -11,20 +11,6 @@ package test.Ice.exceptions; import java.io.PrintWriter; import test.Ice.exceptions.Test.A; -import test.Ice.exceptions.Test.AMI_Thrower_throwAasA; -import test.Ice.exceptions.Test.AMI_Thrower_throwAorDasAorD; -import test.Ice.exceptions.Test.AMI_Thrower_throwAssertException; -import test.Ice.exceptions.Test.AMI_Thrower_throwBasA; -import test.Ice.exceptions.Test.AMI_Thrower_throwBasB; -import test.Ice.exceptions.Test.AMI_Thrower_throwCasA; -import test.Ice.exceptions.Test.AMI_Thrower_throwCasB; -import test.Ice.exceptions.Test.AMI_Thrower_throwCasC; -import test.Ice.exceptions.Test.AMI_Thrower_throwLocalException; -import test.Ice.exceptions.Test.AMI_Thrower_throwNonIceException; -import test.Ice.exceptions.Test.AMI_Thrower_throwUndeclaredA; -import test.Ice.exceptions.Test.AMI_Thrower_throwUndeclaredB; -import test.Ice.exceptions.Test.AMI_Thrower_throwUndeclaredC; -import test.Ice.exceptions.Test.AMI_WrongOperation_noSuchOperation; import test.Ice.exceptions.Test.B; import test.Ice.exceptions.Test.C; import test.Ice.exceptions.Test.D; @@ -92,645 +78,6 @@ public class AllTests private boolean _called; } - private static class AMI_Thrower_throwAasAI extends AMI_Thrower_throwAasA - { - @Override - public void ice_response() - { - test(false); - } - - @Override - public void ice_exception(Ice.LocalException exc) - { - exc.printStackTrace(); - test(false); - } - - @Override - public void ice_exception(Ice.UserException exc) - { - try - { - throw exc; - } - catch(A ex) - { - test(ex.aMem == 1); - } - catch(Throwable ex) - { - ex.printStackTrace(); - test(false); - } - callback.called(); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class AMI_Thrower_throwAasAObjectNotExistI extends AMI_Thrower_throwAasA - { - AMI_Thrower_throwAasAObjectNotExistI(Ice.Communicator communicator) - { - _communicator = communicator; - } - - @Override - public void ice_response() - { - test(false); - } - - @Override - public void ice_exception(Ice.LocalException exc) - { - try - { - throw exc; - } - catch(Ice.ObjectNotExistException ex) - { - Ice.Identity id = _communicator.stringToIdentity("does not exist"); - test(ex.id.equals(id)); - } - catch(Throwable ex) - { - ex.printStackTrace(); - test(false); - } - callback.called(); - } - - @Override - public void ice_exception(Ice.UserException exc) - { - exc.printStackTrace(); - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - private Ice.Communicator _communicator; - } - - private static class AMI_Thrower_throwAasAFacetNotExistI extends AMI_Thrower_throwAasA - { - @Override - public void ice_response() - { - test(false); - } - - @Override - public void ice_exception(Ice.LocalException exc) - { - try - { - throw exc; - } - catch(Ice.FacetNotExistException ex) - { - test(ex.facet.equals("no such facet")); - } - catch(Throwable ex) - { - ex.printStackTrace(); - test(false); - } - callback.called(); - } - - @Override - public void ice_exception(Ice.UserException exc) - { - exc.printStackTrace(); - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class AMI_Thrower_throwAorDasAorDI extends AMI_Thrower_throwAorDasAorD - { - @Override - public void ice_response() - { - test(false); - } - - @Override - public void ice_exception(Ice.LocalException exc) - { - exc.printStackTrace(); - test(false); - } - - @Override - public void ice_exception(Ice.UserException exc) - { - try - { - throw exc; - } - catch(A ex) - { - test(ex.aMem == 1); - } - catch(D ex) - { - test(ex.dMem == -1); - } - catch(Throwable ex) - { - ex.printStackTrace(); - test(false); - } - callback.called(); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class AMI_Thrower_throwBasAI extends AMI_Thrower_throwBasA - { - @Override - public void ice_response() - { - test(false); - } - - @Override - public void ice_exception(Ice.LocalException exc) - { - exc.printStackTrace(); - test(false); - } - - @Override - public void ice_exception(Ice.UserException exc) - { - try - { - throw exc; - } - catch(B ex) - { - test(ex.aMem == 1); - test(ex.bMem == 2); - } - catch(Throwable ex) - { - ex.printStackTrace(); - test(false); - } - callback.called(); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class AMI_Thrower_throwCasAI extends AMI_Thrower_throwCasA - { - @Override - public void ice_response() - { - test(false); - } - - @Override - public void ice_exception(Ice.LocalException exc) - { - exc.printStackTrace(); - test(false); - } - - @Override - public void ice_exception(Ice.UserException exc) - { - try - { - throw exc; - } - catch(C ex) - { - test(ex.aMem == 1); - test(ex.bMem == 2); - test(ex.cMem == 3); - } - catch(Throwable ex) - { - ex.printStackTrace(); - test(false); - } - callback.called(); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class AMI_Thrower_throwBasBI extends AMI_Thrower_throwBasB - { - @Override - public void ice_response() - { - test(false); - } - - @Override - public void ice_exception(Ice.LocalException exc) - { - exc.printStackTrace(); - test(false); - } - - @Override - public void ice_exception(Ice.UserException exc) - { - try - { - throw exc; - } - catch(B ex) - { - test(ex.aMem == 1); - test(ex.bMem == 2); - } - catch(Throwable ex) - { - ex.printStackTrace(); - test(false); - } - callback.called(); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class AMI_Thrower_throwCasBI extends AMI_Thrower_throwCasB - { - @Override - public void ice_response() - { - test(false); - } - - @Override - public void ice_exception(Ice.LocalException exc) - { - exc.printStackTrace(); - test(false); - } - - @Override - public void ice_exception(Ice.UserException exc) - { - try - { - throw exc; - } - catch(C ex) - { - test(ex.aMem == 1); - test(ex.bMem == 2); - test(ex.cMem == 3); - } - catch(Throwable ex) - { - ex.printStackTrace(); - test(false); - } - callback.called(); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class AMI_Thrower_throwCasCI extends AMI_Thrower_throwCasC - { - @Override - public void ice_response() - { - test(false); - } - - @Override - public void ice_exception(Ice.LocalException exc) - { - exc.printStackTrace(); - test(false); - } - - @Override - public void ice_exception(Ice.UserException exc) - { - try - { - throw exc; - } - catch(C ex) - { - test(ex.aMem == 1); - test(ex.bMem == 2); - test(ex.cMem == 3); - } - catch(Throwable ex) - { - ex.printStackTrace(); - test(false); - } - callback.called(); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class AMI_Thrower_throwUndeclaredAI extends AMI_Thrower_throwUndeclaredA - { - @Override - public void ice_response() - { - test(false); - } - - @Override - public void ice_exception(Ice.LocalException exc) - { - try - { - throw exc; - } - catch(Ice.UnknownUserException ex) - { - } - catch(Throwable ex) - { - ex.printStackTrace(); - test(false); - } - callback.called(); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class AMI_Thrower_throwUndeclaredBI extends AMI_Thrower_throwUndeclaredB - { - @Override - public void ice_response() - { - test(false); - } - - @Override - public void ice_exception(Ice.LocalException exc) - { - try - { - throw exc; - } - catch(Ice.UnknownUserException ex) - { - } - catch(Throwable ex) - { - ex.printStackTrace(); - test(false); - } - callback.called(); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class AMI_Thrower_throwUndeclaredCI extends AMI_Thrower_throwUndeclaredC - { - @Override - public void ice_response() - { - test(false); - } - - @Override - public void ice_exception(Ice.LocalException exc) - { - try - { - throw exc; - } - catch(Ice.UnknownUserException ex) - { - } - catch(Throwable ex) - { - ex.printStackTrace(); - test(false); - } - callback.called(); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class AMI_Thrower_throwLocalExceptionI extends AMI_Thrower_throwLocalException - { - @Override - public void ice_response() - { - test(false); - } - - @Override - public void ice_exception(Ice.LocalException exc) - { - try - { - throw exc; - } - catch(Ice.UnknownLocalException ex) - { - } - catch(Throwable ex) - { - ex.printStackTrace(); - test(false); - } - callback.called(); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class AMI_Thrower_throwNonIceExceptionI extends AMI_Thrower_throwNonIceException - { - @Override - public void ice_response() - { - test(false); - } - - @Override - public void ice_exception(Ice.LocalException exc) - { - try - { - throw exc; - } - catch(Ice.UnknownException ex) - { - } - catch(Throwable ex) - { - ex.printStackTrace(); - test(false); - } - callback.called(); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class AMI_Thrower_throwAssertExceptionI extends AMI_Thrower_throwAssertException - { - @Override - public void ice_response() - { - test(false); - } - - @Override - public void ice_exception(Ice.LocalException exc) - { - try - { - throw exc; - } - catch(Ice.ConnectionLostException ex) - { - } - catch(Ice.UnknownException ex) - { - } - catch(Throwable ex) - { - ex.printStackTrace(); - test(false); - } - callback.called(); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class AMI_WrongOperation_noSuchOperationI extends AMI_WrongOperation_noSuchOperation - { - @Override - public void ice_response() - { - test(false); - } - - @Override - public void ice_exception(Ice.LocalException exc) - { - try - { - throw exc; - } - catch(Ice.OperationNotExistException ex) - { - test(ex.operation.equals("noSuchOperation")); - } - catch(Throwable ex) - { - ex.printStackTrace(); - test(false); - } - callback.called(); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - private static class Callback_Thrower_throwAasAI extends Callback_Thrower_throwAasA { @Override @@ -1965,176 +1312,7 @@ public class AllTests out.println("ok"); - out.print("catching exact types with AMI... "); - out.flush(); - - { - AMI_Thrower_throwAasAI cb = new AMI_Thrower_throwAasAI(); - thrower.throwAasA_async(cb, 1); - cb.check(); - // Let's check if we can reuse the same callback object for another call. - thrower.throwAasA_async(cb, 1); - cb.check(); - } - - { - AMI_Thrower_throwAorDasAorDI cb = new AMI_Thrower_throwAorDasAorDI(); - thrower.throwAorDasAorD_async(cb, 1); - cb.check(); - } - - { - AMI_Thrower_throwAorDasAorDI cb = new AMI_Thrower_throwAorDasAorDI(); - thrower.throwAorDasAorD_async(cb, -1); - cb.check(); - } - - { - AMI_Thrower_throwBasBI cb = new AMI_Thrower_throwBasBI(); - thrower.throwBasB_async(cb, 1, 2); - cb.check(); - } - - { - AMI_Thrower_throwCasCI cb = new AMI_Thrower_throwCasCI(); - thrower.throwCasC_async(cb, 1, 2, 3); - cb.check(); - // Let's check if we can reuse the same callback object for another call. - thrower.throwCasC_async(cb, 1, 2, 3); - cb.check(); - } - - out.println("ok"); - - out.print("catching derived types with AMI... "); - out.flush(); - - { - AMI_Thrower_throwBasAI cb = new AMI_Thrower_throwBasAI(); - thrower.throwBasA_async(cb, 1, 2); - cb.check(); - } - - { - AMI_Thrower_throwCasAI cb = new AMI_Thrower_throwCasAI(); - thrower.throwCasA_async(cb, 1, 2, 3); - cb.check(); - } - - { - AMI_Thrower_throwCasBI cb = new AMI_Thrower_throwCasBI(); - thrower.throwCasB_async(cb, 1, 2, 3); - cb.check(); - } - - out.println("ok"); - - if(thrower.supportsUndeclaredExceptions()) - { - out.print("catching unknown user exception with AMI... "); - out.flush(); - - { - AMI_Thrower_throwUndeclaredAI cb = new AMI_Thrower_throwUndeclaredAI(); - thrower.throwUndeclaredA_async(cb, 1); - cb.check(); - } - - { - AMI_Thrower_throwUndeclaredBI cb = new AMI_Thrower_throwUndeclaredBI(); - thrower.throwUndeclaredB_async(cb, 1, 2); - cb.check(); - } - - { - AMI_Thrower_throwUndeclaredCI cb = new AMI_Thrower_throwUndeclaredCI(); - thrower.throwUndeclaredC_async(cb, 1, 2, 3); - cb.check(); - } - - out.println("ok"); - } - - if(thrower.supportsAssertException()) - { - out.print("testing assert in the server with AMI... "); - out.flush(); - - AMI_Thrower_throwAssertExceptionI cb = new AMI_Thrower_throwAssertExceptionI(); - thrower.throwAssertException_async(cb); - cb.check(); - - out.println("ok"); - } - - out.print("catching object not exist exception with AMI... "); - out.flush(); - - { - Ice.Identity id = communicator.stringToIdentity("does not exist"); - ThrowerPrx thrower2 = ThrowerPrxHelper.uncheckedCast(thrower.ice_identity(id)); - AMI_Thrower_throwAasAObjectNotExistI cb = new AMI_Thrower_throwAasAObjectNotExistI(communicator); - thrower2.throwAasA_async(cb, 1); - cb.check(); - } - - out.println("ok"); - - out.print("catching facet not exist exception with AMI... "); - out.flush(); - - try - { - ThrowerPrx thrower2 = ThrowerPrxHelper.uncheckedCast(thrower, "no such facet"); - { - AMI_Thrower_throwAasAFacetNotExistI cb = new AMI_Thrower_throwAasAFacetNotExistI(); - thrower2.throwAasA_async(cb, 1); - cb.check(); - } - } - catch(Throwable ex) - { - ex.printStackTrace(); - test(false); - } - - out.println("ok"); - - out.print("catching operation not exist exception with AMI... "); - out.flush(); - - { - AMI_WrongOperation_noSuchOperationI cb = new AMI_WrongOperation_noSuchOperationI(); - WrongOperationPrx thrower2 = WrongOperationPrxHelper.uncheckedCast(thrower); - thrower2.noSuchOperation_async(cb); - cb.check(); - } - - out.println("ok"); - - out.print("catching unknown local exception with AMI... "); - out.flush(); - - { - AMI_Thrower_throwLocalExceptionI cb = new AMI_Thrower_throwLocalExceptionI(); - thrower.throwLocalException_async(cb); - cb.check(); - } - - out.println("ok"); - - out.print("catching unknown non-Ice exception with AMI... "); - out.flush(); - - { - AMI_Thrower_throwNonIceExceptionI cb = new AMI_Thrower_throwNonIceExceptionI(); - thrower.throwNonIceException_async(cb); - cb.check(); - } - - out.println("ok"); - - out.print("catching exact types with new AMI mapping... "); + out.print("catching exact types with AMI mapping... "); out.flush(); { @@ -2169,7 +1347,7 @@ public class AllTests out.println("ok"); - out.print("catching derived types with new AMI mapping... "); + out.print("catching derived types with mapping... "); out.flush(); { @@ -2194,7 +1372,7 @@ public class AllTests if(thrower.supportsUndeclaredExceptions()) { - out.print("catching unknown user exception with new AMI mapping... "); + out.print("catching unknown user exception with mapping... "); out.flush(); { @@ -2220,7 +1398,7 @@ public class AllTests if(thrower.supportsAssertException()) { - out.print("catching assert in the server with new AMI mapping... "); + out.print("catching assert in the server with mapping... "); out.flush(); Callback_Thrower_throwAssertExceptionI cb = new Callback_Thrower_throwAssertExceptionI(); @@ -2231,7 +1409,7 @@ public class AllTests } - out.print("catching object not exist exception with new AMI mapping... "); + out.print("catching object not exist exception with mapping... "); out.flush(); { @@ -2244,7 +1422,7 @@ public class AllTests out.println("ok"); - out.print("catching facet not exist exception with new AMI mapping... "); + out.print("catching facet not exist exception with mapping... "); out.flush(); { @@ -2256,7 +1434,7 @@ public class AllTests out.println("ok"); - out.print("catching operation not exist exception with new AMI mapping... "); + out.print("catching operation not exist exception with mapping... "); out.flush(); { @@ -2268,7 +1446,7 @@ public class AllTests out.println("ok"); - out.print("catching unknown local exception with new AMI mapping... "); + out.print("catching unknown local exception with mapping... "); out.flush(); { @@ -2298,7 +1476,7 @@ public class AllTests out.println("ok"); - out.print("catching unknown non-Ice exception with new AMI mapping... "); + out.print("catching unknown non-Ice exception with mapping... "); out.flush(); { diff --git a/java/test/Ice/exceptions/Test.ice b/java/test/Ice/exceptions/Test.ice index 7d00b861bf6..c1818494ad2 100644 --- a/java/test/Ice/exceptions/Test.ice +++ b/java/test/Ice/exceptions/Test.ice @@ -41,7 +41,7 @@ exception D int dMem; }; -["ami"] interface Thrower +interface Thrower { void shutdown(); bool supportsUndeclaredExceptions(); @@ -69,7 +69,7 @@ exception D void throwAfterException() throws A; }; -["ami"] interface WrongOperation +interface WrongOperation { void noSuchOperation(); }; diff --git a/java/test/Ice/exceptions/TestAMD.ice b/java/test/Ice/exceptions/TestAMD.ice index 2ac953aca0d..4007abf0f52 100644 --- a/java/test/Ice/exceptions/TestAMD.ice +++ b/java/test/Ice/exceptions/TestAMD.ice @@ -37,7 +37,7 @@ exception D int dMem; }; -["ami", "amd"] interface Thrower +["amd"] interface Thrower { void shutdown(); bool supportsUndeclaredExceptions(); @@ -64,7 +64,7 @@ exception D void throwAfterException() throws A; }; -["ami", "amd"] interface WrongOperation +["amd"] interface WrongOperation { void noSuchOperation(); }; diff --git a/java/test/Ice/operations/AllTests.java b/java/test/Ice/operations/AllTests.java index 63866c9e4c0..b89c85f3745 100644 --- a/java/test/Ice/operations/AllTests.java +++ b/java/test/Ice/operations/AllTests.java @@ -44,12 +44,6 @@ public class AllTests TwowaysAMI.twowaysAMI(app, derived); out.println("ok"); - out.print("testing twoway operations with new AMI mapping... "); - out.flush(); - TwowaysNewAMI.twowaysNewAMI(app, cl); - TwowaysNewAMI.twowaysNewAMI(app, derived); - out.println("ok"); - // // Use reflection to load TwowaysLambdaAMI as that is only supported with Java >= 1.8 // @@ -85,11 +79,6 @@ public class AllTests out.flush(); OnewaysAMI.onewaysAMI(app, cl); out.println("ok"); - - out.print("testing oneway operations with new AMI mapping... "); - out.flush(); - OnewaysNewAMI.onewaysNewAMI(app, cl); - out.println("ok"); // // Use reflection to load OnewaysLambdaAMI as that is only supported with Java >= 1.8 diff --git a/java/test/Ice/operations/OnewaysAMI.java b/java/test/Ice/operations/OnewaysAMI.java index 9e2cbff880d..dfaca37f114 100644 --- a/java/test/Ice/operations/OnewaysAMI.java +++ b/java/test/Ice/operations/OnewaysAMI.java @@ -9,12 +9,10 @@ package test.Ice.operations; -import test.Ice.operations.Test.AMI_MyClass_opByte; -import test.Ice.operations.Test.AMI_MyClass_opIdempotent; -import test.Ice.operations.Test.AMI_MyClass_opNonmutating; -import test.Ice.operations.Test.AMI_MyClass_opVoid; +import test.Ice.operations.Test.Callback_MyClass_opIdempotent; +import test.Ice.operations.Test.Callback_MyClass_opNonmutating; +import test.Ice.operations.Test.Callback_MyClass_opVoid; import test.Ice.operations.Test.MyClassPrx; -import test.Ice.operations.Test.MyClassPrxHelper; class OnewaysAMI { @@ -27,15 +25,14 @@ class OnewaysAMI } } - private static class Callback + private static class CallbackBase { - Callback() + CallbackBase() { _called = false; } - public synchronized void - check() + public synchronized void check() { while(!_called) { @@ -50,9 +47,8 @@ class OnewaysAMI _called = false; } - - public synchronized void - called() + + public synchronized void called() { assert(!_called); _called = true; @@ -62,152 +58,187 @@ class OnewaysAMI private boolean _called; } - private static class AMI_MyClass_opVoidI extends AMI_MyClass_opVoid - { - @Override - public void - ice_response() - { - test(false); - } - - @Override - public void - ice_exception(Ice.LocalException ex) - { - test(false); - } - } - - private static class AMI_MyClass_opIdempotentI extends AMI_MyClass_opIdempotent + static class Callback extends CallbackBase { - @Override - public void - ice_response() - { - test(false); - } - - @Override - public void - ice_exception(Ice.LocalException ex) + public Callback() { - test(false); } - } - private static class AMI_MyClass_opNonmutatingI extends AMI_MyClass_opNonmutating - { - @Override public void - ice_response() + sent(boolean sentSynchronously) { - test(false); + called(); } - @Override - public void - ice_exception(Ice.LocalException ex) + void noException(Ice.LocalException ex) { test(false); } } - private static class AMI_MyClass_opVoidExI extends AMI_MyClass_opVoid + static void + onewaysAMI(test.Util.Application app, MyClassPrx proxy) { - @Override - public void - ice_response() - { - test(false); - } - - @Override - public void - ice_exception(Ice.LocalException ex) - { - test(ex instanceof Ice.NoEndpointException); - callback.called(); - } + MyClassPrx p = (MyClassPrx)proxy.ice_oneway(); - public void - check() { - callback.check(); + final Callback cb = new Callback(); + Ice.Callback_Object_ice_ping callback = new Ice.Callback_Object_ice_ping() + { + @Override + public void + response() + { + test(false); + } + + @Override + public void + exception(Ice.LocalException ex) + { + cb.noException(ex); + } + + @Override + public void + sent(boolean sentSynchronously) + { + cb.sent(sentSynchronously); + } + }; + p.begin_ice_ping(callback); + cb.check(); } - private Callback callback = new Callback(); - } - - private static class AMI_MyClass_opByteExI extends AMI_MyClass_opByte - { - @Override - public void - ice_response(byte r, byte b) { - test(false); + try + { + p.begin_ice_isA("::Test::MyClass"); + test(false); + } + catch(java.lang.IllegalArgumentException ex) + { + } } - @Override - public void - ice_exception(Ice.LocalException ex) { - test(ex instanceof Ice.TwowayOnlyException); - callback.called(); + try + { + p.begin_ice_id(); + test(false); + } + catch(java.lang.IllegalArgumentException ex) + { + } } - public void - check() { - callback.check(); + try + { + p.begin_ice_ids(); + test(false); + } + catch(java.lang.IllegalArgumentException ex) + { + } } - private Callback callback = new Callback(); - } - - static void - onewaysAMI(test.Util.Application app, MyClassPrx p) - { - p = MyClassPrxHelper.uncheckedCast(p.ice_oneway()); - { - AMI_MyClass_opVoidI cb = new AMI_MyClass_opVoidI(); - p.opVoid_async(cb); - // Let's check if we can reuse the same callback object for another call. - p.opVoid_async(cb); + final Callback cb = new Callback(); + Callback_MyClass_opVoid callback = new Callback_MyClass_opVoid() + { + @Override + public void + response() + { + test(false); + } + + @Override + public void + exception(Ice.LocalException ex) + { + cb.noException(ex); + } + + @Override + public void + sent(boolean sentSynchronously) + { + cb.sent(sentSynchronously); + } + }; + p.begin_opVoid(callback); + cb.check(); } { - AMI_MyClass_opIdempotentI cb = new AMI_MyClass_opIdempotentI(); - p.opIdempotent_async(cb); + final Callback cb = new Callback(); + Callback_MyClass_opIdempotent callback = new Callback_MyClass_opIdempotent() + { + @Override + public void + response() + { + test(false); + } + + @Override + public void + exception(Ice.LocalException ex) + { + cb.noException(ex); + } + + @Override + public void + sent(boolean sentSynchronously) + { + cb.sent(sentSynchronously); + } + }; + p.begin_opIdempotent(callback); + cb.check(); } { - AMI_MyClass_opNonmutatingI cb = new AMI_MyClass_opNonmutatingI(); - p.opNonmutating_async(cb); + final Callback cb = new Callback(); + Callback_MyClass_opNonmutating callback = new Callback_MyClass_opNonmutating() + { + @Override + public void + response() + { + test(false); + } + + @Override + public void + exception(Ice.LocalException ex) + { + cb.noException(ex); + } + + @Override + public void + sent(boolean sentSynchronously) + { + cb.sent(sentSynchronously); + } + }; + p.begin_opNonmutating(callback); + cb.check(); } { - // Check that a call to a void operation raises NoEndpointException - // in the ice_exception() callback instead of at the point of call. - MyClassPrx indirect = MyClassPrxHelper.uncheckedCast(p.ice_adapterId("dummy")); - AMI_MyClass_opVoidExI cb = new AMI_MyClass_opVoidExI(); try { - indirect.opVoid_async(cb); + p.begin_opByte((byte)0xff, (byte)0x0f); + test(false); } - catch(java.lang.Exception ex) + catch(java.lang.IllegalArgumentException ex) { - test(false); } - cb.check(); } - - { - AMI_MyClass_opByteExI cb = new AMI_MyClass_opByteExI(); - p.opByte_async(cb, (byte)0xff, (byte)0x0f); - cb.check(); - } - } } diff --git a/java/test/Ice/operations/OnewaysNewAMI.java b/java/test/Ice/operations/OnewaysNewAMI.java deleted file mode 100644 index 55f17e4f25e..00000000000 --- a/java/test/Ice/operations/OnewaysNewAMI.java +++ /dev/null @@ -1,244 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -package test.Ice.operations; - -import test.Ice.operations.Test.Callback_MyClass_opIdempotent; -import test.Ice.operations.Test.Callback_MyClass_opNonmutating; -import test.Ice.operations.Test.Callback_MyClass_opVoid; -import test.Ice.operations.Test.MyClassPrx; - -class OnewaysNewAMI -{ - private static void - test(boolean b) - { - if(!b) - { - throw new RuntimeException(); - } - } - - private static class CallbackBase - { - CallbackBase() - { - _called = false; - } - - public synchronized void check() - { - while(!_called) - { - try - { - wait(); - } - catch(InterruptedException ex) - { - } - } - - _called = false; - } - - public synchronized void called() - { - assert(!_called); - _called = true; - notify(); - } - - private boolean _called; - } - - static class Callback extends CallbackBase - { - public Callback() - { - } - - public void - sent(boolean sentSynchronously) - { - called(); - } - - void noException(Ice.LocalException ex) - { - test(false); - } - } - - static void - onewaysNewAMI(test.Util.Application app, MyClassPrx proxy) - { - MyClassPrx p = (MyClassPrx)proxy.ice_oneway(); - - { - final Callback cb = new Callback(); - Ice.Callback_Object_ice_ping callback = new Ice.Callback_Object_ice_ping() - { - @Override - public void - response() - { - test(false); - } - - @Override - public void - exception(Ice.LocalException ex) - { - cb.noException(ex); - } - - @Override - public void - sent(boolean sentSynchronously) - { - cb.sent(sentSynchronously); - } - }; - p.begin_ice_ping(callback); - cb.check(); - } - - { - try - { - p.begin_ice_isA("::Test::MyClass"); - test(false); - } - catch(java.lang.IllegalArgumentException ex) - { - } - } - - { - try - { - p.begin_ice_id(); - test(false); - } - catch(java.lang.IllegalArgumentException ex) - { - } - } - - { - try - { - p.begin_ice_ids(); - test(false); - } - catch(java.lang.IllegalArgumentException ex) - { - } - } - - { - final Callback cb = new Callback(); - Callback_MyClass_opVoid callback = new Callback_MyClass_opVoid() - { - @Override - public void - response() - { - test(false); - } - - @Override - public void - exception(Ice.LocalException ex) - { - cb.noException(ex); - } - - @Override - public void - sent(boolean sentSynchronously) - { - cb.sent(sentSynchronously); - } - }; - p.begin_opVoid(callback); - cb.check(); - } - - { - final Callback cb = new Callback(); - Callback_MyClass_opIdempotent callback = new Callback_MyClass_opIdempotent() - { - @Override - public void - response() - { - test(false); - } - - @Override - public void - exception(Ice.LocalException ex) - { - cb.noException(ex); - } - - @Override - public void - sent(boolean sentSynchronously) - { - cb.sent(sentSynchronously); - } - }; - p.begin_opIdempotent(callback); - cb.check(); - } - - { - final Callback cb = new Callback(); - Callback_MyClass_opNonmutating callback = new Callback_MyClass_opNonmutating() - { - @Override - public void - response() - { - test(false); - } - - @Override - public void - exception(Ice.LocalException ex) - { - cb.noException(ex); - } - - @Override - public void - sent(boolean sentSynchronously) - { - cb.sent(sentSynchronously); - } - }; - p.begin_opNonmutating(callback); - cb.check(); - } - - { - try - { - p.begin_opByte((byte)0xff, (byte)0x0f); - test(false); - } - catch(java.lang.IllegalArgumentException ex) - { - } - } - } -} diff --git a/java/test/Ice/operations/Test.ice b/java/test/Ice/operations/Test.ice index 945339698ec..38ab55f5909 100644 --- a/java/test/Ice/operations/Test.ice +++ b/java/test/Ice/operations/Test.ice @@ -74,7 +74,7 @@ dictionary<string, MyEnum> StringMyEnumD; dictionary<MyEnum, string> MyEnumStringD; dictionary<MyStruct, MyEnum> MyStructMyEnumD; -["ami"] class MyClass +class MyClass { void shutdown(); @@ -172,7 +172,7 @@ dictionary<MyStruct, MyEnum> MyStructMyEnumD; ["nonmutating"] idempotent void opNonmutating(); }; -["ami"] class MyDerivedClass extends MyClass +class MyDerivedClass extends MyClass { void opDerived(); }; diff --git a/java/test/Ice/operations/TestAMD.ice b/java/test/Ice/operations/TestAMD.ice index b5b3173384c..edcb970b236 100644 --- a/java/test/Ice/operations/TestAMD.ice +++ b/java/test/Ice/operations/TestAMD.ice @@ -74,7 +74,7 @@ dictionary<string, MyEnum> StringMyEnumD; dictionary<MyEnum, string> MyEnumStringD; dictionary<MyStruct, MyEnum> MyStructMyEnumD; -["ami", "amd"] class MyClass +["amd"] class MyClass { void shutdown(); @@ -172,7 +172,7 @@ dictionary<MyStruct, MyEnum> MyStructMyEnumD; ["nonmutating"] idempotent void opNonmutating(); }; -["ami", "amd"] class MyDerivedClass extends MyClass +["amd"] class MyDerivedClass extends MyClass { void opDerived(); }; diff --git a/java/test/Ice/operations/TwowaysAMI.java b/java/test/Ice/operations/TwowaysAMI.java index c4d013011c1..70e1a6566a0 100644 --- a/java/test/Ice/operations/TwowaysAMI.java +++ b/java/test/Ice/operations/TwowaysAMI.java @@ -8,42 +8,44 @@ // ********************************************************************** package test.Ice.operations; -import test.Ice.operations.Test.AMI_MyClass_opBool; -import test.Ice.operations.Test.AMI_MyClass_opBoolS; -import test.Ice.operations.Test.AMI_MyClass_opBoolSS; -import test.Ice.operations.Test.AMI_MyClass_opByte; -import test.Ice.operations.Test.AMI_MyClass_opByteBoolD; -import test.Ice.operations.Test.AMI_MyClass_opByteS; -import test.Ice.operations.Test.AMI_MyClass_opByteSS; -import test.Ice.operations.Test.AMI_MyClass_opContext; -import test.Ice.operations.Test.AMI_MyClass_opDoubleMarshaling; -import test.Ice.operations.Test.AMI_MyClass_opFloatDouble; -import test.Ice.operations.Test.AMI_MyClass_opFloatDoubleS; -import test.Ice.operations.Test.AMI_MyClass_opFloatDoubleSS; -import test.Ice.operations.Test.AMI_MyClass_opIdempotent; -import test.Ice.operations.Test.AMI_MyClass_opIntS; -import test.Ice.operations.Test.AMI_MyClass_opLongFloatD; -import test.Ice.operations.Test.AMI_MyClass_opMyClass; -import test.Ice.operations.Test.AMI_MyClass_opMyEnum; -import test.Ice.operations.Test.AMI_MyClass_opNonmutating; -import test.Ice.operations.Test.AMI_MyClass_opShortIntD; -import test.Ice.operations.Test.AMI_MyClass_opShortIntLong; -import test.Ice.operations.Test.AMI_MyClass_opShortIntLongS; -import test.Ice.operations.Test.AMI_MyClass_opShortIntLongSS; -import test.Ice.operations.Test.AMI_MyClass_opString; -import test.Ice.operations.Test.AMI_MyClass_opStringMyEnumD; -import test.Ice.operations.Test.AMI_MyClass_opMyEnumStringD; -import test.Ice.operations.Test.AMI_MyClass_opStringS; -import test.Ice.operations.Test.AMI_MyClass_opStringSS; -import test.Ice.operations.Test.AMI_MyClass_opStringSSS; -import test.Ice.operations.Test.AMI_MyClass_opStringStringD; -import test.Ice.operations.Test.AMI_MyClass_opStruct; -import test.Ice.operations.Test.AMI_MyClass_opVoid; -import test.Ice.operations.Test.AMI_MyDerivedClass_opDerived; -import test.Ice.operations.Test.AMI_MyClass_opMyStructMyEnumD; + +import test.Ice.operations.Test.Callback_MyClass_opVoid; +import test.Ice.operations.Test.Callback_MyClass_opBool; +import test.Ice.operations.Test.Callback_MyClass_opBoolS; +import test.Ice.operations.Test.Callback_MyClass_opBoolSS; +import test.Ice.operations.Test.Callback_MyClass_opByte; +import test.Ice.operations.Test.Callback_MyClass_opByteBoolD; +import test.Ice.operations.Test.Callback_MyClass_opByteS; +import test.Ice.operations.Test.Callback_MyClass_opByteSS; +import test.Ice.operations.Test.Callback_MyClass_opFloatDouble; +import test.Ice.operations.Test.Callback_MyClass_opFloatDoubleS; +import test.Ice.operations.Test.Callback_MyClass_opFloatDoubleSS; +import test.Ice.operations.Test.Callback_MyClass_opIdempotent; +import test.Ice.operations.Test.Callback_MyClass_opIntS; +import test.Ice.operations.Test.Callback_MyClass_opLongFloatD; +import test.Ice.operations.Test.Callback_MyClass_opMyClass; +import test.Ice.operations.Test.Callback_MyClass_opMyEnum; +import test.Ice.operations.Test.Callback_MyClass_opNonmutating; +import test.Ice.operations.Test.Callback_MyClass_opShortIntD; +import test.Ice.operations.Test.Callback_MyClass_opShortIntLong; +import test.Ice.operations.Test.Callback_MyClass_opShortIntLongS; +import test.Ice.operations.Test.Callback_MyClass_opShortIntLongSS; +import test.Ice.operations.Test.Callback_MyClass_opString; +import test.Ice.operations.Test.Callback_MyClass_opStringMyEnumD; +import test.Ice.operations.Test.Callback_MyClass_opMyEnumStringD; +import test.Ice.operations.Test.Callback_MyClass_opStringS; +import test.Ice.operations.Test.Callback_MyClass_opStringSS; +import test.Ice.operations.Test.Callback_MyClass_opStringSSS; +import test.Ice.operations.Test.Callback_MyClass_opStringStringD; +import test.Ice.operations.Test.Callback_MyClass_opStruct; +import test.Ice.operations.Test.Callback_MyClass_opMyStructMyEnumD; +import test.Ice.operations.Test.Callback_MyClass_opDoubleMarshaling; +import test.Ice.operations.Test.Callback_MyDerivedClass_opDerived; import test.Ice.operations.Test.AnotherStruct; +import test.Ice.operations.Test.MyClass; import test.Ice.operations.Test.MyClassPrx; import test.Ice.operations.Test.MyClassPrxHelper; +import test.Ice.operations.Test.MyDerivedClass; import test.Ice.operations.Test.MyDerivedClassPrx; import test.Ice.operations.Test.MyDerivedClassPrxHelper; import test.Ice.operations.Test.MyEnum; @@ -68,8 +70,7 @@ class TwowaysAMI _called = false; } - public synchronized void - check() + public synchronized void check() { while(!_called) { @@ -85,8 +86,7 @@ class TwowaysAMI _called = false; } - public synchronized void - called() + public synchronized void called() { assert(!_called); _called = true; @@ -96,24 +96,21 @@ class TwowaysAMI private boolean _called; } - private static class AMI_MyClass_opVoidI extends AMI_MyClass_opVoid + private static class pingI extends Ice.Callback_Object_ice_ping { @Override - public void - ice_response() + public void response() { callback.called(); } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -121,25 +118,45 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opVoidExI extends AMI_MyClass_opVoid + private static class isAI extends Ice.Callback_Object_ice_isA { @Override - public void - ice_response() + public void response(boolean r) + { + test(r); + callback.called(); + } + + @Override + public void exception(Ice.LocalException ex) { test(false); } + public void check() + { + callback.check(); + } + + private Callback callback = new Callback(); + } + + private static class idI extends Ice.Callback_Object_ice_id + { @Override - public void - ice_exception(Ice.LocalException ex) + public void response(String id) { - test(ex instanceof Ice.NoEndpointException); + test(id.equals(MyDerivedClass.ice_staticId())); callback.called(); } - public void - check() + @Override + public void exception(Ice.LocalException ex) + { + test(false); + } + + public void check() { callback.check(); } @@ -147,26 +164,22 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opByteI extends AMI_MyClass_opByte + private static class idsI extends Ice.Callback_Object_ice_ids { @Override - public void - ice_response(byte r, byte b) + public void response(String[] ids) { - test(b == (byte)0xf0); - test(r == (byte)0xff); + test(ids.length == 3); callback.called(); } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -174,25 +187,45 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opByteExI extends AMI_MyClass_opByte + private static class opVoidI extends Callback_MyClass_opVoid { @Override - public void - ice_response(byte r, byte b) + public void response() + { + callback.called(); + } + + @Override + public void exception(Ice.LocalException ex) { test(false); } + public void check() + { + callback.check(); + } + + private Callback callback = new Callback(); + } + + private static class opByteI extends Callback_MyClass_opByte + { @Override - public void - ice_exception(Ice.LocalException ex) + public void response(byte r, byte b) { - test(ex instanceof Ice.NoEndpointException); + test(b == (byte)0xf0); + test(r == (byte)0xff); callback.called(); } - public void - check() + @Override + public void exception(Ice.LocalException ex) + { + test(false); + } + + public void check() { callback.check(); } @@ -200,11 +233,10 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opBoolI extends AMI_MyClass_opBool + private static class opBoolI extends Callback_MyClass_opBool { @Override - public void - ice_response(boolean r, boolean b) + public void response(boolean r, boolean b) { test(b); test(!r); @@ -212,14 +244,12 @@ class TwowaysAMI } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -227,11 +257,10 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opShortIntLongI extends AMI_MyClass_opShortIntLong + private static class opShortIntLongI extends Callback_MyClass_opShortIntLong { @Override - public void - ice_response(long r, short s, int i, long l) + public void response(long r, short s, int i, long l) { test(s == 10); test(i == 11); @@ -241,14 +270,12 @@ class TwowaysAMI } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -256,11 +283,10 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opFloatDoubleI extends AMI_MyClass_opFloatDouble + private static class opFloatDoubleI extends Callback_MyClass_opFloatDouble { @Override - public void - ice_response(double r, float f, double d) + public void response(double r, float f, double d) { test(f == 3.14f); test(d == 1.1E10); @@ -269,14 +295,12 @@ class TwowaysAMI } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -284,11 +308,10 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opStringI extends AMI_MyClass_opString + private static class opStringI extends Callback_MyClass_opString { @Override - public void - ice_response(String r, String s) + public void response(String r, String s) { test(s.equals("world hello")); test(r.equals("hello world")); @@ -296,14 +319,12 @@ class TwowaysAMI } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -311,11 +332,10 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opMyEnumI extends AMI_MyClass_opMyEnum + private static class opMyEnumI extends Callback_MyClass_opMyEnum { @Override - public void - ice_response(MyEnum r, MyEnum e) + public void response(MyEnum r, MyEnum e) { test(e == MyEnum.enum2); test(r == MyEnum.enum3); @@ -323,14 +343,12 @@ class TwowaysAMI } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -338,16 +356,15 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opMyClassI extends AMI_MyClass_opMyClass + private static class opMyClassI extends Callback_MyClass_opMyClass { - AMI_MyClass_opMyClassI(Ice.Communicator communicator) + opMyClassI(Ice.Communicator communicator) { _communicator = communicator; } @Override - public void - ice_response(MyClassPrx r, MyClassPrx c1, MyClassPrx c2) + public void response(MyClassPrx r, MyClassPrx c1, MyClassPrx c2) { test(c1.ice_getIdentity().equals(_communicator.stringToIdentity("test"))); test(c2.ice_getIdentity().equals(_communicator.stringToIdentity("noSuchIdentity"))); @@ -370,14 +387,12 @@ class TwowaysAMI } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -386,16 +401,15 @@ class TwowaysAMI private Ice.Communicator _communicator; } - private static class AMI_MyClass_opStructI extends AMI_MyClass_opStruct + private static class opStructI extends Callback_MyClass_opStruct { - AMI_MyClass_opStructI(Ice.Communicator communicator) + opStructI(Ice.Communicator communicator) { _communicator = communicator; } @Override - public void - ice_response(Structure rso, Structure so) + public void response(Structure rso, Structure so) { test(rso.p == null); test(rso.e == MyEnum.enum2); @@ -411,14 +425,12 @@ class TwowaysAMI } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -427,11 +439,10 @@ class TwowaysAMI private Ice.Communicator _communicator; } - private static class AMI_MyClass_opByteSI extends AMI_MyClass_opByteS + private static class opByteSI extends Callback_MyClass_opByteS { @Override - public void - ice_response(byte[] rso, byte[] bso) + public void response(byte[] rso, byte[] bso) { test(bso.length == 4); test(bso[0] == (byte)0x22); @@ -451,14 +462,12 @@ class TwowaysAMI } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -466,11 +475,10 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opBoolSI extends AMI_MyClass_opBoolS + private static class opBoolSI extends Callback_MyClass_opBoolS { @Override - public void - ice_response(boolean[] rso, boolean[] bso) + public void response(boolean[] rso, boolean[] bso) { test(bso.length == 4); test(bso[0]); @@ -485,14 +493,12 @@ class TwowaysAMI } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -500,12 +506,10 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opShortIntLongSI extends AMI_MyClass_opShortIntLongS + private static class opShortIntLongSI extends Callback_MyClass_opShortIntLongS { @Override - public void - ice_response(long[] rso, short[] sso, int[] iso, - long[] lso) + public void response(long[] rso, short[] sso, int[] iso, long[] lso) { test(sso.length == 3); test(sso[0] == 1); @@ -531,14 +535,12 @@ class TwowaysAMI } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -546,11 +548,10 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opFloatDoubleSI extends AMI_MyClass_opFloatDoubleS + private static class opFloatDoubleSI extends Callback_MyClass_opFloatDoubleS { @Override - public void - ice_response(double[] rso, float[] fso, double[] dso) + public void response(double[] rso, float[] fso, double[] dso) { test(fso.length == 2); test(fso[0] == 3.14f); @@ -569,14 +570,12 @@ class TwowaysAMI } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -584,11 +583,10 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opStringSI extends AMI_MyClass_opStringS + private static class opStringSI extends Callback_MyClass_opStringS { @Override - public void - ice_response(String[] rso, String[] sso) + public void response(String[] rso, String[] sso) { test(sso.length == 4); test(sso[0].equals("abc")); @@ -603,14 +601,12 @@ class TwowaysAMI } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -618,11 +614,10 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opByteSSI extends AMI_MyClass_opByteSS + private static class opByteSSI extends Callback_MyClass_opByteSS { @Override - public void - ice_response(byte[][] rso, byte[][] bso) + public void response(byte[][] rso, byte[][] bso) { test(bso.length == 2); test(bso[0].length == 1); @@ -647,14 +642,12 @@ class TwowaysAMI } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -662,11 +655,11 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opBoolSSI extends AMI_MyClass_opBoolSS + private static class opBoolSSI extends Callback_MyClass_opBoolSS { @Override public void - ice_response(boolean[][] rso, boolean[][] bso) + response(boolean[][] rso, boolean[][] bso) { test(bso.length == 4); test(bso[0].length == 1); @@ -693,7 +686,7 @@ class TwowaysAMI @Override public void - ice_exception(Ice.LocalException ex) + exception(Ice.LocalException ex) { test(false); } @@ -707,11 +700,11 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opShortIntLongSSI extends AMI_MyClass_opShortIntLongSS + private static class opShortIntLongSSI extends Callback_MyClass_opShortIntLongSS { @Override public void - ice_response(long[][] rso, short[][] sso, int[][] iso, long[][] lso) + response(long[][] rso, short[][] sso, int[][] iso, long[][] lso) { test(rso.length == 1); test(rso[0].length == 2); @@ -743,7 +736,7 @@ class TwowaysAMI @Override public void - ice_exception(Ice.LocalException ex) + exception(Ice.LocalException ex) { test(false); } @@ -757,11 +750,10 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opFloatDoubleSSI extends AMI_MyClass_opFloatDoubleSS + private static class opFloatDoubleSSI extends Callback_MyClass_opFloatDoubleSS { @Override - public void - ice_response(double[][] rso, float[][] fso, double[][] dso) + public void response(double[][] rso, float[][] fso, double[][] dso) { test(fso.length == 3); test(fso[0].length == 1); @@ -787,14 +779,12 @@ class TwowaysAMI } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -802,11 +792,10 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opStringSSI extends AMI_MyClass_opStringSS + private static class opStringSSI extends Callback_MyClass_opStringSS { @Override - public void - ice_response(String[][] rso, String[][] sso) + public void response(String[][] rso, String[][] sso) { test(sso.length == 5); test(sso[0].length == 1); @@ -827,14 +816,12 @@ class TwowaysAMI } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -842,11 +829,10 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opStringSSSI extends AMI_MyClass_opStringSSS + private static class opStringSSSI extends Callback_MyClass_opStringSSS { @Override - public void - ice_response(String[][][] rsso, String[][][] ssso) + public void response(String[][][] rsso, String[][][] ssso) { test(ssso.length == 5); test(ssso[0].length == 2); @@ -884,14 +870,12 @@ class TwowaysAMI } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -899,11 +883,10 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opByteBoolDI extends AMI_MyClass_opByteBoolD + private static class opByteBoolDI extends Callback_MyClass_opByteBoolD { @Override - public void - ice_response(java.util.Map<Byte, Boolean> ro, java.util.Map<Byte, Boolean> _do) + public void response(java.util.Map<Byte, Boolean> ro, java.util.Map<Byte, Boolean> _do) { java.util.Map<Byte, Boolean> di1 = new java.util.HashMap<Byte, Boolean>(); di1.put((byte)10, Boolean.TRUE); @@ -918,14 +901,12 @@ class TwowaysAMI } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -933,11 +914,10 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opShortIntDI extends AMI_MyClass_opShortIntD + private static class opShortIntDI extends Callback_MyClass_opShortIntD { @Override - public void - ice_response(java.util.Map<Short, Integer> ro, java.util.Map<Short, Integer> _do) + public void response(java.util.Map<Short, Integer> ro, java.util.Map<Short, Integer> _do) { java.util.Map<Short, Integer> di1 = new java.util.HashMap<Short, Integer>(); di1.put((short)110, -1); @@ -952,14 +932,12 @@ class TwowaysAMI } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -967,11 +945,10 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opLongFloatDI extends AMI_MyClass_opLongFloatD + private static class opLongFloatDI extends Callback_MyClass_opLongFloatD { @Override - public void - ice_response(java.util.Map<Long, Float> ro, java.util.Map<Long, Float> _do) + public void response(java.util.Map<Long, Float> ro, java.util.Map<Long, Float> _do) { java.util.Map<Long, Float> di1 = new java.util.HashMap<Long, Float>(); di1.put(999999110L, new Float(-1.1f)); @@ -986,14 +963,12 @@ class TwowaysAMI } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -1001,11 +976,10 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opStringStringDI extends AMI_MyClass_opStringStringD + private static class opStringStringDI extends Callback_MyClass_opStringStringD { @Override - public void - ice_response(java.util.Map<String, String> ro, java.util.Map<String, String> _do) + public void response(java.util.Map<String, String> ro, java.util.Map<String, String> _do) { java.util.Map<String, String> di1 = new java.util.HashMap<String, String>(); di1.put("foo", "abc -1.1"); @@ -1020,14 +994,12 @@ class TwowaysAMI } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -1035,11 +1007,10 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opStringMyEnumDI extends AMI_MyClass_opStringMyEnumD + private static class opStringMyEnumDI extends Callback_MyClass_opStringMyEnumD { @Override - public void - ice_response(java.util.Map<String, MyEnum> ro, java.util.Map<String, MyEnum> _do) + public void response(java.util.Map<String, MyEnum> ro, java.util.Map<String, MyEnum> _do) { java.util.Map<String, MyEnum> di1 = new java.util.HashMap<String, MyEnum>(); di1.put("abc", MyEnum.enum1); @@ -1054,14 +1025,12 @@ class TwowaysAMI } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -1069,11 +1038,10 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opMyEnumStringDI extends AMI_MyClass_opMyEnumStringD + private static class opMyEnumStringDI extends Callback_MyClass_opMyEnumStringD { @Override - public void - ice_response(java.util.Map<MyEnum, String> ro, java.util.Map<MyEnum, String> _do) + public void response(java.util.Map<MyEnum, String> ro, java.util.Map<MyEnum, String> _do) { java.util.Map<MyEnum, String> di1 = new java.util.HashMap<MyEnum, String>(); di1.put(MyEnum.enum1, "abc"); @@ -1086,14 +1054,12 @@ class TwowaysAMI } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -1101,11 +1067,10 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opMyStructMyEnumDI extends AMI_MyClass_opMyStructMyEnumD + private static class opMyStructMyEnumDI extends Callback_MyClass_opMyStructMyEnumD { @Override - public void - ice_response(java.util.Map<MyStruct, MyEnum> ro, java.util.Map<MyStruct, MyEnum> _do) + public void response(java.util.Map<MyStruct, MyEnum> ro, java.util.Map<MyStruct, MyEnum> _do) { MyStruct s11 = new MyStruct(1, 1); MyStruct s12 = new MyStruct(1, 2); @@ -1124,14 +1089,12 @@ class TwowaysAMI } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -1139,16 +1102,15 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opIntSI extends AMI_MyClass_opIntS + private static class opIntSI extends Callback_MyClass_opIntS { - AMI_MyClass_opIntSI(int l) + opIntSI(int l) { _l = l; } @Override - public void - ice_response(int[] r) + public void response(int[] r) { test(r.length == _l); for(int j = 0; j < r.length; ++j) @@ -1159,14 +1121,12 @@ class TwowaysAMI } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -1175,88 +1135,65 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opContextEqualI extends AMI_MyClass_opContext + private static class opDerivedI extends Callback_MyDerivedClass_opDerived { - AMI_MyClass_opContextEqualI(java.util.Map<String, String> d) - { - _d = d; - } - @Override - public void - ice_response(java.util.Map<String, String> r) + public void response() { - test(r.equals(_d)); callback.called(); } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } - private java.util.Map<String, String> _d; private Callback callback = new Callback(); } - private static class AMI_MyClass_opContextNotEqualI extends AMI_MyClass_opContext + private static class opDoubleMarshalingI extends Callback_MyClass_opDoubleMarshaling { - AMI_MyClass_opContextNotEqualI(java.util.Map<String, String> d) - { - _d = d; - } - @Override - public void - ice_response(java.util.Map<String, String> r) + public void response() { - test(!r.equals(_d)); callback.called(); } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } - private java.util.Map<String, String> _d; private Callback callback = new Callback(); } - private static class AMI_MyDerivedClass_opDerivedI extends AMI_MyDerivedClass_opDerived + private static class opIdempotentI extends Callback_MyClass_opIdempotent { @Override - public void - ice_response() + public void response() { callback.called(); } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -1264,24 +1201,21 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opDoubleMarshalingI extends AMI_MyClass_opDoubleMarshaling + private static class opNonmutatingI extends Callback_MyClass_opNonmutating { @Override - public void - ice_response() + public void response() { callback.called(); } @Override - public void - ice_exception(Ice.LocalException ex) + public void exception(Ice.LocalException ex) { test(false); } - public void - check() + public void check() { callback.check(); } @@ -1289,168 +1223,93 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opIdempotentI extends AMI_MyClass_opIdempotent + static void + twowaysAMI(test.Util.Application app, MyClassPrx p) { - @Override - public void - ice_response() - { - callback.called(); - } - - @Override - public void - ice_exception(Ice.LocalException ex) - { - test(false); - } - - public void - check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } + Ice.Communicator communicator = app.communicator(); - private static class AMI_MyClass_opNonmutatingI extends AMI_MyClass_opNonmutating - { - @Override - public void - ice_response() { - callback.called(); + pingI cb = new pingI(); + p.begin_ice_ping(cb); + cb.check(); } - @Override - public void - ice_exception(Ice.LocalException ex) { - test(false); + isAI cb = new isAI(); + p.begin_ice_isA(MyClass.ice_staticId(), cb); + cb.check(); } - public void - check() { - callback.check(); + idI cb = new idI(); + p.begin_ice_id(cb); + cb.check(); } - private Callback callback = new Callback(); - } - - static void - twowaysAMI(test.Util.Application app, MyClassPrx p) - { - Ice.Communicator communicator = app.communicator(); - { - // Check that a call to a void operation raises NoEndpointException - // in the ice_exception() callback instead of at the point of call. - MyClassPrx indirect = MyClassPrxHelper.uncheckedCast(p.ice_adapterId("dummy")); - AMI_MyClass_opVoidExI cb = new AMI_MyClass_opVoidExI(); - try - { - test(!indirect.opVoid_async(cb)); - } - catch(java.lang.Exception ex) - { - ex.printStackTrace(); - test(false); - } + idsI cb = new idsI(); + p.begin_ice_ids(cb); cb.check(); } { - // Check that a call to a twoway operation raises NoEndpointException - // in the ice_exception() callback instead of at the point of call. - MyClassPrx indirect = MyClassPrxHelper.uncheckedCast(p.ice_adapterId("dummy")); - AMI_MyClass_opByteExI cb = new AMI_MyClass_opByteExI(); - try - { - test(!(indirect.opByte_async(cb, (byte)0, (byte)0))); - } - catch(java.lang.Exception ex) - { - test(false); - } - cb.check(); + Ice.AsyncResult r = p.begin_opVoid(); + p.end_opVoid(r); } { - AMI_MyClass_opVoidI cb = new AMI_MyClass_opVoidI(); - p.opVoid_async(cb); - cb.check(); - // Let's check if we can reuse the same callback object for another call. - p.opVoid_async(cb); + opVoidI cb = new opVoidI(); + p.begin_opVoid(cb); cb.check(); } { - // Check that CommunicatorDestroyedException is raised directly. - Ice.InitializationData initData = new Ice.InitializationData(); - initData.properties = communicator.getProperties()._clone(); - Ice.Communicator ic = app.initialize(initData); - Ice.ObjectPrx obj = ic.stringToProxy(p.toString()); - MyClassPrx p2 = MyClassPrxHelper.checkedCast(obj); - - ic.destroy(); - - AMI_MyClass_opVoidI cb = new AMI_MyClass_opVoidI(); - try - { - test(!p2.opVoid_async(cb)); - test(false); - } - catch(Ice.CommunicatorDestroyedException ex) - { - // Expected. - } + Ice.AsyncResult r = p.begin_opByte((byte)0xff, (byte)0x0f); + Ice.ByteHolder p3 = new Ice.ByteHolder(); + byte ret = p.end_opByte(p3, r); + test(p3.value == (byte)0xf0); + test(ret == (byte)0xff); } - { - AMI_MyClass_opByteI cb = new AMI_MyClass_opByteI(); - p.opByte_async(cb, (byte)0xff, (byte)0x0f); + opByteI cb = new opByteI(); + p.begin_opByte((byte)0xff, (byte)0x0f, cb); cb.check(); } { - AMI_MyClass_opBoolI cb = new AMI_MyClass_opBoolI(); - p.opBool_async(cb, true, false); + opBoolI cb = new opBoolI(); + p.begin_opBool(true, false, cb); cb.check(); } { - AMI_MyClass_opShortIntLongI cb = new AMI_MyClass_opShortIntLongI(); - p.opShortIntLong_async(cb, (short)10, 11, 12L); + opShortIntLongI cb = new opShortIntLongI(); + p.begin_opShortIntLong((short)10, 11, 12L, cb); cb.check(); } { - AMI_MyClass_opFloatDoubleI cb = new AMI_MyClass_opFloatDoubleI(); - p.opFloatDouble_async(cb, 3.14f, 1.1E10); - cb.check(); - // Let's check if we can reuse the same callback object for another call. - p.opFloatDouble_async(cb, 3.14f, 1.1E10); + opFloatDoubleI cb = new opFloatDoubleI(); + p.begin_opFloatDouble(3.14f, 1.1E10, cb); cb.check(); } { - AMI_MyClass_opStringI cb = new AMI_MyClass_opStringI(); - p.opString_async(cb, "hello", "world"); + opStringI cb = new opStringI(); + p.begin_opString("hello", "world", cb); cb.check(); } { - AMI_MyClass_opMyEnumI cb = new AMI_MyClass_opMyEnumI(); - p.opMyEnum_async(cb, MyEnum.enum2); + opMyEnumI cb = new opMyEnumI(); + p.begin_opMyEnum(MyEnum.enum2, cb); cb.check(); } { - AMI_MyClass_opMyClassI cb = new AMI_MyClass_opMyClassI(communicator); - p.opMyClass_async(cb, p); + opMyClassI cb = new opMyClassI(communicator); + p.begin_opMyClass(p, cb); cb.check(); } @@ -1466,8 +1325,8 @@ class TwowaysAMI si2.s = new AnotherStruct(); si2.s.s = "def"; - AMI_MyClass_opStructI cb = new AMI_MyClass_opStructI(communicator); - p.opStruct_async(cb, si1, si2); + opStructI cb = new opStructI(communicator); + p.begin_opStruct(si1, si2, cb); cb.check(); } @@ -1487,8 +1346,8 @@ class TwowaysAMI (byte)0xf4 }; - AMI_MyClass_opByteSI cb = new AMI_MyClass_opByteSI(); - p.opByteS_async(cb, bsi1, bsi2); + opByteSI cb = new opByteSI(); + p.begin_opByteS(bsi1, bsi2, cb); cb.check(); } @@ -1496,8 +1355,8 @@ class TwowaysAMI final boolean[] bsi1 = { true, true, false }; final boolean[] bsi2 = { false }; - AMI_MyClass_opBoolSI cb = new AMI_MyClass_opBoolSI(); - p.opBoolS_async(cb, bsi1, bsi2); + opBoolSI cb = new opBoolSI(); + p.begin_opBoolS(bsi1, bsi2, cb); cb.check(); } @@ -1506,8 +1365,8 @@ class TwowaysAMI final int[] isi = { 5, 6, 7, 8 }; final long[] lsi = { 10, 30, 20 }; - AMI_MyClass_opShortIntLongSI cb = new AMI_MyClass_opShortIntLongSI(); - p.opShortIntLongS_async(cb, ssi, isi, lsi); + opShortIntLongSI cb = new opShortIntLongSI(); + p.begin_opShortIntLongS(ssi, isi, lsi, cb); cb.check(); } @@ -1515,8 +1374,8 @@ class TwowaysAMI final float[] fsi = { 3.14f, 1.11f }; final double[] dsi = { 1.1E10, 1.2E10, 1.3E10 }; - AMI_MyClass_opFloatDoubleSI cb = new AMI_MyClass_opFloatDoubleSI(); - p.opFloatDoubleS_async(cb, fsi, dsi); + opFloatDoubleSI cb = new opFloatDoubleSI(); + p.begin_opFloatDoubleS(fsi, dsi, cb); cb.check(); } @@ -1524,8 +1383,8 @@ class TwowaysAMI final String[] ssi1 = { "abc", "de", "fghi" }; final String[] ssi2 = { "xyz" }; - AMI_MyClass_opStringSI cb = new AMI_MyClass_opStringSI(); - p.opStringS_async(cb, ssi1, ssi2); + opStringSI cb = new opStringSI(); + p.begin_opStringS(ssi1, ssi2, cb); cb.check(); } @@ -1541,8 +1400,8 @@ class TwowaysAMI { (byte)0xf2, (byte)0xf1 } }; - AMI_MyClass_opByteSSI cb = new AMI_MyClass_opByteSSI(); - p.opByteSS_async(cb, bsi1, bsi2); + opByteSSI cb = new opByteSSI(); + p.begin_opByteSS(bsi1, bsi2, cb); cb.check(); } @@ -1559,8 +1418,8 @@ class TwowaysAMI { false, false, true } }; - AMI_MyClass_opBoolSSI cb = new AMI_MyClass_opBoolSSI(); - p.opBoolSS_async(cb, bsi1, bsi2); + opBoolSSI cb = new opBoolSSI(); + p.begin_opBoolSS(bsi1, bsi2, cb); cb.check(); } @@ -1581,8 +1440,8 @@ class TwowaysAMI {496, 1729}, }; - AMI_MyClass_opShortIntLongSSI cb = new AMI_MyClass_opShortIntLongSSI(); - p.opShortIntLongSS_async(cb, ssi, isi, lsi); + opShortIntLongSSI cb = new opShortIntLongSSI(); + p.begin_opShortIntLongSS(ssi, isi, lsi, cb); cb.check(); } @@ -1598,8 +1457,8 @@ class TwowaysAMI { 1.1E10, 1.2E10, 1.3E10 } }; - AMI_MyClass_opFloatDoubleSSI cb = new AMI_MyClass_opFloatDoubleSSI(); - p.opFloatDoubleSS_async(cb, fsi, dsi); + opFloatDoubleSSI cb = new opFloatDoubleSSI(); + p.begin_opFloatDoubleSS(fsi, dsi, cb); cb.check(); } @@ -1616,8 +1475,8 @@ class TwowaysAMI { "xyz" } }; - AMI_MyClass_opStringSSI cb = new AMI_MyClass_opStringSSI(); - p.opStringSS_async(cb, ssi1, ssi2); + opStringSSI cb = new opStringSSI(); + p.begin_opStringSS(ssi1, ssi2, cb); cb.check(); } @@ -1658,8 +1517,8 @@ class TwowaysAMI } }; - AMI_MyClass_opStringSSSI cb = new AMI_MyClass_opStringSSSI(); - p.opStringSSS_async(cb, sssi1, sssi2); + opStringSSSI cb = new opStringSSSI(); + p.begin_opStringSSS(sssi1, sssi2, cb); cb.check(); } @@ -1672,8 +1531,8 @@ class TwowaysAMI di2.put((byte)11, Boolean.FALSE); di2.put((byte)101, Boolean.TRUE); - AMI_MyClass_opByteBoolDI cb = new AMI_MyClass_opByteBoolDI(); - p.opByteBoolD_async(cb, di1, di2); + opByteBoolDI cb = new opByteBoolDI(); + p.begin_opByteBoolD(di1, di2, cb); cb.check(); } @@ -1686,8 +1545,8 @@ class TwowaysAMI di2.put((short)111, -100); di2.put((short)1101, 0); - AMI_MyClass_opShortIntDI cb = new AMI_MyClass_opShortIntDI(); - p.opShortIntD_async(cb, di1, di2); + opShortIntDI cb = new opShortIntDI(); + p.begin_opShortIntD(di1, di2, cb); cb.check(); } @@ -1700,8 +1559,8 @@ class TwowaysAMI di2.put(999999120L, new Float(-100.4f)); di2.put(999999130L, new Float(0.5f)); - AMI_MyClass_opLongFloatDI cb = new AMI_MyClass_opLongFloatDI(); - p.opLongFloatD_async(cb, di1, di2); + opLongFloatDI cb = new opLongFloatDI(); + p.begin_opLongFloatD(di1, di2, cb); cb.check(); } @@ -1714,8 +1573,8 @@ class TwowaysAMI di2.put("FOO", "abc -100.4"); di2.put("BAR", "abc 0.5"); - AMI_MyClass_opStringStringDI cb = new AMI_MyClass_opStringStringDI(); - p.opStringStringD_async(cb, di1, di2); + opStringStringDI cb = new opStringStringDI(); + p.begin_opStringStringD(di1, di2, cb); cb.check(); } @@ -1728,8 +1587,8 @@ class TwowaysAMI di2.put("qwerty", MyEnum.enum3); di2.put("Hello!!", MyEnum.enum2); - AMI_MyClass_opStringMyEnumDI cb = new AMI_MyClass_opStringMyEnumDI(); - p.opStringMyEnumD_async(cb, di1, di2); + opStringMyEnumDI cb = new opStringMyEnumDI(); + p.begin_opStringMyEnumD(di1, di2, cb); cb.check(); } @@ -1740,8 +1599,8 @@ class TwowaysAMI di2.put(MyEnum.enum2, "Hello!!"); di2.put(MyEnum.enum3, "qwerty"); - AMI_MyClass_opMyEnumStringDI cb = new AMI_MyClass_opMyEnumStringDI(); - p.opMyEnumStringD_async(cb, di1, di2); + opMyEnumStringDI cb = new opMyEnumStringDI(); + p.begin_opMyEnumStringD(di1, di2, cb); cb.check(); } @@ -1758,8 +1617,8 @@ class TwowaysAMI di2.put(s22, MyEnum.enum3); di2.put(s23, MyEnum.enum2); - AMI_MyClass_opMyStructMyEnumDI cb = new AMI_MyClass_opMyStructMyEnumDI(); - p.opMyStructMyEnumD_async(cb, di1, di2); + opMyStructMyEnumDI cb = new opMyStructMyEnumDI(); + p.begin_opMyStructMyEnumD(di1, di2, cb); cb.check(); } @@ -1773,8 +1632,8 @@ class TwowaysAMI { s[i] = i; } - AMI_MyClass_opIntSI cb = new AMI_MyClass_opIntSI(l); - p.opIntS_async(cb, s); + opIntSI cb = new opIntSI(l); + p.begin_opIntS(s, cb); cb.check(); } } @@ -1786,27 +1645,27 @@ class TwowaysAMI ctx.put("three", "THREE"); { test(p.ice_getContext().isEmpty()); - AMI_MyClass_opContextNotEqualI cb = new AMI_MyClass_opContextNotEqualI(ctx); - p.opContext_async(cb); - cb.check(); + Ice.AsyncResult r = p.begin_opContext(); + java.util.Map<String, String> c = p.end_opContext(r); + test(!c.equals(ctx)); } { test(p.ice_getContext().isEmpty()); - AMI_MyClass_opContextEqualI cb = new AMI_MyClass_opContextEqualI(ctx); - p.opContext_async(cb, ctx); - cb.check(); + Ice.AsyncResult r = p.begin_opContext(ctx); + java.util.Map<String, String> c = p.end_opContext(r); + test(c.equals(ctx)); } MyClassPrx p2 = MyClassPrxHelper.checkedCast(p.ice_context(ctx)); test(p2.ice_getContext().equals(ctx)); { - AMI_MyClass_opContextEqualI cb = new AMI_MyClass_opContextEqualI(ctx); - p2.opContext_async(cb); - cb.check(); + Ice.AsyncResult r = p2.begin_opContext(); + java.util.Map<String, String> c = p2.end_opContext(r); + test(c.equals(ctx)); } { - AMI_MyClass_opContextEqualI cb = new AMI_MyClass_opContextEqualI(ctx); - p2.opContext_async(cb, ctx); - cb.check(); + Ice.AsyncResult r = p2.begin_opContext(ctx); + java.util.Map<String, String> c = p2.end_opContext(r); + test(c.equals(ctx)); } } @@ -1834,18 +1693,18 @@ class TwowaysAMI ic.getImplicitContext().setContext(ctx); test(ic.getImplicitContext().getContext().equals(ctx)); { - AMI_MyClass_opContextEqualI cb = new AMI_MyClass_opContextEqualI(ctx); - p3.opContext_async(cb); - cb.check(); + Ice.AsyncResult r = p3.begin_opContext(); + java.util.Map<String, String> c = p3.end_opContext(r); + test(c.equals(ctx)); } ic.getImplicitContext().put("zero", "ZERO"); ctx = ic.getImplicitContext().getContext(); { - AMI_MyClass_opContextEqualI cb = new AMI_MyClass_opContextEqualI(ctx); - p3.opContext_async(cb); - cb.check(); + Ice.AsyncResult r = p3.begin_opContext(); + java.util.Map<String, String> c = p3.end_opContext(r); + test(c.equals(ctx)); } java.util.Map<String, String> prxContext = new java.util.HashMap<String, String>(); @@ -1860,16 +1719,16 @@ class TwowaysAMI ic.getImplicitContext().setContext(null); { - AMI_MyClass_opContextEqualI cb = new AMI_MyClass_opContextEqualI(prxContext); - p3.opContext_async(cb); - cb.check(); + Ice.AsyncResult r = p3.begin_opContext(); + java.util.Map<String, String> c = p3.end_opContext(r); + test(c.equals(prxContext)); } ic.getImplicitContext().setContext(ctx); { - AMI_MyClass_opContextEqualI cb = new AMI_MyClass_opContextEqualI(combined); - p3.opContext_async(cb); - cb.check(); + Ice.AsyncResult r = p3.begin_opContext(); + java.util.Map<String, String> c = p3.end_opContext(r); + test(c.equals(combined)); } ic.destroy(); @@ -1883,28 +1742,28 @@ class TwowaysAMI { ds[i] = d; } - AMI_MyClass_opDoubleMarshalingI cb = new AMI_MyClass_opDoubleMarshalingI(); - p.opDoubleMarshaling_async(cb, d, ds); + opDoubleMarshalingI cb = new opDoubleMarshalingI(); + p.begin_opDoubleMarshaling(d, ds, cb); cb.check(); } { - AMI_MyClass_opIdempotentI cb = new AMI_MyClass_opIdempotentI(); - p.opIdempotent_async(cb); + opIdempotentI cb = new opIdempotentI(); + p.begin_opIdempotent(cb); cb.check(); } { - AMI_MyClass_opNonmutatingI cb = new AMI_MyClass_opNonmutatingI(); - p.opNonmutating_async(cb); + opNonmutatingI cb = new opNonmutatingI(); + p.begin_opNonmutating(cb); cb.check(); } { MyDerivedClassPrx derived = MyDerivedClassPrxHelper.checkedCast(p); test(derived != null); - AMI_MyDerivedClass_opDerivedI cb = new AMI_MyDerivedClass_opDerivedI(); - derived.opDerived_async(cb); + opDerivedI cb = new opDerivedI(); + derived.begin_opDerived(cb); cb.check(); } } diff --git a/java/test/Ice/operations/TwowaysNewAMI.java b/java/test/Ice/operations/TwowaysNewAMI.java deleted file mode 100644 index 4c806600c70..00000000000 --- a/java/test/Ice/operations/TwowaysNewAMI.java +++ /dev/null @@ -1,1770 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -package test.Ice.operations; - -import test.Ice.operations.Test.Callback_MyClass_opVoid; -import test.Ice.operations.Test.Callback_MyClass_opBool; -import test.Ice.operations.Test.Callback_MyClass_opBoolS; -import test.Ice.operations.Test.Callback_MyClass_opBoolSS; -import test.Ice.operations.Test.Callback_MyClass_opByte; -import test.Ice.operations.Test.Callback_MyClass_opByteBoolD; -import test.Ice.operations.Test.Callback_MyClass_opByteS; -import test.Ice.operations.Test.Callback_MyClass_opByteSS; -import test.Ice.operations.Test.Callback_MyClass_opFloatDouble; -import test.Ice.operations.Test.Callback_MyClass_opFloatDoubleS; -import test.Ice.operations.Test.Callback_MyClass_opFloatDoubleSS; -import test.Ice.operations.Test.Callback_MyClass_opIdempotent; -import test.Ice.operations.Test.Callback_MyClass_opIntS; -import test.Ice.operations.Test.Callback_MyClass_opLongFloatD; -import test.Ice.operations.Test.Callback_MyClass_opMyClass; -import test.Ice.operations.Test.Callback_MyClass_opMyEnum; -import test.Ice.operations.Test.Callback_MyClass_opNonmutating; -import test.Ice.operations.Test.Callback_MyClass_opShortIntD; -import test.Ice.operations.Test.Callback_MyClass_opShortIntLong; -import test.Ice.operations.Test.Callback_MyClass_opShortIntLongS; -import test.Ice.operations.Test.Callback_MyClass_opShortIntLongSS; -import test.Ice.operations.Test.Callback_MyClass_opString; -import test.Ice.operations.Test.Callback_MyClass_opStringMyEnumD; -import test.Ice.operations.Test.Callback_MyClass_opMyEnumStringD; -import test.Ice.operations.Test.Callback_MyClass_opStringS; -import test.Ice.operations.Test.Callback_MyClass_opStringSS; -import test.Ice.operations.Test.Callback_MyClass_opStringSSS; -import test.Ice.operations.Test.Callback_MyClass_opStringStringD; -import test.Ice.operations.Test.Callback_MyClass_opStruct; -import test.Ice.operations.Test.Callback_MyClass_opMyStructMyEnumD; -import test.Ice.operations.Test.Callback_MyClass_opDoubleMarshaling; -import test.Ice.operations.Test.Callback_MyDerivedClass_opDerived; -import test.Ice.operations.Test.AnotherStruct; -import test.Ice.operations.Test.MyClass; -import test.Ice.operations.Test.MyClassPrx; -import test.Ice.operations.Test.MyClassPrxHelper; -import test.Ice.operations.Test.MyDerivedClass; -import test.Ice.operations.Test.MyDerivedClassPrx; -import test.Ice.operations.Test.MyDerivedClassPrxHelper; -import test.Ice.operations.Test.MyEnum; -import test.Ice.operations.Test.Structure; -import test.Ice.operations.Test.MyStruct; - -class TwowaysNewAMI -{ - private static void - test(boolean b) - { - if(!b) - { - throw new RuntimeException(); - } - } - - private static class Callback - { - Callback() - { - _called = false; - } - - public synchronized void check() - { - while(!_called) - { - try - { - wait(); - } - catch(InterruptedException ex) - { - } - } - - _called = false; - } - - public synchronized void called() - { - assert(!_called); - _called = true; - notify(); - } - - private boolean _called; - } - - private static class pingI extends Ice.Callback_Object_ice_ping - { - @Override - public void response() - { - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class isAI extends Ice.Callback_Object_ice_isA - { - @Override - public void response(boolean r) - { - test(r); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class idI extends Ice.Callback_Object_ice_id - { - @Override - public void response(String id) - { - test(id.equals(MyDerivedClass.ice_staticId())); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class idsI extends Ice.Callback_Object_ice_ids - { - @Override - public void response(String[] ids) - { - test(ids.length == 3); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opVoidI extends Callback_MyClass_opVoid - { - @Override - public void response() - { - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opByteI extends Callback_MyClass_opByte - { - @Override - public void response(byte r, byte b) - { - test(b == (byte)0xf0); - test(r == (byte)0xff); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opBoolI extends Callback_MyClass_opBool - { - @Override - public void response(boolean r, boolean b) - { - test(b); - test(!r); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opShortIntLongI extends Callback_MyClass_opShortIntLong - { - @Override - public void response(long r, short s, int i, long l) - { - test(s == 10); - test(i == 11); - test(l == 12); - test(r == 12); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opFloatDoubleI extends Callback_MyClass_opFloatDouble - { - @Override - public void response(double r, float f, double d) - { - test(f == 3.14f); - test(d == 1.1E10); - test(r == 1.1E10); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opStringI extends Callback_MyClass_opString - { - @Override - public void response(String r, String s) - { - test(s.equals("world hello")); - test(r.equals("hello world")); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opMyEnumI extends Callback_MyClass_opMyEnum - { - @Override - public void response(MyEnum r, MyEnum e) - { - test(e == MyEnum.enum2); - test(r == MyEnum.enum3); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opMyClassI extends Callback_MyClass_opMyClass - { - opMyClassI(Ice.Communicator communicator) - { - _communicator = communicator; - } - - @Override - public void response(MyClassPrx r, MyClassPrx c1, MyClassPrx c2) - { - 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 connection serialization mode. - if(_communicator.getProperties().getPropertyAsInt("Ice.ThreadPool.Client.Serialize") == 0) - { - r.opVoid(); - c1.opVoid(); - try - { - c2.opVoid(); - test(false); - } - catch(Ice.ObjectNotExistException ex) - { - } - } - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - private Ice.Communicator _communicator; - } - - private static class opStructI extends Callback_MyClass_opStruct - { - opStructI(Ice.Communicator communicator) - { - _communicator = communicator; - } - - @Override - public void response(Structure rso, Structure so) - { - test(rso.p == null); - test(rso.e == MyEnum.enum2); - test(rso.s.s.equals("def")); - test(so.e == MyEnum.enum3); - test(so.s.s.equals("a new string")); - // We can't do the callbacks below in connection serialization mode. - if(_communicator.getProperties().getPropertyAsInt("Ice.ThreadPool.Client.Serialize") == 0) - { - so.p.opVoid(); - } - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - private Ice.Communicator _communicator; - } - - private static class opByteSI extends Callback_MyClass_opByteS - { - @Override - public void response(byte[] rso, byte[] bso) - { - test(bso.length == 4); - test(bso[0] == (byte)0x22); - test(bso[1] == (byte)0x12); - test(bso[2] == (byte)0x11); - test(bso[3] == (byte)0x01); - test(rso.length == 8); - test(rso[0] == (byte)0x01); - test(rso[1] == (byte)0x11); - test(rso[2] == (byte)0x12); - test(rso[3] == (byte)0x22); - test(rso[4] == (byte)0xf1); - test(rso[5] == (byte)0xf2); - test(rso[6] == (byte)0xf3); - test(rso[7] == (byte)0xf4); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opBoolSI extends Callback_MyClass_opBoolS - { - @Override - public void response(boolean[] rso, boolean[] bso) - { - test(bso.length == 4); - test(bso[0]); - test(bso[1]); - test(!bso[2]); - test(!bso[3]); - test(rso.length == 3); - test(!rso[0]); - test(rso[1]); - test(rso[2]); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opShortIntLongSI extends Callback_MyClass_opShortIntLongS - { - @Override - public void response(long[] rso, short[] sso, int[] iso, long[] lso) - { - test(sso.length == 3); - test(sso[0] == 1); - test(sso[1] == 2); - test(sso[2] == 3); - test(iso.length == 4); - test(iso[0] == 8); - test(iso[1] == 7); - test(iso[2] == 6); - test(iso[3] == 5); - test(lso.length == 6); - test(lso[0] == 10); - test(lso[1] == 30); - test(lso[2] == 20); - test(lso[3] == 10); - test(lso[4] == 30); - test(lso[5] == 20); - test(rso.length == 3); - test(rso[0] == 10); - test(rso[1] == 30); - test(rso[2] == 20); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opFloatDoubleSI extends Callback_MyClass_opFloatDoubleS - { - @Override - public void response(double[] rso, float[] fso, double[] dso) - { - test(fso.length == 2); - test(fso[0] == 3.14f); - test(fso[1] == 1.11f); - test(dso.length == 3); - test(dso[0] == 1.3E10); - test(dso[1] == 1.2E10); - test(dso[2] == 1.1E10); - test(rso.length == 5); - test(rso[0] == 1.1E10); - test(rso[1] == 1.2E10); - test(rso[2] == 1.3E10); - test((float)rso[3] == 3.14f); - test((float)rso[4] == 1.11f); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opStringSI extends Callback_MyClass_opStringS - { - @Override - public void response(String[] rso, String[] sso) - { - test(sso.length == 4); - test(sso[0].equals("abc")); - test(sso[1].equals("de")); - test(sso[2].equals("fghi")); - test(sso[3].equals("xyz")); - test(rso.length == 3); - test(rso[0].equals("fghi")); - test(rso[1].equals("de")); - test(rso[2].equals("abc")); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opByteSSI extends Callback_MyClass_opByteSS - { - @Override - public void response(byte[][] rso, byte[][] bso) - { - test(bso.length == 2); - test(bso[0].length == 1); - test(bso[0][0] == (byte)0xff); - test(bso[1].length == 3); - test(bso[1][0] == (byte)0x01); - test(bso[1][1] == (byte)0x11); - test(bso[1][2] == (byte)0x12); - test(rso.length == 4); - test(rso[0].length == 3); - test(rso[0][0] == (byte)0x01); - test(rso[0][1] == (byte)0x11); - test(rso[0][2] == (byte)0x12); - test(rso[1].length == 1); - test(rso[1][0] == (byte)0xff); - test(rso[2].length == 1); - test(rso[2][0] == (byte)0x0e); - test(rso[3].length == 2); - test(rso[3][0] == (byte)0xf2); - test(rso[3][1] == (byte)0xf1); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opBoolSSI extends Callback_MyClass_opBoolSS - { - @Override - public void - response(boolean[][] rso, boolean[][] bso) - { - test(bso.length == 4); - test(bso[0].length == 1); - test(bso[0][0]); - test(bso[1].length == 1); - test(!bso[1][0]); - test(bso[2].length == 2); - test(bso[2][0]); - test(bso[2][1]); - test(bso[3].length == 3); - test(!bso[3][0]); - test(!bso[3][1]); - test(bso[3][2]); - test(rso.length == 3); - test(rso[0].length == 2); - test(rso[0][0]); - test(rso[0][1]); - test(rso[1].length == 1); - test(!rso[1][0]); - test(rso[2].length == 1); - test(rso[2][0]); - callback.called(); - } - - @Override - public void - exception(Ice.LocalException ex) - { - test(false); - } - - public void - check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opShortIntLongSSI extends Callback_MyClass_opShortIntLongSS - { - @Override - public void - response(long[][] rso, short[][] sso, int[][] iso, long[][] lso) - { - test(rso.length == 1); - test(rso[0].length == 2); - test(rso[0][0] == 496); - test(rso[0][1] == 1729); - test(sso.length == 3); - test(sso[0].length == 3); - test(sso[0][0] == 1); - test(sso[0][1] == 2); - test(sso[0][2] == 5); - test(sso[1].length == 1); - test(sso[1][0] == 13); - test(sso[2].length == 0); - test(iso.length == 2); - test(iso[0].length == 1); - test(iso[0][0] == 42); - test(iso[1].length == 2); - test(iso[1][0] == 24); - test(iso[1][1] == 98); - test(lso.length == 2); - test(lso[0].length == 2); - test(lso[0][0] == 496); - test(lso[0][1] == 1729); - test(lso[1].length == 2); - test(lso[1][0] == 496); - test(lso[1][1] == 1729); - callback.called(); - } - - @Override - public void - exception(Ice.LocalException ex) - { - test(false); - } - - public void - check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opFloatDoubleSSI extends Callback_MyClass_opFloatDoubleSS - { - @Override - public void response(double[][] rso, float[][] fso, double[][] dso) - { - test(fso.length == 3); - test(fso[0].length == 1); - test(fso[0][0] == 3.14f); - test(fso[1].length == 1); - test(fso[1][0] == 1.11f); - test(fso[2].length == 0); - test(dso.length == 1); - test(dso[0].length == 3); - test(dso[0][0] == 1.1E10); - test(dso[0][1] == 1.2E10); - test(dso[0][2] == 1.3E10); - test(rso.length == 2); - test(rso[0].length == 3); - test(rso[0][0] == 1.1E10); - test(rso[0][1] == 1.2E10); - test(rso[0][2] == 1.3E10); - test(rso[1].length == 3); - test(rso[1][0] == 1.1E10); - test(rso[1][1] == 1.2E10); - test(rso[1][2] == 1.3E10); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opStringSSI extends Callback_MyClass_opStringSS - { - @Override - public void response(String[][] rso, String[][] sso) - { - test(sso.length == 5); - test(sso[0].length == 1); - test(sso[0][0].equals("abc")); - test(sso[1].length == 2); - test(sso[1][0].equals("de")); - test(sso[1][1].equals("fghi")); - test(sso[2].length == 0); - test(sso[3].length == 0); - test(sso[4].length == 1); - test(sso[4][0].equals("xyz")); - test(rso.length == 3); - test(rso[0].length == 1); - test(rso[0][0].equals("xyz")); - test(rso[1].length == 0); - test(rso[2].length == 0); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opStringSSSI extends Callback_MyClass_opStringSSS - { - @Override - public void response(String[][][] rsso, String[][][] ssso) - { - test(ssso.length == 5); - test(ssso[0].length == 2); - test(ssso[0][0].length == 2); - test(ssso[0][1].length == 1); - test(ssso[1].length == 1); - test(ssso[1][0].length == 1); - test(ssso[2].length == 2); - test(ssso[2][0].length == 2); - test(ssso[2][1].length == 1); - test(ssso[3].length == 1); - test(ssso[3][0].length == 1); - test(ssso[4].length == 0); - test(ssso[0][0][0].equals("abc")); - test(ssso[0][0][1].equals("de")); - test(ssso[0][1][0].equals("xyz")); - test(ssso[1][0][0].equals("hello")); - test(ssso[2][0][0].equals("")); - test(ssso[2][0][1].equals("")); - test(ssso[2][1][0].equals("abcd")); - test(ssso[3][0][0].equals("")); - - test(rsso.length == 3); - test(rsso[0].length == 0); - test(rsso[1].length == 1); - test(rsso[1][0].length == 1); - test(rsso[2].length == 2); - test(rsso[2][0].length == 2); - test(rsso[2][1].length == 1); - test(rsso[1][0][0].equals("")); - test(rsso[2][0][0].equals("")); - test(rsso[2][0][1].equals("")); - test(rsso[2][1][0].equals("abcd")); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opByteBoolDI extends Callback_MyClass_opByteBoolD - { - @Override - public void response(java.util.Map<Byte, Boolean> ro, java.util.Map<Byte, Boolean> _do) - { - java.util.Map<Byte, Boolean> di1 = new java.util.HashMap<Byte, Boolean>(); - di1.put((byte)10, Boolean.TRUE); - di1.put((byte)100, Boolean.FALSE); - test(_do.equals(di1)); - test(ro.size() == 4); - test(ro.get((byte)10).booleanValue() == true); - test(ro.get((byte)11).booleanValue() == false); - test(ro.get((byte)100).booleanValue() == false); - test(ro.get((byte)101).booleanValue() == true); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opShortIntDI extends Callback_MyClass_opShortIntD - { - @Override - public void response(java.util.Map<Short, Integer> ro, java.util.Map<Short, Integer> _do) - { - java.util.Map<Short, Integer> di1 = new java.util.HashMap<Short, Integer>(); - di1.put((short)110, -1); - di1.put((short)1100, 123123); - test(_do.equals(di1)); - test(ro.size() == 4); - test(ro.get((short)110).intValue() == -1); - test(ro.get((short)111).intValue() == -100); - test(ro.get((short)1100).intValue() == 123123); - test(ro.get((short)1101).intValue() == 0); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opLongFloatDI extends Callback_MyClass_opLongFloatD - { - @Override - public void response(java.util.Map<Long, Float> ro, java.util.Map<Long, Float> _do) - { - java.util.Map<Long, Float> di1 = new java.util.HashMap<Long, Float>(); - di1.put(999999110L, new Float(-1.1f)); - di1.put(999999111L, new Float(123123.2f)); - test(_do.equals(di1)); - test(ro.size() == 4); - test(ro.get(999999110L).floatValue() == -1.1f); - test(ro.get(999999120L).floatValue() == -100.4f); - test(ro.get(999999111L).floatValue() == 123123.2f); - test(ro.get(999999130L).floatValue() == 0.5f); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opStringStringDI extends Callback_MyClass_opStringStringD - { - @Override - public void response(java.util.Map<String, String> ro, java.util.Map<String, String> _do) - { - java.util.Map<String, String> di1 = new java.util.HashMap<String, String>(); - di1.put("foo", "abc -1.1"); - di1.put("bar", "abc 123123.2"); - test(_do.equals(di1)); - test(ro.size() == 4); - test(ro.get("foo").equals("abc -1.1")); - test(ro.get("FOO").equals("abc -100.4")); - test(ro.get("bar").equals("abc 123123.2")); - test(ro.get("BAR").equals("abc 0.5")); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opStringMyEnumDI extends Callback_MyClass_opStringMyEnumD - { - @Override - public void response(java.util.Map<String, MyEnum> ro, java.util.Map<String, MyEnum> _do) - { - java.util.Map<String, MyEnum> di1 = new java.util.HashMap<String, MyEnum>(); - di1.put("abc", MyEnum.enum1); - di1.put("", MyEnum.enum2); - test(_do.equals(di1)); - test(ro.size() == 4); - test(ro.get("abc") == MyEnum.enum1); - test(ro.get("qwerty") == MyEnum.enum3); - test(ro.get("") == MyEnum.enum2); - test(ro.get("Hello!!") == MyEnum.enum2); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opMyEnumStringDI extends Callback_MyClass_opMyEnumStringD - { - @Override - public void response(java.util.Map<MyEnum, String> ro, java.util.Map<MyEnum, String> _do) - { - java.util.Map<MyEnum, String> di1 = new java.util.HashMap<MyEnum, String>(); - di1.put(MyEnum.enum1, "abc"); - test(_do.equals(di1)); - test(ro.size() == 3); - test(ro.get(MyEnum.enum1).equals("abc")); - test(ro.get(MyEnum.enum2).equals("Hello!!")); - test(ro.get(MyEnum.enum3).equals("qwerty")); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opMyStructMyEnumDI extends Callback_MyClass_opMyStructMyEnumD - { - @Override - public void response(java.util.Map<MyStruct, MyEnum> ro, java.util.Map<MyStruct, MyEnum> _do) - { - MyStruct s11 = new MyStruct(1, 1); - MyStruct s12 = new MyStruct(1, 2); - java.util.Map<MyStruct, MyEnum> di1 = new java.util.HashMap<MyStruct, MyEnum>(); - di1.put(s11, MyEnum.enum1); - di1.put(s12, MyEnum.enum2); - test(_do.equals(di1)); - MyStruct s22 = new MyStruct(2, 2); - MyStruct s23 = new MyStruct(2, 3); - test(ro.size() == 4); - test(ro.get(s11) == MyEnum.enum1); - test(ro.get(s12) == MyEnum.enum2); - test(ro.get(s22) == MyEnum.enum3); - test(ro.get(s23) == MyEnum.enum2); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opIntSI extends Callback_MyClass_opIntS - { - opIntSI(int l) - { - _l = l; - } - - @Override - public void response(int[] r) - { - test(r.length == _l); - for(int j = 0; j < r.length; ++j) - { - test(r[j] == -j); - } - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private int _l; - private Callback callback = new Callback(); - } - - private static class opDerivedI extends Callback_MyDerivedClass_opDerived - { - @Override - public void response() - { - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opDoubleMarshalingI extends Callback_MyClass_opDoubleMarshaling - { - @Override - public void response() - { - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opIdempotentI extends Callback_MyClass_opIdempotent - { - @Override - public void response() - { - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class opNonmutatingI extends Callback_MyClass_opNonmutating - { - @Override - public void response() - { - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - - static void - twowaysNewAMI(test.Util.Application app, MyClassPrx p) - { - Ice.Communicator communicator = app.communicator(); - - { - pingI cb = new pingI(); - p.begin_ice_ping(cb); - cb.check(); - } - - { - isAI cb = new isAI(); - p.begin_ice_isA(MyClass.ice_staticId(), cb); - cb.check(); - } - - { - idI cb = new idI(); - p.begin_ice_id(cb); - cb.check(); - } - - { - idsI cb = new idsI(); - p.begin_ice_ids(cb); - cb.check(); - } - - { - Ice.AsyncResult r = p.begin_opVoid(); - p.end_opVoid(r); - } - - { - opVoidI cb = new opVoidI(); - p.begin_opVoid(cb); - cb.check(); - } - - { - Ice.AsyncResult r = p.begin_opByte((byte)0xff, (byte)0x0f); - Ice.ByteHolder p3 = new Ice.ByteHolder(); - byte ret = p.end_opByte(p3, r); - test(p3.value == (byte)0xf0); - test(ret == (byte)0xff); - } - - { - opByteI cb = new opByteI(); - p.begin_opByte((byte)0xff, (byte)0x0f, cb); - cb.check(); - } - - { - opBoolI cb = new opBoolI(); - p.begin_opBool(true, false, cb); - cb.check(); - } - - { - opShortIntLongI cb = new opShortIntLongI(); - p.begin_opShortIntLong((short)10, 11, 12L, cb); - cb.check(); - } - - { - opFloatDoubleI cb = new opFloatDoubleI(); - p.begin_opFloatDouble(3.14f, 1.1E10, cb); - cb.check(); - } - - { - opStringI cb = new opStringI(); - p.begin_opString("hello", "world", cb); - cb.check(); - } - - { - opMyEnumI cb = new opMyEnumI(); - p.begin_opMyEnum(MyEnum.enum2, cb); - cb.check(); - } - - { - opMyClassI cb = new opMyClassI(communicator); - p.begin_opMyClass(p, cb); - cb.check(); - } - - { - Structure si1 = new Structure(); - si1.p = p; - si1.e = MyEnum.enum3; - si1.s = new AnotherStruct(); - si1.s.s = "abc"; - Structure si2 = new Structure(); - si2.p = null; - si2.e = MyEnum.enum2; - si2.s = new AnotherStruct(); - si2.s.s = "def"; - - opStructI cb = new opStructI(communicator); - p.begin_opStruct(si1, si2, cb); - cb.check(); - } - - { - final byte[] bsi1 = - { - (byte)0x01, - (byte)0x11, - (byte)0x12, - (byte)0x22 - }; - final byte[] bsi2 = - { - (byte)0xf1, - (byte)0xf2, - (byte)0xf3, - (byte)0xf4 - }; - - opByteSI cb = new opByteSI(); - p.begin_opByteS(bsi1, bsi2, cb); - cb.check(); - } - - { - final boolean[] bsi1 = { true, true, false }; - final boolean[] bsi2 = { false }; - - opBoolSI cb = new opBoolSI(); - p.begin_opBoolS(bsi1, bsi2, cb); - cb.check(); - } - - { - final short[] ssi = { 1, 2, 3 }; - final int[] isi = { 5, 6, 7, 8 }; - final long[] lsi = { 10, 30, 20 }; - - opShortIntLongSI cb = new opShortIntLongSI(); - p.begin_opShortIntLongS(ssi, isi, lsi, cb); - cb.check(); - } - - { - final float[] fsi = { 3.14f, 1.11f }; - final double[] dsi = { 1.1E10, 1.2E10, 1.3E10 }; - - opFloatDoubleSI cb = new opFloatDoubleSI(); - p.begin_opFloatDoubleS(fsi, dsi, cb); - cb.check(); - } - - { - final String[] ssi1 = { "abc", "de", "fghi" }; - final String[] ssi2 = { "xyz" }; - - opStringSI cb = new opStringSI(); - p.begin_opStringS(ssi1, ssi2, cb); - cb.check(); - } - - { - final byte[][] bsi1 = - { - { (byte)0x01, (byte)0x11, (byte)0x12 }, - { (byte)0xff } - }; - final byte[][] bsi2 = - { - { (byte)0x0e }, - { (byte)0xf2, (byte)0xf1 } - }; - - opByteSSI cb = new opByteSSI(); - p.begin_opByteSS(bsi1, bsi2, cb); - cb.check(); - } - - { - final boolean[][] bsi1 = - { - { true }, - { false }, - { true, true} - }; - - final boolean[][] bsi2 = - { - { false, false, true } - }; - - opBoolSSI cb = new opBoolSSI(); - p.begin_opBoolSS(bsi1, bsi2, cb); - cb.check(); - } - - { - final short[][] ssi= - { - {1, 2, 5}, - {13}, - {} - }; - final int[][] isi = - { - {24, 98}, - {42} - }; - final long[][] lsi = - { - {496, 1729}, - }; - - opShortIntLongSSI cb = new opShortIntLongSSI(); - p.begin_opShortIntLongSS(ssi, isi, lsi, cb); - cb.check(); - } - - { - final float[][] fsi = - { - { 3.14f }, - { 1.11f }, - { }, - }; - final double[][] dsi = - { - { 1.1E10, 1.2E10, 1.3E10 } - }; - - opFloatDoubleSSI cb = new opFloatDoubleSSI(); - p.begin_opFloatDoubleSS(fsi, dsi, cb); - cb.check(); - } - - { - final String[][] ssi1 = - { - { "abc" }, - { "de", "fghi" } - }; - final String[][] ssi2 = - { - { }, - { }, - { "xyz" } - }; - - opStringSSI cb = new opStringSSI(); - p.begin_opStringSS(ssi1, ssi2, cb); - cb.check(); - } - - { - final String[][][] sssi1 = - { - { - { - "abc", "de" - }, - { - "xyz" - } - }, - { - { - "hello" - } - } - }; - - final String[][][] sssi2 = - { - { - { - "", "" - }, - { - "abcd" - } - }, - { - { - "" - } - }, - { - } - }; - - opStringSSSI cb = new opStringSSSI(); - p.begin_opStringSSS(sssi1, sssi2, cb); - cb.check(); - } - - { - java.util.Map<Byte, Boolean> di1 = new java.util.HashMap<Byte, Boolean>(); - di1.put((byte)10, Boolean.TRUE); - di1.put((byte)100, Boolean.FALSE); - java.util.Map<Byte, Boolean> di2 = new java.util.HashMap<Byte, Boolean>(); - di2.put((byte)10, Boolean.TRUE); - di2.put((byte)11, Boolean.FALSE); - di2.put((byte)101, Boolean.TRUE); - - opByteBoolDI cb = new opByteBoolDI(); - p.begin_opByteBoolD(di1, di2, cb); - cb.check(); - } - - { - java.util.Map<Short, Integer> di1 = new java.util.HashMap<Short, Integer>(); - di1.put((short)110, -1); - di1.put((short)1100, 123123); - java.util.Map<Short, Integer> di2 = new java.util.HashMap<Short, Integer>(); - di2.put((short)110, -1); - di2.put((short)111, -100); - di2.put((short)1101, 0); - - opShortIntDI cb = new opShortIntDI(); - p.begin_opShortIntD(di1, di2, cb); - cb.check(); - } - - { - java.util.Map<Long, Float> di1 = new java.util.HashMap<Long, Float>(); - di1.put(999999110L, new Float(-1.1f)); - di1.put(999999111L, new Float(123123.2f)); - java.util.Map<Long, Float> di2 = new java.util.HashMap<Long, Float>(); - di2.put(999999110L, new Float(-1.1f)); - di2.put(999999120L, new Float(-100.4f)); - di2.put(999999130L, new Float(0.5f)); - - opLongFloatDI cb = new opLongFloatDI(); - p.begin_opLongFloatD(di1, di2, cb); - cb.check(); - } - - { - java.util.Map<String, String> di1 = new java.util.HashMap<String, String>(); - di1.put("foo", "abc -1.1"); - di1.put("bar", "abc 123123.2"); - java.util.Map<String, String> di2 = new java.util.HashMap<String, String>(); - di2.put("foo", "abc -1.1"); - di2.put("FOO", "abc -100.4"); - di2.put("BAR", "abc 0.5"); - - opStringStringDI cb = new opStringStringDI(); - p.begin_opStringStringD(di1, di2, cb); - cb.check(); - } - - { - java.util.Map<String, MyEnum> di1 = new java.util.HashMap<String, MyEnum>(); - di1.put("abc", MyEnum.enum1); - di1.put("", MyEnum.enum2); - java.util.Map<String, MyEnum> di2 = new java.util.HashMap<String, MyEnum>(); - di2.put("abc", MyEnum.enum1); - di2.put("qwerty", MyEnum.enum3); - di2.put("Hello!!", MyEnum.enum2); - - opStringMyEnumDI cb = new opStringMyEnumDI(); - p.begin_opStringMyEnumD(di1, di2, cb); - cb.check(); - } - - { - java.util.Map<MyEnum, String> di1 = new java.util.HashMap<MyEnum, String>(); - di1.put(MyEnum.enum1, "abc"); - java.util.Map<MyEnum, String> di2 = new java.util.HashMap<MyEnum, String>(); - di2.put(MyEnum.enum2, "Hello!!"); - di2.put(MyEnum.enum3, "qwerty"); - - opMyEnumStringDI cb = new opMyEnumStringDI(); - p.begin_opMyEnumStringD(di1, di2, cb); - cb.check(); - } - - { - MyStruct s11 = new MyStruct(1, 1); - MyStruct s12 = new MyStruct(1, 2); - java.util.Map<MyStruct, MyEnum> di1 = new java.util.HashMap<MyStruct, MyEnum>(); - di1.put(s11, MyEnum.enum1); - di1.put(s12, MyEnum.enum2); - MyStruct s22 = new MyStruct(2, 2); - MyStruct s23 = new MyStruct(2, 3); - java.util.Map<MyStruct, MyEnum> di2 = new java.util.HashMap<MyStruct, MyEnum>(); - di2.put(s11, MyEnum.enum1); - di2.put(s22, MyEnum.enum3); - di2.put(s23, MyEnum.enum2); - - opMyStructMyEnumDI cb = new opMyStructMyEnumDI(); - p.begin_opMyStructMyEnumD(di1, di2, cb); - cb.check(); - } - - { - int[] lengths = { 0, 1, 2, 126, 127, 128, 129, 253, 254, 255, 256, 257, 1000 }; - - for(int l : lengths) - { - int[] s = new int[l]; - for(int i = 0; i < s.length; ++i) - { - s[i] = i; - } - opIntSI cb = new opIntSI(l); - p.begin_opIntS(s, cb); - cb.check(); - } - } - - { - java.util.Map<String, String> ctx = new java.util.HashMap<String, String>(); - ctx.put("one", "ONE"); - ctx.put("two", "TWO"); - ctx.put("three", "THREE"); - { - test(p.ice_getContext().isEmpty()); - Ice.AsyncResult r = p.begin_opContext(); - java.util.Map<String, String> c = p.end_opContext(r); - test(!c.equals(ctx)); - } - { - test(p.ice_getContext().isEmpty()); - Ice.AsyncResult r = p.begin_opContext(ctx); - java.util.Map<String, String> c = p.end_opContext(r); - test(c.equals(ctx)); - } - MyClassPrx p2 = MyClassPrxHelper.checkedCast(p.ice_context(ctx)); - test(p2.ice_getContext().equals(ctx)); - { - Ice.AsyncResult r = p2.begin_opContext(); - java.util.Map<String, String> c = p2.end_opContext(r); - test(c.equals(ctx)); - } - { - Ice.AsyncResult r = p2.begin_opContext(ctx); - java.util.Map<String, String> c = p2.end_opContext(r); - test(c.equals(ctx)); - } - } - - { - // - // Test implicit context propagation - // - - String[] impls = {"Shared", "PerThread"}; - for(int i = 0; i < 2; i++) - { - Ice.InitializationData initData = new Ice.InitializationData(); - initData.properties = communicator.getProperties()._clone(); - initData.properties.setProperty("Ice.ImplicitContext", impls[i]); - - Ice.Communicator ic = app.initialize(initData); - - java.util.Map<String, String> ctx = new java.util.HashMap<String, String>(); - ctx.put("one", "ONE"); - ctx.put("two", "TWO"); - ctx.put("three", "THREE"); - - MyClassPrx p3 = MyClassPrxHelper.uncheckedCast(ic.stringToProxy("test:default -p 12010")); - - ic.getImplicitContext().setContext(ctx); - test(ic.getImplicitContext().getContext().equals(ctx)); - { - Ice.AsyncResult r = p3.begin_opContext(); - java.util.Map<String, String> c = p3.end_opContext(r); - test(c.equals(ctx)); - } - - ic.getImplicitContext().put("zero", "ZERO"); - - ctx = ic.getImplicitContext().getContext(); - { - Ice.AsyncResult r = p3.begin_opContext(); - java.util.Map<String, String> c = p3.end_opContext(r); - test(c.equals(ctx)); - } - - java.util.Map<String, String> prxContext = new java.util.HashMap<String, String>(); - prxContext.put("one", "UN"); - prxContext.put("four", "QUATRE"); - - java.util.Map<String, String> combined = new java.util.HashMap<String, String>(ctx); - combined.putAll(prxContext); - test(combined.get("one").equals("UN")); - - p3 = MyClassPrxHelper.uncheckedCast(p3.ice_context(prxContext)); - - ic.getImplicitContext().setContext(null); - { - Ice.AsyncResult r = p3.begin_opContext(); - java.util.Map<String, String> c = p3.end_opContext(r); - test(c.equals(prxContext)); - } - - ic.getImplicitContext().setContext(ctx); - { - Ice.AsyncResult r = p3.begin_opContext(); - java.util.Map<String, String> c = p3.end_opContext(r); - test(c.equals(combined)); - } - - ic.destroy(); - } - } - - { - double d = 1278312346.0 / 13.0; - double[] ds = new double[5]; - for(int i = 0; i < 5; i++) - { - ds[i] = d; - } - opDoubleMarshalingI cb = new opDoubleMarshalingI(); - p.begin_opDoubleMarshaling(d, ds, cb); - cb.check(); - } - - { - opIdempotentI cb = new opIdempotentI(); - p.begin_opIdempotent(cb); - cb.check(); - } - - { - opNonmutatingI cb = new opNonmutatingI(); - p.begin_opNonmutating(cb); - cb.check(); - } - - { - MyDerivedClassPrx derived = MyDerivedClassPrxHelper.checkedCast(p); - test(derived != null); - opDerivedI cb = new opDerivedI(); - derived.begin_opDerived(cb); - cb.check(); - } - } -} diff --git a/java/test/Ice/optional/Test.ice b/java/test/Ice/optional/Test.ice index c3c704b3103..70ccaaf88ba 100644 --- a/java/test/Ice/optional/Test.ice +++ b/java/test/Ice/optional/Test.ice @@ -179,7 +179,6 @@ class Recursive { optional(0) RecursiveSeq value; }; -["ami"] class Initial { void shutdown(); diff --git a/java/test/Ice/optional/TestAMD.ice b/java/test/Ice/optional/TestAMD.ice index d6f9b97eee3..c89100311a5 100644 --- a/java/test/Ice/optional/TestAMD.ice +++ b/java/test/Ice/optional/TestAMD.ice @@ -179,7 +179,7 @@ class Recursive { optional(0) RecursiveSeq value; }; -["ami", "amd"] +["amd"] class Initial { void shutdown(); diff --git a/java/test/Ice/seqMapping/AllTests.java b/java/test/Ice/seqMapping/AllTests.java index 1a43f58f863..546de84ae74 100644 --- a/java/test/Ice/seqMapping/AllTests.java +++ b/java/test/Ice/seqMapping/AllTests.java @@ -33,11 +33,6 @@ public class AllTests out.flush(); TwowaysAMI.twowaysAMI(cl); out.println("ok"); - - out.print("testing twoway operations with new AMI mapping... "); - out.flush(); - TwowaysAMI.twowaysAMI(cl); - out.println("ok"); } return cl; diff --git a/java/test/Ice/seqMapping/Test.ice b/java/test/Ice/seqMapping/Test.ice index f9b8850b0c5..15dfffb884b 100644 --- a/java/test/Ice/seqMapping/Test.ice +++ b/java/test/Ice/seqMapping/Test.ice @@ -17,7 +17,7 @@ module Test ["java:serializable:test.Ice.seqMapping.Serialize.Large"] sequence<byte> SerialLarge; ["java:serializable:test.Ice.seqMapping.Serialize.Struct"] sequence<byte> SerialStruct; -["ami"] class MyClass +class MyClass { void shutdown(); diff --git a/java/test/Ice/seqMapping/TestAMD.ice b/java/test/Ice/seqMapping/TestAMD.ice index 926c4464b5e..28b3aa3c434 100644 --- a/java/test/Ice/seqMapping/TestAMD.ice +++ b/java/test/Ice/seqMapping/TestAMD.ice @@ -17,7 +17,7 @@ module Test ["java:serializable:test.Ice.seqMapping.Serialize.Large"] sequence<byte> SerialLarge; ["java:serializable:test.Ice.seqMapping.Serialize.Struct"] sequence<byte> SerialStruct; -["ami", "amd"] class MyClass +["amd"] class MyClass { void shutdown(); diff --git a/java/test/Ice/seqMapping/TwowaysAMI.java b/java/test/Ice/seqMapping/TwowaysAMI.java index 77e75aacc7d..575686dac1b 100644 --- a/java/test/Ice/seqMapping/TwowaysAMI.java +++ b/java/test/Ice/seqMapping/TwowaysAMI.java @@ -59,11 +59,11 @@ class TwowaysAMI private boolean _called; } - private static class AMI_MyClass_opSerialSmallJavaNull extends AMI_MyClass_opSerialSmallJava + private static class Callback_MyClass_opSerialSmallJavaNull extends Callback_MyClass_opSerialSmallJava { @Override public void - ice_response(Small r, Small o) + response(Small r, Small o) { test(o == null); test(r == null); @@ -72,7 +72,7 @@ class TwowaysAMI @Override public void - ice_exception(Ice.LocalException ex) + exception(Ice.LocalException ex) { test(ex instanceof Ice.OperationNotExistException); // OK, talking to non-Java server. } @@ -86,11 +86,11 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opSerialSmallJavaI extends AMI_MyClass_opSerialSmallJava + private static class Callback_MyClass_opSerialSmallJavaI extends Callback_MyClass_opSerialSmallJava { @Override public void - ice_response(Small r, Small o) + response(Small r, Small o) { test(o.i == 99); test(r.i == 99); @@ -99,7 +99,7 @@ class TwowaysAMI @Override public void - ice_exception(Ice.LocalException ex) + exception(Ice.LocalException ex) { test(ex instanceof Ice.OperationNotExistException); // OK, talking to non-Java server. } @@ -113,11 +113,11 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opSerialLargeJavaI extends AMI_MyClass_opSerialLargeJava + private static class Callback_MyClass_opSerialLargeJavaI extends Callback_MyClass_opSerialLargeJava { @Override public void - ice_response(Large r, Large o) + response(Large r, Large o) { test(o.d1 == 1.0); test(o.d2 == 2.0); @@ -144,7 +144,7 @@ class TwowaysAMI @Override public void - ice_exception(Ice.LocalException ex) + exception(Ice.LocalException ex) { test(ex instanceof Ice.OperationNotExistException); // OK, talking to non-Java server. } @@ -158,11 +158,11 @@ class TwowaysAMI private Callback callback = new Callback(); } - private static class AMI_MyClass_opSerialStructJavaI extends AMI_MyClass_opSerialStructJava + private static class Callback_MyClass_opSerialStructJavaI extends Callback_MyClass_opSerialStructJava { @Override public void - ice_response(Struct r, Struct o) + response(Struct r, Struct o) { test(o.o == null); test(o.o2 != null); @@ -181,7 +181,7 @@ class TwowaysAMI @Override public void - ice_exception(Ice.LocalException ex) + exception(Ice.LocalException ex) { test(ex instanceof Ice.OperationNotExistException); // OK, talking to non-Java server. } @@ -201,8 +201,8 @@ class TwowaysAMI { Small i = null; - AMI_MyClass_opSerialSmallJavaNull cb = new AMI_MyClass_opSerialSmallJavaNull(); - p.opSerialSmallJava_async(cb, i); + Callback_MyClass_opSerialSmallJavaNull cb = new Callback_MyClass_opSerialSmallJavaNull(); + p.begin_opSerialSmallJava(i, cb); test(cb.check()); } @@ -210,8 +210,8 @@ class TwowaysAMI Small i = new Small(); i.i = 99; - AMI_MyClass_opSerialSmallJavaI cb = new AMI_MyClass_opSerialSmallJavaI(); - p.opSerialSmallJava_async(cb, i); + Callback_MyClass_opSerialSmallJavaI cb = new Callback_MyClass_opSerialSmallJavaI(); + p.begin_opSerialSmallJava(i, cb); test(cb.check()); } @@ -228,8 +228,8 @@ class TwowaysAMI i.d9 = 9.0; i.d10 = 10.0; - AMI_MyClass_opSerialLargeJavaI cb = new AMI_MyClass_opSerialLargeJavaI(); - p.opSerialLargeJava_async(cb, i); + Callback_MyClass_opSerialLargeJavaI cb = new Callback_MyClass_opSerialLargeJavaI(); + p.begin_opSerialLargeJava(i, cb); test(cb.check()); } @@ -240,8 +240,8 @@ class TwowaysAMI i.s = null; i.s2 = "Hello"; - AMI_MyClass_opSerialStructJavaI cb = new AMI_MyClass_opSerialStructJavaI(); - p.opSerialStructJava_async(cb, i); + Callback_MyClass_opSerialStructJavaI cb = new Callback_MyClass_opSerialStructJavaI(); + p.begin_opSerialStructJava(i, cb); test(cb.check()); } } diff --git a/java/test/Ice/seqMapping/TwowaysNewAMI.java b/java/test/Ice/seqMapping/TwowaysNewAMI.java deleted file mode 100644 index 7448b8e4324..00000000000 --- a/java/test/Ice/seqMapping/TwowaysNewAMI.java +++ /dev/null @@ -1,248 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -package test.Ice.seqMapping; - -import test.Ice.seqMapping.Test.*; -import test.Ice.seqMapping.Serialize.*; - -class TwowaysNewAMI -{ - private static void - test(boolean b) - { - if(!b) - { - throw new RuntimeException(); - } - } - - private static class Callback - { - Callback() - { - _called = false; - } - - public synchronized boolean - check() - { - while(!_called) - { - try - { - wait(); - } - catch(InterruptedException ex) - { - } - } - - _called = false; - return true; - } - - public synchronized void - called() - { - assert(!_called); - _called = true; - notify(); - } - - private boolean _called; - } - - private static class Callback_MyClass_opSerialSmallJavaNull extends Callback_MyClass_opSerialSmallJava - { - @Override - public void - response(Small r, Small o) - { - test(o == null); - test(r == null); - callback.called(); - } - - @Override - public void - exception(Ice.LocalException ex) - { - test(ex instanceof Ice.OperationNotExistException); // OK, talking to non-Java server. - } - - public boolean - check() - { - return callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class Callback_MyClass_opSerialSmallJavaI extends Callback_MyClass_opSerialSmallJava - { - @Override - public void - response(Small r, Small o) - { - test(o.i == 99); - test(r.i == 99); - callback.called(); - } - - @Override - public void - exception(Ice.LocalException ex) - { - test(ex instanceof Ice.OperationNotExistException); // OK, talking to non-Java server. - } - - public boolean - check() - { - return callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class Callback_MyClass_opSerialLargeJavaI extends Callback_MyClass_opSerialLargeJava - { - @Override - public void - response(Large r, Large o) - { - test(o.d1 == 1.0); - test(o.d2 == 2.0); - test(o.d3 == 3.0); - test(o.d4 == 4.0); - test(o.d5 == 5.0); - test(o.d6 == 6.0); - test(o.d7 == 7.0); - test(o.d8 == 8.0); - test(o.d9 == 9.0); - test(o.d10 == 10.0); - test(r.d1 == 1.0); - test(r.d2 == 2.0); - test(r.d3 == 3.0); - test(r.d4 == 4.0); - test(r.d5 == 5.0); - test(r.d6 == 6.0); - test(r.d7 == 7.0); - test(r.d8 == 8.0); - test(r.d9 == 9.0); - test(r.d10 == 10.0); - callback.called(); - } - - @Override - public void - exception(Ice.LocalException ex) - { - test(ex instanceof Ice.OperationNotExistException); // OK, talking to non-Java server. - } - - public boolean - check() - { - return callback.check(); - } - - private Callback callback = new Callback(); - } - - private static class Callback_MyClass_opSerialStructJavaI extends Callback_MyClass_opSerialStructJava - { - @Override - public void - response(Struct r, Struct o) - { - test(o.o == null); - test(o.o2 != null); - test(((Struct)(o.o2)).o == null); - test(((Struct)(o.o2)).o2 == o.o2); - test(o.s == null); - test(o.s2.equals("Hello")); - test(r.o == null); - test(r.o2 != null); - test(((Struct)(r.o2)).o == null); - test(((Struct)(r.o2)).o2 == r.o2); - test(r.s == null); - test(r.s2.equals("Hello")); - callback.called(); - } - - @Override - public void - exception(Ice.LocalException ex) - { - test(ex instanceof Ice.OperationNotExistException); // OK, talking to non-Java server. - } - - public boolean - check() - { - return callback.check(); - } - - private Callback callback = new Callback(); - } - - static void - twowaysAMI(MyClassPrx p) - { - { - Small i = null; - - Callback_MyClass_opSerialSmallJavaNull cb = new Callback_MyClass_opSerialSmallJavaNull(); - p.begin_opSerialSmallJava(i, cb); - test(cb.check()); - } - - { - Small i = new Small(); - i.i = 99; - - Callback_MyClass_opSerialSmallJavaI cb = new Callback_MyClass_opSerialSmallJavaI(); - p.begin_opSerialSmallJava(i, cb); - test(cb.check()); - } - - { - Large i = new Large(); - i.d1 = 1.0; - i.d2 = 2.0; - i.d3 = 3.0; - i.d4 = 4.0; - i.d5 = 5.0; - i.d6 = 6.0; - i.d7 = 7.0; - i.d8 = 8.0; - i.d9 = 9.0; - i.d10 = 10.0; - - Callback_MyClass_opSerialLargeJavaI cb = new Callback_MyClass_opSerialLargeJavaI(); - p.begin_opSerialLargeJava(i, cb); - test(cb.check()); - } - - { - Struct i = new Struct(); - i.o = null; - i.o2 = i; - i.s = null; - i.s2 = "Hello"; - - Callback_MyClass_opSerialStructJavaI cb = new Callback_MyClass_opSerialStructJavaI(); - p.begin_opSerialStructJava(i, cb); - test(cb.check()); - } - } -} diff --git a/java/test/Ice/slicing/exceptions/ClientPrivate.ice b/java/test/Ice/slicing/exceptions/ClientPrivate.ice index 6b80d9f222a..703399d8502 100644 --- a/java/test/Ice/slicing/exceptions/ClientPrivate.ice +++ b/java/test/Ice/slicing/exceptions/ClientPrivate.ice @@ -65,7 +65,7 @@ interface Relay void unknownPreservedAsKnownPreserved() throws KnownPreserved; }; -["ami", "format:sliced"] +["format:sliced"] interface TestIntf { void baseAsBase() throws Base; diff --git a/java/test/Ice/slicing/exceptions/ServerPrivate.ice b/java/test/Ice/slicing/exceptions/ServerPrivate.ice index 6f07147e494..d12869fb451 100644 --- a/java/test/Ice/slicing/exceptions/ServerPrivate.ice +++ b/java/test/Ice/slicing/exceptions/ServerPrivate.ice @@ -65,7 +65,7 @@ interface Relay void unknownPreservedAsKnownPreserved() throws KnownPreserved; }; -["ami", "format:sliced"] +["format:sliced"] interface TestIntf { void baseAsBase() throws Base; diff --git a/java/test/Ice/slicing/exceptions/ServerPrivateAMD.ice b/java/test/Ice/slicing/exceptions/ServerPrivateAMD.ice index 8c8583155b7..ff2ee33b93e 100644 --- a/java/test/Ice/slicing/exceptions/ServerPrivateAMD.ice +++ b/java/test/Ice/slicing/exceptions/ServerPrivateAMD.ice @@ -65,7 +65,7 @@ interface Relay void unknownPreservedAsKnownPreserved() throws KnownPreserved; }; -["ami", "amd", "format:sliced"] +["amd", "format:sliced"] interface TestIntf { void baseAsBase() throws Base; diff --git a/java/test/Ice/slicing/objects/ClientPrivate.ice b/java/test/Ice/slicing/objects/ClientPrivate.ice index 80516abead0..716147695ae 100644 --- a/java/test/Ice/slicing/objects/ClientPrivate.ice +++ b/java/test/Ice/slicing/objects/ClientPrivate.ice @@ -108,7 +108,7 @@ exception PreservedException { }; -["ami", "format:sliced"] +["format:sliced"] interface TestIntf { Object SBaseAsObject(); diff --git a/java/test/Ice/slicing/objects/ServerPrivate.ice b/java/test/Ice/slicing/objects/ServerPrivate.ice index ed010a4598e..f880521b7b1 100644 --- a/java/test/Ice/slicing/objects/ServerPrivate.ice +++ b/java/test/Ice/slicing/objects/ServerPrivate.ice @@ -108,7 +108,7 @@ exception PreservedException { }; -["ami", "format:sliced"] +["format:sliced"] interface TestIntf { Object SBaseAsObject(); diff --git a/java/test/Ice/slicing/objects/ServerPrivateAMD.ice b/java/test/Ice/slicing/objects/ServerPrivateAMD.ice index 25f5371a203..abf0fc4ee64 100644 --- a/java/test/Ice/slicing/objects/ServerPrivateAMD.ice +++ b/java/test/Ice/slicing/objects/ServerPrivateAMD.ice @@ -103,7 +103,7 @@ exception PreservedException { }; -["ami", "amd", "format:sliced"] +["amd", "format:sliced"] interface TestIntf { Object SBaseAsObject(); diff --git a/java/test/Ice/translator/Metadata.ice b/java/test/Ice/translator/Metadata.ice index 192f71b7e68..c5d799becd8 100644 --- a/java/test/Ice/translator/Metadata.ice +++ b/java/test/Ice/translator/Metadata.ice @@ -64,15 +64,6 @@ module MetadataTest StringDict opStringDict(StringDict inArg, out StringDict outArg); StringMap opStringMap(StringMap inArg, out StringMap outArg); - ["ami"] IntSeq opIntSeqAMI(IntSeq inArg, out IntSeq outArg); - ["ami"] IntList opIntListAMI(IntList inArg, out IntList outArg); - - ["ami"] ObjectSeq opObjectSeqAMI(ObjectSeq inArg, out ObjectSeq outArg); - ["ami"] ObjectList opObjectListAMI(ObjectList inArg, out ObjectList outArg); - - ["ami"] StringDict opStringDictAMI(StringDict inArg, out StringDict outArg); - ["ami"] StringMap opStringMapAMI(StringMap inArg, out StringMap outArg); - ["amd"] IntSeq opIntSeqAMD(IntSeq inArg, out IntSeq outArg); ["amd"] IntList opIntListAMD(IntList inArg, out IntList outArg); @@ -102,22 +93,6 @@ module MetadataTest opStringMap2(["java:type:java.util.IdentityHashMap<String, String>"] StringMap inArg, out ["java:type:java.util.IdentityHashMap<String, String>"] StringMap outArg); - ["ami", "java:type:java.util.LinkedList<Integer>"] IntSeq - opIntSeq2AMI(["java:type:java.util.ArrayList<Integer>"] IntSeq inArg, - out ["java:type:Test.CustomList<Integer>"] IntSeq outArg); - - ["ami", "java:type:java.util.ArrayList<Integer>"] IntList - opIntList2AMI(["java:type:java.util.ArrayList<Integer>"] IntList inArg, - out ["java:type:Test.CustomList<Integer>"] IntList outArg); - - ["ami", "java:type:java.util.LinkedList<Ice.Object>"] ObjectSeq - opObjectSeq2AMI(["java:type:java.util.ArrayList<Ice.Object>"] ObjectSeq inArg, - out ["java:type:Test.CustomList<Ice.Object>"] ObjectSeq outArg); - - ["ami", "java:type:java.util.ArrayList<Ice.Object>"] ObjectList - opObjectList2AMI(["java:type:java.util.ArrayList<Ice.Object>"] ObjectList inArg, - out ["java:type:Test.CustomList<Ice.Object>"] ObjectList outArg); - ["amd", "java:type:java.util.LinkedList<Integer>"] IntSeq opIntSeq2AMD(["java:type:java.util.ArrayList<Integer>"] IntSeq inArg, out ["java:type:Test.CustomList<Integer>"] IntSeq outArg); diff --git a/java/test/Ice/translator/TestDoubleModuleNoPackage4.ice b/java/test/Ice/translator/TestDoubleModuleNoPackage4.ice index f2f43ee0985..243466cad0a 100644 --- a/java/test/Ice/translator/TestDoubleModuleNoPackage4.ice +++ b/java/test/Ice/translator/TestDoubleModuleNoPackage4.ice @@ -59,22 +59,6 @@ class dmnpTest4Class extends M1::M2::dmnpBaseClass implements M1::M2::dmnpBaseIn out M1::M2::dmnpClass o6) throws M1::M2::dmnpException; - ["ami"] - M1::M2::dmnpStruct - dmnpTest4Op2(M1::M2::dmnpEnum i1, - M1::M2::dmnpStruct i2, - M1::M2::dmnpStructSeq i3, - M1::M2::dmnpStringStructDict i4, - M1::M2::dmnpInterface i5, - M1::M2::dmnpClass i6, - out M1::M2::dmnpEnum o1, - out M1::M2::dmnpStruct o2, - out M1::M2::dmnpStructSeq o3, - out M1::M2::dmnpStringStructDict o4, - out M1::M2::dmnpInterface o5, - out M1::M2::dmnpClass o6) - throws M1::M2::dmnpException; - ["amd"] M1::M2::dmnpStruct dmnpTest4Op3(M1::M2::dmnpEnum i1, diff --git a/java/test/Ice/translator/TestDoubleModuleNoPackage5.ice b/java/test/Ice/translator/TestDoubleModuleNoPackage5.ice index b00d153dfe6..738722682e8 100644 --- a/java/test/Ice/translator/TestDoubleModuleNoPackage5.ice +++ b/java/test/Ice/translator/TestDoubleModuleNoPackage5.ice @@ -61,22 +61,6 @@ class dmnpTest5Class extends ::M1::M2::dmnpBaseClass implements ::M1::M2::dmnpBa out ::M1::M2::dmnpClass o6) throws ::M1::M2::dmnpException; - ["ami"] - ::M1::M2::dmnpStruct - dmnpTest5Op2(::M1::M2::dmnpEnum i1, - ::M1::M2::dmnpStruct i2, - ::M1::M2::dmnpStructSeq i3, - ::M1::M2::dmnpStringStructDict i4, - ::M1::M2::dmnpInterface i5, - ::M1::M2::dmnpClass i6, - out ::M1::M2::dmnpEnum o1, - out ::M1::M2::dmnpStruct o2, - out ::M1::M2::dmnpStructSeq o3, - out ::M1::M2::dmnpStringStructDict o4, - out ::M1::M2::dmnpInterface o5, - out ::M1::M2::dmnpClass o6) - throws ::M1::M2::dmnpException; - ["amd"] ::M1::M2::dmnpStruct dmnpTest5Op3(::M1::M2::dmnpEnum i1, diff --git a/java/test/Ice/translator/TestDoubleModuleNoPackage6.ice b/java/test/Ice/translator/TestDoubleModuleNoPackage6.ice index 90abb694358..a2c56261805 100644 --- a/java/test/Ice/translator/TestDoubleModuleNoPackage6.ice +++ b/java/test/Ice/translator/TestDoubleModuleNoPackage6.ice @@ -61,22 +61,6 @@ class dmnpTest6Class extends dmnpBaseClass implements dmnpBaseInterface out dmnpClass o6) throws dmnpException; - ["ami"] - dmnpStruct - dmnpTest6Op2(dmnpEnum i1, - dmnpStruct i2, - dmnpStructSeq i3, - dmnpStringStructDict i4, - dmnpInterface i5, - dmnpClass i6, - out dmnpEnum o1, - out dmnpStruct o2, - out dmnpStructSeq o3, - out dmnpStringStructDict o4, - out dmnpInterface o5, - out dmnpClass o6) - throws dmnpException; - ["amd"] dmnpStruct dmnpTest6Op3(dmnpEnum i1, diff --git a/java/test/Ice/translator/TestDoubleModuleNoPackage7.ice b/java/test/Ice/translator/TestDoubleModuleNoPackage7.ice index 6a8e7715093..dbce2b72e47 100644 --- a/java/test/Ice/translator/TestDoubleModuleNoPackage7.ice +++ b/java/test/Ice/translator/TestDoubleModuleNoPackage7.ice @@ -63,22 +63,6 @@ class dmnpTest7Class extends dmnpBaseClass implements dmnpBaseInterface out dmnpClass o6) throws dmnpException; - ["ami"] - dmnpStruct - dmnpTest7Op2(dmnpEnum i1, - dmnpStruct i2, - dmnpStructSeq i3, - dmnpStringStructDict i4, - dmnpInterface i5, - dmnpClass i6, - out dmnpEnum o1, - out dmnpStruct o2, - out dmnpStructSeq o3, - out dmnpStringStructDict o4, - out dmnpInterface o5, - out dmnpClass o6) - throws dmnpException; - ["amd"] dmnpStruct dmnpTest7Op3(dmnpEnum i1, diff --git a/java/test/Ice/translator/TestDoubleModuleWithPackage10.ice b/java/test/Ice/translator/TestDoubleModuleWithPackage10.ice index 6a912543d17..e62b6840612 100644 --- a/java/test/Ice/translator/TestDoubleModuleWithPackage10.ice +++ b/java/test/Ice/translator/TestDoubleModuleWithPackage10.ice @@ -63,22 +63,6 @@ class dmwpTest10Class extends dmwpBaseClass implements dmwpBaseInterface out dmwpClass o6) throws dmwpException; - ["ami"] - dmwpStruct - dmwpTest10Op2(dmwpEnum i1, - dmwpStruct i2, - dmwpStructSeq i3, - dmwpStringStructDict i4, - dmwpInterface i5, - dmwpClass i6, - out dmwpEnum o1, - out dmwpStruct o2, - out dmwpStructSeq o3, - out dmwpStringStructDict o4, - out dmwpInterface o5, - out dmwpClass o6) - throws dmwpException; - ["amd"] dmwpStruct dmwpTest10Op3(dmwpEnum i1, diff --git a/java/test/Ice/translator/TestDoubleModuleWithPackage11.ice b/java/test/Ice/translator/TestDoubleModuleWithPackage11.ice index 34c4f4bf1b2..ba0d8cee5e6 100644 --- a/java/test/Ice/translator/TestDoubleModuleWithPackage11.ice +++ b/java/test/Ice/translator/TestDoubleModuleWithPackage11.ice @@ -63,22 +63,6 @@ class dmwpTest10Class extends dmwpBaseClass implements dmwpBaseInterface out dmwpClass o6) throws dmwpException; - ["ami"] - dmwpStruct - dmwpTest10Op2(dmwpEnum i1, - dmwpStruct i2, - dmwpStructSeq i3, - dmwpStringStructDict i4, - dmwpInterface i5, - dmwpClass i6, - out dmwpEnum o1, - out dmwpStruct o2, - out dmwpStructSeq o3, - out dmwpStringStructDict o4, - out dmwpInterface o5, - out dmwpClass o6) - throws dmwpException; - ["amd"] dmwpStruct dmwpTest10Op3(dmwpEnum i1, diff --git a/java/test/Ice/translator/TestDoubleModuleWithPackage4.ice b/java/test/Ice/translator/TestDoubleModuleWithPackage4.ice index 6588c204dea..4beb8185dd1 100644 --- a/java/test/Ice/translator/TestDoubleModuleWithPackage4.ice +++ b/java/test/Ice/translator/TestDoubleModuleWithPackage4.ice @@ -59,22 +59,6 @@ class dmwpTest4Class extends ::M1::M2::dmwpBaseClass implements ::M1::M2::dmwpBa out ::M1::M2::dmwpClass o6) throws ::M1::M2::dmwpException; - ["ami"] - ::M1::M2::dmwpStruct - dmwpTest4Op2(::M1::M2::dmwpEnum i1, - ::M1::M2::dmwpStruct i2, - ::M1::M2::dmwpStructSeq i3, - ::M1::M2::dmwpStringStructDict i4, - ::M1::M2::dmwpInterface i5, - ::M1::M2::dmwpClass i6, - out ::M1::M2::dmwpEnum o1, - out ::M1::M2::dmwpStruct o2, - out ::M1::M2::dmwpStructSeq o3, - out ::M1::M2::dmwpStringStructDict o4, - out ::M1::M2::dmwpInterface o5, - out ::M1::M2::dmwpClass o6) - throws ::M1::M2::dmwpException; - ["amd"] ::M1::M2::dmwpStruct dmwpTest4Op3(::M1::M2::dmwpEnum i1, diff --git a/java/test/Ice/translator/TestDoubleModuleWithPackage5.ice b/java/test/Ice/translator/TestDoubleModuleWithPackage5.ice index 1afcae27058..9e393674f5f 100644 --- a/java/test/Ice/translator/TestDoubleModuleWithPackage5.ice +++ b/java/test/Ice/translator/TestDoubleModuleWithPackage5.ice @@ -59,22 +59,6 @@ class dmwpTest5Class extends ::M1::M2::dmwpBaseClass implements ::M1::M2::dmwpBa out ::M1::M2::dmwpClass o6) throws ::M1::M2::dmwpException; - ["ami"] - ::M1::M2::dmwpStruct - dmwpTest5Op2(::M1::M2::dmwpEnum i1, - ::M1::M2::dmwpStruct i2, - ::M1::M2::dmwpStructSeq i3, - ::M1::M2::dmwpStringStructDict i4, - ::M1::M2::dmwpInterface i5, - ::M1::M2::dmwpClass i6, - out ::M1::M2::dmwpEnum o1, - out ::M1::M2::dmwpStruct o2, - out ::M1::M2::dmwpStructSeq o3, - out ::M1::M2::dmwpStringStructDict o4, - out ::M1::M2::dmwpInterface o5, - out ::M1::M2::dmwpClass o6) - throws ::M1::M2::dmwpException; - ["amd"] ::M1::M2::dmwpStruct dmwpTest5Op3(::M1::M2::dmwpEnum i1, diff --git a/java/test/Ice/translator/TestDoubleModuleWithPackage6.ice b/java/test/Ice/translator/TestDoubleModuleWithPackage6.ice index 7e8e3969fb3..27e4d12560d 100644 --- a/java/test/Ice/translator/TestDoubleModuleWithPackage6.ice +++ b/java/test/Ice/translator/TestDoubleModuleWithPackage6.ice @@ -61,22 +61,6 @@ class dmwpTest6Class extends ::M1::M2::dmwpBaseClass implements ::M1::M2::dmwpBa out ::M1::M2::dmwpClass o6) throws ::M1::M2::dmwpException; - ["ami"] - ::M1::M2::dmwpStruct - dmwpTest6Op2(::M1::M2::dmwpEnum i1, - ::M1::M2::dmwpStruct i2, - ::M1::M2::dmwpStructSeq i3, - ::M1::M2::dmwpStringStructDict i4, - ::M1::M2::dmwpInterface i5, - ::M1::M2::dmwpClass i6, - out ::M1::M2::dmwpEnum o1, - out ::M1::M2::dmwpStruct o2, - out ::M1::M2::dmwpStructSeq o3, - out ::M1::M2::dmwpStringStructDict o4, - out ::M1::M2::dmwpInterface o5, - out ::M1::M2::dmwpClass o6) - throws ::M1::M2::dmwpException; - ["amd"] ::M1::M2::dmwpStruct dmwpTest6Op3(::M1::M2::dmwpEnum i1, diff --git a/java/test/Ice/translator/TestDoubleModuleWithPackage7.ice b/java/test/Ice/translator/TestDoubleModuleWithPackage7.ice index f520baa67b1..952ece30a99 100644 --- a/java/test/Ice/translator/TestDoubleModuleWithPackage7.ice +++ b/java/test/Ice/translator/TestDoubleModuleWithPackage7.ice @@ -61,22 +61,6 @@ class dmwpTest7Class extends ::M1::M2::dmwpBaseClass implements ::M1::M2::dmwpBa out ::M1::M2::dmwpClass o6) throws ::M1::M2::dmwpException; - ["ami"] - ::M1::M2::dmwpStruct - dmwpTest7Op2(::M1::M2::dmwpEnum i1, - ::M1::M2::dmwpStruct i2, - ::M1::M2::dmwpStructSeq i3, - ::M1::M2::dmwpStringStructDict i4, - ::M1::M2::dmwpInterface i5, - ::M1::M2::dmwpClass i6, - out ::M1::M2::dmwpEnum o1, - out ::M1::M2::dmwpStruct o2, - out ::M1::M2::dmwpStructSeq o3, - out ::M1::M2::dmwpStringStructDict o4, - out ::M1::M2::dmwpInterface o5, - out ::M1::M2::dmwpClass o6) - throws ::M1::M2::dmwpException; - ["amd"] ::M1::M2::dmwpStruct dmwpTest7Op3(::M1::M2::dmwpEnum i1, diff --git a/java/test/Ice/translator/TestDoubleModuleWithPackage8.ice b/java/test/Ice/translator/TestDoubleModuleWithPackage8.ice index b234fe5f001..4a77e8e4ca0 100644 --- a/java/test/Ice/translator/TestDoubleModuleWithPackage8.ice +++ b/java/test/Ice/translator/TestDoubleModuleWithPackage8.ice @@ -61,22 +61,6 @@ class dmwpTest8Class extends ::M1::M2::dmwpBaseClass implements ::M1::M2::dmwpBa out ::M1::M2::dmwpClass o6) throws ::M1::M2::dmwpException; - ["ami"] - ::M1::M2::dmwpStruct - dmwpTest8Op2(::M1::M2::dmwpEnum i1, - ::M1::M2::dmwpStruct i2, - ::M1::M2::dmwpStructSeq i3, - ::M1::M2::dmwpStringStructDict i4, - ::M1::M2::dmwpInterface i5, - ::M1::M2::dmwpClass i6, - out ::M1::M2::dmwpEnum o1, - out ::M1::M2::dmwpStruct o2, - out ::M1::M2::dmwpStructSeq o3, - out ::M1::M2::dmwpStringStructDict o4, - out ::M1::M2::dmwpInterface o5, - out ::M1::M2::dmwpClass o6) - throws ::M1::M2::dmwpException; - ["amd"] ::M1::M2::dmwpStruct dmwpTest8Op3(::M1::M2::dmwpEnum i1, diff --git a/java/test/Ice/translator/TestDoubleModuleWithPackage9.ice b/java/test/Ice/translator/TestDoubleModuleWithPackage9.ice index df9a63f2e8e..69a7badf085 100644 --- a/java/test/Ice/translator/TestDoubleModuleWithPackage9.ice +++ b/java/test/Ice/translator/TestDoubleModuleWithPackage9.ice @@ -61,22 +61,6 @@ class dmwpTest9Class extends dmwpBaseClass implements dmwpBaseInterface out dmwpClass o6) throws dmwpException; - ["ami"] - dmwpStruct - dmwpTest9Op2(dmwpEnum i1, - dmwpStruct i2, - dmwpStructSeq i3, - dmwpStringStructDict i4, - dmwpInterface i5, - dmwpClass i6, - out dmwpEnum o1, - out dmwpStruct o2, - out dmwpStructSeq o3, - out dmwpStringStructDict o4, - out dmwpInterface o5, - out dmwpClass o6) - throws dmwpException; - ["amd"] dmwpStruct dmwpTest9Op3(dmwpEnum i1, diff --git a/java/test/Ice/translator/TestSingleModuleNoPackage4.ice b/java/test/Ice/translator/TestSingleModuleNoPackage4.ice index a835a0701af..8442c102dea 100644 --- a/java/test/Ice/translator/TestSingleModuleNoPackage4.ice +++ b/java/test/Ice/translator/TestSingleModuleNoPackage4.ice @@ -59,22 +59,6 @@ class smnpTest4Class extends smnpBaseClass implements smnpBaseInterface out smnpClass o6) throws smnpException; - ["ami"] - smnpStruct - smnpTest4Op2(smnpEnum i1, - smnpStruct i2, - smnpStructSeq i3, - smnpStringStructDict i4, - smnpInterface i5, - smnpClass i6, - out smnpEnum o1, - out smnpStruct o2, - out smnpStructSeq o3, - out smnpStringStructDict o4, - out smnpInterface o5, - out smnpClass o6) - throws smnpException; - ["amd"] smnpStruct smnpTest4Op3(smnpEnum i1, diff --git a/java/test/Ice/translator/TestSingleModuleNoPackage6.ice b/java/test/Ice/translator/TestSingleModuleNoPackage6.ice index 19f99ad9e77..ebb246142e1 100644 --- a/java/test/Ice/translator/TestSingleModuleNoPackage6.ice +++ b/java/test/Ice/translator/TestSingleModuleNoPackage6.ice @@ -61,22 +61,6 @@ class smnpTest6Class extends M::smnpBaseClass implements M::smnpBaseInterface out M::smnpClass o6) throws M::smnpException; - ["ami"] - M::smnpStruct - smnpTest6Op2(M::smnpEnum i1, - M::smnpStruct i2, - M::smnpStructSeq i3, - M::smnpStringStructDict i4, - M::smnpInterface i5, - M::smnpClass i6, - out M::smnpEnum o1, - out M::smnpStruct o2, - out M::smnpStructSeq o3, - out M::smnpStringStructDict o4, - out M::smnpInterface o5, - out M::smnpClass o6) - throws M::smnpException; - ["amd"] M::smnpStruct smnpTest6Op3(M::smnpEnum i1, diff --git a/java/test/Ice/translator/TestSingleModuleNoPackage7.ice b/java/test/Ice/translator/TestSingleModuleNoPackage7.ice index 7b1802f48d5..e6eaffe636d 100644 --- a/java/test/Ice/translator/TestSingleModuleNoPackage7.ice +++ b/java/test/Ice/translator/TestSingleModuleNoPackage7.ice @@ -61,22 +61,6 @@ class smnpTest7Class extends smnpBaseClass implements smnpBaseInterface out smnpClass o6) throws smnpException; - ["ami"] - smnpStruct - smnpTest7Op2(smnpEnum i1, - smnpStruct i2, - smnpStructSeq i3, - smnpStringStructDict i4, - smnpInterface i5, - smnpClass i6, - out smnpEnum o1, - out smnpStruct o2, - out smnpStructSeq o3, - out smnpStringStructDict o4, - out smnpInterface o5, - out smnpClass o6) - throws smnpException; - ["amd"] smnpStruct smnpTest7Op3(smnpEnum i1, diff --git a/java/test/Ice/translator/TestSingleModuleWithPackage10.ice b/java/test/Ice/translator/TestSingleModuleWithPackage10.ice index c97b99acfed..adc1de2a111 100644 --- a/java/test/Ice/translator/TestSingleModuleWithPackage10.ice +++ b/java/test/Ice/translator/TestSingleModuleWithPackage10.ice @@ -61,22 +61,6 @@ class smwpTest10Class extends smwpBaseClass implements smwpBaseInterface out smwpClass o6) throws smwpException; - ["ami"] - smwpStruct - smwpTest10Op2(smwpEnum i1, - smwpStruct i2, - smwpStructSeq i3, - smwpStringStructDict i4, - smwpInterface i5, - smwpClass i6, - out smwpEnum o1, - out smwpStruct o2, - out smwpStructSeq o3, - out smwpStringStructDict o4, - out smwpInterface o5, - out smwpClass o6) - throws smwpException; - ["amd"] smwpStruct smwpTest10Op3(smwpEnum i1, diff --git a/java/test/Ice/translator/TestSingleModuleWithPackage11.ice b/java/test/Ice/translator/TestSingleModuleWithPackage11.ice index 46927da8a5c..60c85633656 100644 --- a/java/test/Ice/translator/TestSingleModuleWithPackage11.ice +++ b/java/test/Ice/translator/TestSingleModuleWithPackage11.ice @@ -63,22 +63,6 @@ class smwpTest11Class extends M::smwpBaseClass implements M::smwpBaseInterface out M::smwpClass o6) throws M::smwpException; - ["ami"] - M::smwpStruct - smwpTest11Op2(M::smwpEnum i1, - M::smwpStruct i2, - M::smwpStructSeq i3, - M::smwpStringStructDict i4, - M::smwpInterface i5, - M::smwpClass i6, - out M::smwpEnum o1, - out M::smwpStruct o2, - out M::smwpStructSeq o3, - out M::smwpStringStructDict o4, - out M::smwpInterface o5, - out M::smwpClass o6) - throws M::smwpException; - ["amd"] M::smwpStruct smwpTest11Op3(M::smwpEnum i1, diff --git a/java/test/Ice/translator/TestSingleModuleWithPackage12.ice b/java/test/Ice/translator/TestSingleModuleWithPackage12.ice index 6dc478811c1..915bfeae00a 100644 --- a/java/test/Ice/translator/TestSingleModuleWithPackage12.ice +++ b/java/test/Ice/translator/TestSingleModuleWithPackage12.ice @@ -63,22 +63,6 @@ class smwpTest12Class extends M::smwpBaseClass implements M::smwpBaseInterface out M::smwpClass o6) throws M::smwpException; - ["ami"] - M::smwpStruct - smwpTest12Op2(M::smwpEnum i1, - M::smwpStruct i2, - M::smwpStructSeq i3, - M::smwpStringStructDict i4, - M::smwpInterface i5, - M::smwpClass i6, - out M::smwpEnum o1, - out M::smwpStruct o2, - out M::smwpStructSeq o3, - out M::smwpStringStructDict o4, - out M::smwpInterface o5, - out M::smwpClass o6) - throws M::smwpException; - ["amd"] M::smwpStruct smwpTest12Op3(M::smwpEnum i1, diff --git a/java/test/Ice/translator/TestSingleModuleWithPackage13.ice b/java/test/Ice/translator/TestSingleModuleWithPackage13.ice index 2915f44538d..0f27ba270a1 100644 --- a/java/test/Ice/translator/TestSingleModuleWithPackage13.ice +++ b/java/test/Ice/translator/TestSingleModuleWithPackage13.ice @@ -63,22 +63,6 @@ class smwpTest13Class extends smwpBaseClass implements smwpBaseInterface out smwpClass o6) throws smwpException; - ["ami"] - smwpStruct - smwpTest13Op2(smwpEnum i1, - smwpStruct i2, - smwpStructSeq i3, - smwpStringStructDict i4, - smwpInterface i5, - smwpClass i6, - out smwpEnum o1, - out smwpStruct o2, - out smwpStructSeq o3, - out smwpStringStructDict o4, - out smwpInterface o5, - out smwpClass o6) - throws smwpException; - ["amd"] smwpStruct smwpTest13Op3(smwpEnum i1, diff --git a/java/test/Ice/translator/TestSingleModuleWithPackage4.ice b/java/test/Ice/translator/TestSingleModuleWithPackage4.ice index 6f079612add..23ca1d5c332 100644 --- a/java/test/Ice/translator/TestSingleModuleWithPackage4.ice +++ b/java/test/Ice/translator/TestSingleModuleWithPackage4.ice @@ -59,22 +59,6 @@ class smwpTest4Class extends M::smwpBaseClass implements M::smwpBaseInterface out M::smwpClass o6) throws M::smwpException; - ["ami"] - M::smwpStruct - smwpTest4Op2(M::smwpEnum i1, - M::smwpStruct i2, - M::smwpStructSeq i3, - M::smwpStringStructDict i4, - M::smwpInterface i5, - M::smwpClass i6, - out M::smwpEnum o1, - out M::smwpStruct o2, - out M::smwpStructSeq o3, - out M::smwpStringStructDict o4, - out M::smwpInterface o5, - out M::smwpClass o6) - throws M::smwpException; - ["amd"] M::smwpStruct smwpTest4Op3(M::smwpEnum i1, diff --git a/java/test/Ice/translator/TestSingleModuleWithPackage5.ice b/java/test/Ice/translator/TestSingleModuleWithPackage5.ice index 95b63f8b963..569becd21a6 100644 --- a/java/test/Ice/translator/TestSingleModuleWithPackage5.ice +++ b/java/test/Ice/translator/TestSingleModuleWithPackage5.ice @@ -59,22 +59,6 @@ class smwpTest5Class extends smwpBaseClass implements smwpBaseInterface out smwpClass o6) throws smwpException; - ["ami"] - smwpStruct - smwpTest5Op2(smwpEnum i1, - smwpStruct i2, - smwpStructSeq i3, - smwpStringStructDict i4, - smwpInterface i5, - smwpClass i6, - out smwpEnum o1, - out smwpStruct o2, - out smwpStructSeq o3, - out smwpStringStructDict o4, - out smwpInterface o5, - out smwpClass o6) - throws smwpException; - ["amd"] smwpStruct smwpTest5Op3(smwpEnum i1, diff --git a/java/test/Ice/translator/TestSingleModuleWithPackage6.ice b/java/test/Ice/translator/TestSingleModuleWithPackage6.ice index 02d11da6af7..88e1f946571 100644 --- a/java/test/Ice/translator/TestSingleModuleWithPackage6.ice +++ b/java/test/Ice/translator/TestSingleModuleWithPackage6.ice @@ -61,22 +61,6 @@ class smwpTest6Class extends M::smwpBaseClass implements M::smwpBaseInterface out M::smwpClass o6) throws M::smwpException; - ["ami"] - M::smwpStruct - smwpTest6Op2(M::smwpEnum i1, - M::smwpStruct i2, - M::smwpStructSeq i3, - M::smwpStringStructDict i4, - M::smwpInterface i5, - M::smwpClass i6, - out M::smwpEnum o1, - out M::smwpStruct o2, - out M::smwpStructSeq o3, - out M::smwpStringStructDict o4, - out M::smwpInterface o5, - out M::smwpClass o6) - throws M::smwpException; - ["amd"] M::smwpStruct smwpTest6Op3(M::smwpEnum i1, diff --git a/java/test/Ice/translator/TestSingleModuleWithPackage7.ice b/java/test/Ice/translator/TestSingleModuleWithPackage7.ice index eb085cc7cbc..fbc5d65a21b 100644 --- a/java/test/Ice/translator/TestSingleModuleWithPackage7.ice +++ b/java/test/Ice/translator/TestSingleModuleWithPackage7.ice @@ -61,22 +61,6 @@ class smwpTest7Class extends M::smwpBaseClass implements M::smwpBaseInterface out M::smwpClass o6) throws M::smwpException; - ["ami"] - M::smwpStruct - smwpTest7Op2(M::smwpEnum i1, - M::smwpStruct i2, - M::smwpStructSeq i3, - M::smwpStringStructDict i4, - M::smwpInterface i5, - M::smwpClass i6, - out M::smwpEnum o1, - out M::smwpStruct o2, - out M::smwpStructSeq o3, - out M::smwpStringStructDict o4, - out M::smwpInterface o5, - out M::smwpClass o6) - throws M::smwpException; - ["amd"] M::smwpStruct smwpTest7Op3(M::smwpEnum i1, diff --git a/java/test/Ice/translator/TestSingleModuleWithPackage9.ice b/java/test/Ice/translator/TestSingleModuleWithPackage9.ice index c9b8c855beb..fb42214404c 100644 --- a/java/test/Ice/translator/TestSingleModuleWithPackage9.ice +++ b/java/test/Ice/translator/TestSingleModuleWithPackage9.ice @@ -61,22 +61,6 @@ class smwpTest9Class extends ::M::smwpBaseClass implements ::M::smwpBaseInterfac out ::M::smwpClass o6) throws ::M::smwpException; - ["ami"] - ::M::smwpStruct - smwpTest9Op2(::M::smwpEnum i1, - ::M::smwpStruct i2, - ::M::smwpStructSeq i3, - ::M::smwpStringStructDict i4, - ::M::smwpInterface i5, - ::M::smwpClass i6, - out ::M::smwpEnum o1, - out ::M::smwpStruct o2, - out ::M::smwpStructSeq o3, - out ::M::smwpStringStructDict o4, - out ::M::smwpInterface o5, - out ::M::smwpClass o6) - throws ::M::smwpException; - ["amd"] ::M::smwpStruct smwpTest9Op3(::M::smwpEnum i1, diff --git a/java/test/Slice/keyword/Key.ice b/java/test/Slice/keyword/Key.ice index 4659e9b65f9..f2002f43ccc 100644 --- a/java/test/Slice/keyword/Key.ice +++ b/java/test/Slice/keyword/Key.ice @@ -36,7 +36,7 @@ interface default class else { int if; - ["ami"] void foo(default* equals, out int final); + void foo(default* equals, out int final); }; class finalize extends else implements default, catch |