summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cpp/demo/Glacier2/winrt/chat/Chat.ice2
-rw-r--r--cpp/src/IceGrid/Internal.ice2
-rw-r--r--cpp/src/Slice/Parser.cpp4
-rw-r--r--cpp/src/Slice/PythonUtil.cpp28
-rw-r--r--cpp/src/Slice/RubyUtil.cpp21
-rw-r--r--cpp/src/slice2cpp/Gen.cpp157
-rw-r--r--cpp/src/slice2cs/Gen.cpp129
-rw-r--r--cpp/src/slice2java/Gen.cpp156
-rw-r--r--cpp/test/Ice/custom/AllTests.cpp1476
-rw-r--r--cpp/test/Ice/custom/Test.ice2
-rw-r--r--cpp/test/Ice/custom/TestAMD.ice2
-rw-r--r--cpp/test/Ice/custom/Wstring.ice4
-rw-r--r--cpp/test/Ice/custom/WstringAMD.ice4
-rw-r--r--cpp/test/Ice/exceptions/AllTests.cpp643
-rw-r--r--cpp/test/Ice/exceptions/Test.ice4
-rw-r--r--cpp/test/Ice/exceptions/TestAMD.ice4
-rw-r--r--cpp/test/Ice/operations/AllTests.cpp11
-rw-r--r--cpp/test/Ice/operations/Makefile4
-rw-r--r--cpp/test/Ice/operations/Makefile.mak4
-rw-r--r--cpp/test/Ice/operations/OnewaysAMI.cpp215
-rw-r--r--cpp/test/Ice/operations/OnewaysNewAMI.cpp239
-rw-r--r--cpp/test/Ice/operations/Test.ice4
-rw-r--r--cpp/test/Ice/operations/TestAMD.ice4
-rw-r--r--cpp/test/Ice/operations/TwowaysAMI.cpp1414
-rw-r--r--cpp/test/Ice/operations/TwowaysNewAMI.cpp1665
-rw-r--r--cpp/test/Slice/keyword/Client.cpp10
-rw-r--r--cpp/test/Slice/keyword/Key.ice2
-rw-r--r--cs/demo/Glacier2/sl/chat/Chat.ice4
-rw-r--r--cs/test/Ice/dictMapping/AllTests.cs5
-rw-r--r--cs/test/Ice/dictMapping/Makefile4
-rw-r--r--cs/test/Ice/dictMapping/Makefile.mak4
-rw-r--r--cs/test/Ice/dictMapping/Test.ice2
-rw-r--r--cs/test/Ice/dictMapping/TestAMD.ice2
-rw-r--r--cs/test/Ice/dictMapping/TwowaysAMI.cs858
-rw-r--r--cs/test/Ice/dictMapping/TwowaysNewAMI.cs677
-rw-r--r--cs/test/Ice/exceptions/AllTests.cs752
-rw-r--r--cs/test/Ice/exceptions/Test.ice4
-rw-r--r--cs/test/Ice/exceptions/TestAMD.ice4
-rw-r--r--cs/test/Ice/operations/AllTests.cs11
-rw-r--r--cs/test/Ice/operations/Makefile8
-rw-r--r--cs/test/Ice/operations/Makefile.mak8
-rw-r--r--cs/test/Ice/operations/OnewaysAMI.cs182
-rw-r--r--cs/test/Ice/operations/OnewaysNewAMI.cs207
-rw-r--r--cs/test/Ice/operations/Test.ice4
-rw-r--r--cs/test/Ice/operations/TestAMD.ice6
-rw-r--r--cs/test/Ice/operations/TwowaysAMI.cs1771
-rw-r--r--cs/test/Ice/operations/TwowaysNewAMI.cs1880
-rw-r--r--cs/test/Ice/optional/Test.ice1
-rw-r--r--cs/test/Ice/optional/TestAMD.ice2
-rw-r--r--cs/test/Ice/seqMapping/AllTests.cs5
-rw-r--r--cs/test/Ice/seqMapping/Makefile4
-rw-r--r--cs/test/Ice/seqMapping/Makefile.mak4
-rw-r--r--cs/test/Ice/seqMapping/Test.ice2
-rw-r--r--cs/test/Ice/seqMapping/TestAMD.ice2
-rw-r--r--cs/test/Ice/seqMapping/TwowaysAMI.cs3345
-rw-r--r--cs/test/Ice/seqMapping/TwowaysNewAMI.cs2263
-rw-r--r--cs/test/Ice/slicing/exceptions/Test.ice2
-rw-r--r--cs/test/Ice/slicing/exceptions/TestAMD.ice2
-rw-r--r--cs/test/Ice/slicing/objects/Test.ice2
-rw-r--r--cs/test/Ice/slicing/objects/TestAMD.ice2
-rw-r--r--cs/test/Slice/keyword/Key.ice3
-rw-r--r--java/test/Ice/exceptions/AllTests.java840
-rw-r--r--java/test/Ice/exceptions/Test.ice4
-rw-r--r--java/test/Ice/exceptions/TestAMD.ice4
-rw-r--r--java/test/Ice/operations/AllTests.java11
-rw-r--r--java/test/Ice/operations/OnewaysAMI.java263
-rw-r--r--java/test/Ice/operations/OnewaysNewAMI.java244
-rw-r--r--java/test/Ice/operations/Test.ice4
-rw-r--r--java/test/Ice/operations/TestAMD.ice4
-rw-r--r--java/test/Ice/operations/TwowaysAMI.java805
-rw-r--r--java/test/Ice/operations/TwowaysNewAMI.java1770
-rw-r--r--java/test/Ice/optional/Test.ice1
-rw-r--r--java/test/Ice/optional/TestAMD.ice2
-rw-r--r--java/test/Ice/seqMapping/AllTests.java5
-rw-r--r--java/test/Ice/seqMapping/Test.ice2
-rw-r--r--java/test/Ice/seqMapping/TestAMD.ice2
-rw-r--r--java/test/Ice/seqMapping/TwowaysAMI.java40
-rw-r--r--java/test/Ice/seqMapping/TwowaysNewAMI.java248
-rw-r--r--java/test/Ice/slicing/exceptions/ClientPrivate.ice2
-rw-r--r--java/test/Ice/slicing/exceptions/ServerPrivate.ice2
-rw-r--r--java/test/Ice/slicing/exceptions/ServerPrivateAMD.ice2
-rw-r--r--java/test/Ice/slicing/objects/ClientPrivate.ice2
-rw-r--r--java/test/Ice/slicing/objects/ServerPrivate.ice2
-rw-r--r--java/test/Ice/slicing/objects/ServerPrivateAMD.ice2
-rw-r--r--java/test/Ice/translator/Metadata.ice25
-rw-r--r--java/test/Ice/translator/TestDoubleModuleNoPackage4.ice16
-rw-r--r--java/test/Ice/translator/TestDoubleModuleNoPackage5.ice16
-rw-r--r--java/test/Ice/translator/TestDoubleModuleNoPackage6.ice16
-rw-r--r--java/test/Ice/translator/TestDoubleModuleNoPackage7.ice16
-rw-r--r--java/test/Ice/translator/TestDoubleModuleWithPackage10.ice16
-rw-r--r--java/test/Ice/translator/TestDoubleModuleWithPackage11.ice16
-rw-r--r--java/test/Ice/translator/TestDoubleModuleWithPackage4.ice16
-rw-r--r--java/test/Ice/translator/TestDoubleModuleWithPackage5.ice16
-rw-r--r--java/test/Ice/translator/TestDoubleModuleWithPackage6.ice16
-rw-r--r--java/test/Ice/translator/TestDoubleModuleWithPackage7.ice16
-rw-r--r--java/test/Ice/translator/TestDoubleModuleWithPackage8.ice16
-rw-r--r--java/test/Ice/translator/TestDoubleModuleWithPackage9.ice16
-rw-r--r--java/test/Ice/translator/TestSingleModuleNoPackage4.ice16
-rw-r--r--java/test/Ice/translator/TestSingleModuleNoPackage6.ice16
-rw-r--r--java/test/Ice/translator/TestSingleModuleNoPackage7.ice16
-rw-r--r--java/test/Ice/translator/TestSingleModuleWithPackage10.ice16
-rw-r--r--java/test/Ice/translator/TestSingleModuleWithPackage11.ice16
-rw-r--r--java/test/Ice/translator/TestSingleModuleWithPackage12.ice16
-rw-r--r--java/test/Ice/translator/TestSingleModuleWithPackage13.ice16
-rw-r--r--java/test/Ice/translator/TestSingleModuleWithPackage4.ice16
-rw-r--r--java/test/Ice/translator/TestSingleModuleWithPackage5.ice16
-rw-r--r--java/test/Ice/translator/TestSingleModuleWithPackage6.ice16
-rw-r--r--java/test/Ice/translator/TestSingleModuleWithPackage7.ice16
-rw-r--r--java/test/Ice/translator/TestSingleModuleWithPackage9.ice16
-rw-r--r--java/test/Slice/keyword/Key.ice2
-rw-r--r--js/test/Ice/exceptions/Test.ice4
-rw-r--r--js/test/Ice/operations/Test.ice4
-rw-r--r--js/test/Ice/slicing/objects/Test.ice2
-rw-r--r--perf/src/Ice/latency/Latency.ice4
-rw-r--r--php/test/Ice/exceptions/Test.ice4
-rw-r--r--php/test/Ice/operations/Test.ice4
-rw-r--r--php/test/Ice/optional/Test.ice1
-rw-r--r--protobuf/test/cpp/Test.ice2
-rw-r--r--protobuf/test/java/Test.ice2
-rw-r--r--protobuf/test/py/Test.ice2
-rw-r--r--py/test/Ice/exceptions/AllTests.py364
-rw-r--r--py/test/Ice/exceptions/Test.ice4
-rw-r--r--py/test/Ice/exceptions/TestAMD.ice4
-rw-r--r--py/test/Ice/operations/AllTests.py10
-rw-r--r--py/test/Ice/operations/OnewaysAMI.py97
-rw-r--r--py/test/Ice/operations/OnewaysNewAMI.py85
-rw-r--r--py/test/Ice/operations/Test.ice4
-rw-r--r--py/test/Ice/operations/TestAMD.ice4
-rw-r--r--py/test/Ice/operations/TwowaysAMI.py642
-rw-r--r--py/test/Ice/operations/TwowaysNewAMI.py733
-rw-r--r--py/test/Ice/optional/Test.ice1
-rw-r--r--py/test/Ice/optional/TestAMD.ice2
-rwxr-xr-xpy/test/Slice/keyword/Client.py5
-rw-r--r--py/test/Slice/keyword/Key.ice2
-rw-r--r--rb/test/Ice/binding/Test.ice2
-rw-r--r--rb/test/Ice/exceptions/Test.ice4
-rw-r--r--rb/test/Ice/operations/Test.ice4
-rw-r--r--rb/test/Ice/optional/Test.ice1
-rw-r--r--rb/test/Ice/timeout/Test.ice6
-rw-r--r--slice/Ice/ConnectionF.ice1
-rw-r--r--slice/Ice/EndpointF.ice2
-rw-r--r--slice/IceGrid/Admin.ice4
142 files changed, 3844 insertions, 21080 deletions
diff --git a/cpp/demo/Glacier2/winrt/chat/Chat.ice b/cpp/demo/Glacier2/winrt/chat/Chat.ice
index f578076b5bb..907f1f1b50e 100644
--- a/cpp/demo/Glacier2/winrt/chat/Chat.ice
+++ b/cpp/demo/Glacier2/winrt/chat/Chat.ice
@@ -16,7 +16,7 @@ module Demo
interface ChatCallback
{
- ["ami"] void message(string data);
+ void message(string data);
};
interface ChatSession extends Glacier2::Session
diff --git a/cpp/src/IceGrid/Internal.ice b/cpp/src/IceGrid/Internal.ice
index 0d0ee62cbe3..beac0cd80c7 100644
--- a/cpp/src/IceGrid/Internal.ice
+++ b/cpp/src/IceGrid/Internal.ice
@@ -246,7 +246,7 @@ interface Server extends FileReader
* @throws DeploymentException Raised if the server can't be updated.
*
**/
- ["ami"] bool checkUpdate(InternalServerDescriptor svr, bool noRestart)
+ bool checkUpdate(InternalServerDescriptor svr, bool noRestart)
throws DeploymentException;
/**
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp
index ea79a4f1399..d71e3ab97ab 100644
--- a/cpp/src/Slice/Parser.cpp
+++ b/cpp/src/Slice/Parser.cpp
@@ -1870,14 +1870,14 @@ Slice::Container::hasAsyncOps() const
if(cl && !cl->isLocal())
{
OperationList ops = cl->operations();
- if(!ops.empty() && (cl->hasMetaData("ami") || cl->hasMetaData("amd")))
+ if(!ops.empty() && cl->hasMetaData("amd"))
{
return true;
}
for(OperationList::const_iterator i = ops.begin(); i != ops.end(); ++i)
{
OperationPtr op = *i;
- if(op->hasMetaData("ami") || op->hasMetaData("amd"))
+ if(op->hasMetaData("amd"))
{
return true;
}
diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp
index bfdf33a7b8d..21f8ccd2f9c 100644
--- a/cpp/src/Slice/PythonUtil.cpp
+++ b/cpp/src/Slice/PythonUtil.cpp
@@ -737,34 +737,6 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
_out.inc();
_out << nl << "return _M_" << abs << "._op_" << (*oli)->name() << ".end(self, _r)";
_out.dec();
-
- //
- // Old AMI operations.
- //
- if(p->hasMetaData("ami") || (*oli)->hasMetaData("ami"))
- {
- _out << sp;
- if(!comment.empty())
- {
- _out << nl << comment;
- }
- _out << nl << "def " << (*oli)->name() << "_async(self, _cb";
- if(!inParams.empty())
- {
- _out << ", " << inParams;
- }
- _out << ", _ctx=None):";
- _out.inc();
-
- _out << nl << "return _M_" << abs << "._op_" << (*oli)->name() << ".invokeAsync(self, (_cb, ("
- << inParams;
- if(!inParams.empty() && inParams.find(',') == string::npos)
- {
- _out << ", ";
- }
- _out << "), _ctx))";
- _out.dec();
- }
}
_out << sp << nl << "def checkedCast(proxy, facetOrCtx=None, _ctx=None):";
diff --git a/cpp/src/Slice/RubyUtil.cpp b/cpp/src/Slice/RubyUtil.cpp
index 79a8185d2f4..0fbef458392 100644
--- a/cpp/src/Slice/RubyUtil.cpp
+++ b/cpp/src/Slice/RubyUtil.cpp
@@ -540,27 +540,6 @@ Slice::Ruby::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << "], _ctx)";
_out.dec();
_out << nl << "end";
-
-/* If AMI/AMD is ever implemented...
- if(p->hasMetaData("ami") || (*oli)->hasMetaData("ami"))
- {
- _out << sp << nl << "def " << fixedOpName << "_async(_cb";
- if(!inParams.empty())
- {
- _out << ", " << inParams;
- }
- _out << ", _ctx=nil)";
- _out.inc();
- _out << nl << name << "_mixin::OP_" << (*oli)->name() << ".invokeAsync(self, _cb, [" << inParams;
- if(!inParams.empty() && inParams.find(',') == string::npos)
- {
- _out << ", ";
- }
- _out << "], _ctx)";
- _out.dec();
- _out << nl << "end";
- }
-*/
}
_out.dec();
_out << nl << "end"; // End of mix-in module for proxy.
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index 9342b00d0b5..5bf6c662656 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -2465,127 +2465,6 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
}
C << eb;
}
-
- if(cl->hasMetaData("ami") || p->hasMetaData("ami"))
- {
- string classNameAMI = "AMI_" + cl->name();
- string classScope = fixKwd(cl->scope());
- string classScopedAMI = classScope + classNameAMI;
- string opScopedAMI = classScopedAMI + "_" + name;
-
- H << nl << "bool " << name << "_async" << spar << ("const " + opScopedAMI + "Ptr&")
- << paramsAMI << epar << ';';
- H << nl << "bool " << name << "_async" << spar << ("const " + opScopedAMI + "Ptr&")
- << paramsAMI << "const ::Ice::Context&" << epar << ';';
-
- C << sp << nl << "bool" << nl << "IceProxy" << scope << name << "_async" << spar
- << ("const " + opScopedAMI + "Ptr& __cb") << paramsDeclAMI << epar;
- C << sb;
- if(p->returnsData())
- {
- C << nl << delNameScoped << "Ptr __del;";
- C << nl << "if(dynamic_cast< ::Ice::AMISentCallback*>(__cb.get()))";
- C << sb;
- C << nl << " __del = " << classScope << "new" << delName << "(__cb, &" << opScopedAMI << "::__response, &"
- << opScopedAMI << "::__exception, &" << opScopedAMI << "::__sent);";
- C << eb;
- C << nl << "else";
- C << sb;
- C << nl << " __del = " << classScope << "new" << delName << "(__cb, &" << opScopedAMI << "::__response, &"
- << opScopedAMI << "::__exception);";
- C << eb;
- }
- else
- {
- C << nl << "::IceInternal::CallbackBasePtr __del;";
- C << nl << "if(dynamic_cast< ::Ice::AMISentCallback*>(__cb.get()))";
- C << sb;
- C << nl << " __del = " << classScope << "new" << delName << "(__cb, &" << opScopedAMI << "::__response, &"
- << opScopedAMI << "::__exception, &" << opScopedAMI << "::__sent);";
- C << eb;
- C << nl << "else";
- C << sb;
- C << nl << " __del = " << classScope << "new" << delName << "(__cb, &" << opScopedAMI << "::__response, &"
- << opScopedAMI << "::__exception);";
- C << eb;
- }
-
- if(p->returnsData())
- {
- C << nl << "::Ice::AsyncResultPtr __ar;";
- C << nl << "try";
- C << sb;
- C << nl << "__checkTwowayOnly(" << flatName << ");";
- C << nl << "__ar = begin_" << name << spar << argsAMI << "0, __del" << epar << ';';
- C << eb;
- C << nl << "catch(const ::Ice::TwowayOnlyException& ex)";
- C << sb;
- C << nl << "__ar = new ::IceInternal::OutgoingAsync(this, " << flatName << ", __del, 0);";
- C << nl << "__ar->__invokeExceptionAsync(ex);";
- C << eb;
- }
- else
- {
- C << nl << "::Ice::AsyncResultPtr __ar = begin_" << name << spar << argsAMI << "0, __del" << epar << ';';
- }
- C << nl << "return __ar->sentSynchronously();";
- C << eb;
-
- C << sp << nl << "bool" << nl << "IceProxy" << scope << name << "_async" << spar
- << ("const " + opScopedAMI + "Ptr& __cb") << paramsDeclAMI << "const ::Ice::Context& __ctx"
- << epar;
- C << sb;
- if(p->returnsData())
- {
- C << nl << delNameScoped << "Ptr __del;";
- C << nl << "if(dynamic_cast< ::Ice::AMISentCallback*>(__cb.get()))";
- C << sb;
- C << nl << " __del = " << classScope << "new" << delName << "(__cb, &" << opScopedAMI << "::__response, &"
- << opScopedAMI << "::__exception, &" << opScopedAMI << "::__sent);";
- C << eb;
- C << nl << "else";
- C << sb;
- C << nl << " __del = " << classScope << "new" << delName << "(__cb, &" << opScopedAMI << "::__response, &"
- << opScopedAMI << "::__exception);";
- C << eb;
- }
- else
- {
- C << nl << "::IceInternal::CallbackBasePtr __del;";
- C << nl << "if(dynamic_cast< ::Ice::AMISentCallback*>(__cb.get()))";
- C << sb;
- C << nl << " __del = " << classScope << "new" << delName << "(__cb, &" << opScopedAMI << "::__response, &"
- << opScopedAMI << "::__exception, &" << opScopedAMI << "::__sent);";
- C << eb;
- C << nl << "else";
- C << sb;
- C << nl << " __del = " << classScope << "new" << delName << "(__cb, &" << opScopedAMI << "::__response, &"
- << opScopedAMI << "::__exception);";
- C << eb;
- }
-
- if(p->returnsData())
- {
- C << nl << "::Ice::AsyncResultPtr __ar;";
- C << nl << "try";
- C << sb;
- C << nl << "__checkTwowayOnly(" << flatName << ");";
- C << nl << "__ar = begin_" << name << spar << argsAMI << "&__ctx" << "__del" << epar << ';';
- C << eb;
- C << nl << "catch(const ::Ice::TwowayOnlyException& ex)";
- C << sb;
- C << nl << "__ar = new ::IceInternal::OutgoingAsync(this, " << flatName << ", __del, 0);";
- C << nl << "__ar->__invokeExceptionAsync(ex);";
- C << eb;
- }
- else
- {
- C << nl << "::Ice::AsyncResultPtr __ar = begin_" << name << spar << argsAMI << "&__ctx" << "__del" << epar
- << ';';
- }
- C << nl << "return __ar->sentSynchronously();";
- C << eb;
- }
}
Slice::Gen::ObjectDeclVisitor::ObjectDeclVisitor(Output& h, Output& c, const string& dllExport) :
@@ -4838,7 +4717,7 @@ Slice::Gen::AsyncVisitor::AsyncVisitor(Output& h, Output&, const string& dllExpo
bool
Slice::Gen::AsyncVisitor::visitModuleStart(const ModulePtr& p)
{
- if(!p->hasNonLocalClassDecls() || (!p->hasContentsWithMetaData("ami") && !p->hasContentsWithMetaData("amd")))
+ if(!p->hasNonLocalClassDecls() || !p->hasContentsWithMetaData("amd"))
{
return false;
}
@@ -4879,8 +4758,7 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
ContainerPtr container = p->container();
ClassDefPtr cl = ClassDefPtr::dynamicCast(container);
- if(cl->isLocal() ||
- (!cl->hasMetaData("ami") && !p->hasMetaData("ami") && !cl->hasMetaData("amd") && !p->hasMetaData("amd")))
+ if(cl->isLocal() || (!cl->hasMetaData("amd") && !p->hasMetaData("amd")))
{
return;
}
@@ -4888,10 +4766,8 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
string name = p->name();
string className = cl->name();
- string classNameAMI = "AMI_" + className;
string classNameAMD = "AMD_" + className;
string classScope = fixKwd(cl->scope());
- string classScopedAMI = classScope + classNameAMI;
string classScopedAMD = classScope + classNameAMD;
string proxyName = classScope + className + "Prx";
@@ -4947,33 +4823,6 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
paramsInvoke.push_back("const ::Ice::Context*");
paramsDeclInvoke.push_back("const ::Ice::Context* __ctx");
- if(cl->hasMetaData("ami") || p->hasMetaData("ami"))
- {
- H << sp << nl << "class " << _dllExport << classNameAMI << '_' << name <<" : public ::Ice::AMICallbackBase";
- H << sb;
- H.dec();
- H << nl << "public:";
- H.inc();
- H << sp;
- H << nl << "virtual void ice_response" << spar << params << epar << " = 0;";
- H << sp;
- H << nl << "void __response" << spar << paramsDecl << epar;
- H << sb;
- H << nl << "ice_response" << spar << args << epar << ';';
- H << eb;
- H << nl << "void __exception(const ::Ice::Exception& ex)";
- H << sb;
- H << nl << "ice_exception(ex);";
- H << eb;
- H << nl << "void __sent(bool sentSynchronously)";
- H << sb;
- H << nl << "::Ice::AMICallbackBase::__sent(sentSynchronously);";
- H << eb;
- H << eb << ';';
- H << sp << nl << "typedef ::IceUtil::Handle< " << classScopedAMI << '_' << name << "> " << classNameAMI
- << '_' << name << "Ptr;";
- }
-
if(cl->hasMetaData("amd") || p->hasMetaData("amd"))
{
H << sp << nl << "class " << _dllExport << classNameAMD << '_' << name
@@ -5501,7 +5350,7 @@ Slice::Gen::MetaDataVisitor::visitOperation(const OperationPtr& p)
bool ami = false;
ClassDefPtr cl = ClassDefPtr::dynamicCast(p->container());
- if(cl->hasMetaData("ami") || p->hasMetaData("ami") || cl->hasMetaData("amd") || p->hasMetaData("amd"))
+ if(cl->hasMetaData("amd") || p->hasMetaData("amd"))
{
ami = true;
}
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp
index 7f0ffd539a2..32dcf69137d 100644
--- a/cpp/src/slice2cs/Gen.cpp
+++ b/cpp/src/slice2cs/Gen.cpp
@@ -4803,28 +4803,6 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
_out << sp;
_out << nl << retS << " end_" << p->name() << spar << getParamsAsyncCB(p, true) << "Ice.AsyncResult r__" << epar
<< ';';
-
- if(cl->hasMetaData("ami") || p->hasMetaData("ami"))
- {
- vector<string> paramsAMI = getParamsAsync(p, false);
-
- //
- // Write two versions of the operation - with and without a
- // context parameter.
- //
- _out << sp;
- if(!deprecateReason.empty())
- {
- _out << nl << "[_System.Obsolete(\"" << deprecateReason << "\")]";
- }
- _out << nl << "bool " << p->name() << "_async" << spar << paramsAMI << epar << ';';
- if(!deprecateReason.empty())
- {
- _out << nl << "[_System.Obsolete(\"" << deprecateReason << "\")]";
- }
- _out << nl << "bool " << p->name() << "_async" << spar << paramsAMI
- << "_System.Collections.Generic.Dictionary<string, string> ctx__" << epar << ';';
- }
}
Slice::Gen::AsyncDelegateVisitor::AsyncDelegateVisitor(IceUtilInternal::Output& out)
@@ -5516,89 +5494,6 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << eb;
_out << eb;
}
-
- //
- // Old AMI mapping.
- //
- if(containingClass->hasMetaData("ami") || op->hasMetaData("ami"))
- {
- vector<string> paramsAMI = getParamsAsync(op, false);
- vector<string> argsAMI = getArgsAsync(op);
- vector<string> argsNewAMI = getArgsAsync(op, true);
-
- string opName = op->name();
- string flatName = "__" + opName + "_name";
-
- //
- // Write two versions of the operation - with and without a
- // context parameter
- //
- _out << sp;
- writeDocCommentAsync(op, InParam);
- _out << nl << "public bool " << opName << "_async" << spar << paramsAMI << epar;
- _out << sb;
- if(op->returnsData())
- {
- _out << nl << "Ice.AsyncResult<" << delType << "> result__;";
- _out << nl << "try";
- _out << sb;
- _out << nl << "checkTwowayOnly__(" << flatName << ");";
- _out << nl << "result__ = begin_" << opName << spar << argsNewAMI << epar << ";";
- _out << eb;
- _out << nl << "catch(Ice.TwowayOnlyException ex)";
- _out << sb;
- _out << nl << "result__ = new IceInternal.TwowayOutgoingAsync<" << delType << ">(this, "
- << flatName << ", " << op->name() << "_completed__, null);";
- _out << nl << "((IceInternal.OutgoingAsyncBase)result__).invokeExceptionAsync(ex);";
- _out << eb;
- }
- else
- {
- _out << nl << "Ice.AsyncResult<" << delType << "> result__ = begin_" << opName << spar << argsNewAMI
- << epar << ";";
- }
- _out << nl << "result__.whenCompleted(cb__.response__, cb__.exception__);";
- _out << nl << "if(cb__ is Ice.AMISentCallback)";
- _out << sb;
- _out << nl << "result__.whenSent((Ice.AsyncCallback)cb__.sent__);";
- _out << eb;
- _out << nl << "return result__.sentSynchronously();";
- _out << eb;
-
- _out << sp;
- writeDocCommentAsync(op, InParam,
- "<param name=\"ctx__\">The Context map to send with the invocation.</param>");
- _out << nl << "public bool " << opName << "_async" << spar << paramsAMI
- << "_System.Collections.Generic.Dictionary<string, string> ctx__" << epar;
- _out << sb;
- if(op->returnsData())
- {
- _out << nl << "Ice.AsyncResult<" << delType << "> result__;";
- _out << nl << "try";
- _out << sb;
- _out << nl << "checkTwowayOnly__(" << flatName << ");";
- _out << nl << "result__ = begin_" << opName << spar << argsNewAMI << "ctx__" << epar << ";";
- _out << eb;
- _out << nl << "catch(Ice.TwowayOnlyException ex)";
- _out << sb;
- _out << nl << "result__ = new IceInternal.TwowayOutgoingAsync<" << delType << ">(this, "
- << flatName << ", " << op->name() << "_completed__, null);";
- _out << nl << "((IceInternal.OutgoingAsyncBase)result__).invokeExceptionAsync(ex);";
- _out << eb;
- }
- else
- {
- _out << nl << "Ice.AsyncResult<" << delType << "> result__ = begin_" << opName << spar << argsNewAMI
- << "ctx__" << epar << ";";
- }
- _out << nl << "result__.whenCompleted(cb__.response__, cb__.exception__);";
- _out << nl << "if(cb__ is Ice.AMISentCallback)";
- _out << sb;
- _out << nl << "result__.whenSent((Ice.AsyncCallback)cb__.sent__);";
- _out << eb;
- _out << nl << "return result__.sentSynchronously();";
- _out << eb;
- }
}
_out << sp << nl << "#endregion"; // Asynchronous operations
@@ -6294,30 +6189,6 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
string name = p->name();
- if(cl->hasMetaData("ami") || p->hasMetaData("ami"))
- {
- vector<string> params = getParamsAsyncCB(p);
- vector<string> args = getArgsAsyncCB(p);
-
- _out << sp;
- writeDocCommentOp(p);
- emitComVisibleAttribute();
- emitGeneratedCodeAttribute();
- _out << nl << "public abstract class AMI_" << cl->name() << '_' << name << " : Ice.AMICallbackBase";
- _out << sb;
- _out << sp;
- writeDocCommentAsync(p, OutParam);
- _out << nl << "public abstract void ice_response" << spar << params << epar << ';';
-
- _out << sp;
- _out << nl << "public void response__" << spar << params << epar;
- _out << sb;
- _out << nl << "ice_response" << spar << args << epar << ';';
- _out << eb;
-
- _out << eb;
- }
-
if(cl->hasMetaData("amd") || p->hasMetaData("amd"))
{
string classNameAMD = "AMD_" + cl->name();
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index 9889c96a214..cc397c26b6f 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -4913,73 +4913,6 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
out << eb;
}
-
- if(cl->hasMetaData("ami") || op->hasMetaData("ami"))
- {
- vector<string> paramsAMI = getParamsAsync(op, package, false, true);
- vector<string> argsAMI = getInOutArgs(op, InParam);
- const string contextDoc = "@param __ctx The Context map to send with the invocation.";
-
- //
- // Write two versions of the old asynchronous operation - with and without a
- // context parameter.
- //
- out << sp;
- writeDocCommentAsync(out, op, InParam);
- out << nl << "public boolean " << op->name() << "_async" << spar << paramsAMI << epar;
- out << sb;
- if(op->returnsData())
- {
- out << nl << "Ice.AsyncResult __r;";
- out << nl << "try";
- out << sb;
- out << nl << "__checkTwowayOnly(__" << op->name() << "_name);";
- out << nl << "__r = begin_" << op->name() << spar << argsAMI << "null" << "false"
- << "false" << "__cb" << epar << ';';
- out << eb;
- out << nl << "catch(Ice.TwowayOnlyException ex)";
- out << sb;
- out << nl << "IceInternal.OutgoingAsync __r2 = getOutgoingAsync(__" << op->name() << "_name, __cb);";
- out << nl << "__r = __r2;";
- out << nl << "__r2.invokeExceptionAsync(ex);";
- out << eb;
- }
- else
- {
- out << nl << "Ice.AsyncResult __r = begin_" << op->name() << spar << argsAMI << "null" << "false"
- << "false" << "__cb" << epar << ';';
- }
- out << nl << "return __r.sentSynchronously();";
- out << eb;
-
- out << sp;
- writeDocCommentAsync(out, op, InParam, contextDoc);
- out << nl << "public boolean " << op->name() << "_async" << spar << paramsAMI << contextParam << epar;
- out << sb;
- if(op->returnsData())
- {
- out << nl << "Ice.AsyncResult __r;";
- out << nl << "try";
- out << sb;
- out << nl << "__checkTwowayOnly(__" << op->name() << "_name);";
- out << nl << "__r = begin_" << op->name() << spar << argsAMI << "__ctx" << "true"
- << "false" << "__cb" << epar << ';';
- out << eb;
- out << nl << "catch(Ice.TwowayOnlyException ex)";
- out << sb;
- out << nl << "IceInternal.OutgoingAsync __r2 = getOutgoingAsync(__" << op->name() << "_name, __cb);";
- out << nl << "__r = __r2;";
- out << nl << "__r2.invokeExceptionAsync(ex);";
- out << eb;
- }
- else
- {
- out << nl << "Ice.AsyncResult __r = begin_" << op->name() << spar << argsAMI << "__ctx" << "true"
- << "false" << "__cb" << epar << ';';
- }
- out << nl << "return __r.sentSynchronously();";
- out << eb;
- }
}
out << sp << nl << "public static " << name << "Prx checkedCast(Ice.ObjectPrx __obj)";
@@ -6090,22 +6023,6 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
out << nl << "public Ice.AsyncResult begin_" << p->name() << spar << inParams << contextParam
<< typeSafeCallbackParam << epar << ';';
}
-
- if(cl->hasMetaData("ami") || p->hasMetaData("ami"))
- {
- vector<string> paramsAMI = getParamsAsync(p, package, false, true);
-
- //
- // Write two versions of the operation - with and without a
- // context parameter.
- //
- out << sp;
- writeDocCommentAsync(out, p, InParam);
- out << nl << "public boolean " << p->name() << "_async" << spar << paramsAMI << epar << ';';
- out << sp;
- writeDocCommentAsync(out, p, InParam, contextDoc);
- out << nl << "public boolean " << p->name() << "_async" << spar << paramsAMI << contextParam << epar << ';';
- }
}
Slice::Gen::DispatcherVisitor::DispatcherVisitor(const string& dir, bool stream) :
@@ -6663,79 +6580,6 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
close();
}
- if(cl->hasMetaData("ami") || p->hasMetaData("ami"))
- {
- string baseClass = "Callback_" + cl->name() + "_" + name;
- string classNameAMI = "AMI_" + cl->name();
- string absoluteAMI = getAbsolute(cl, "", "AMI_", "_" + name);
-
- open(absoluteAMI, p->file());
-
- Output& out = output();
-
- TypePtr ret = p->returnType();
-
- ExceptionList throws = p->throws();
-
- vector<string> params = getParamsAsyncCB(p, classPkg, false, true);
- vector<string> args = getInOutArgs(p, OutParam);
-
- writeDocCommentOp(out, p);
- out << sp << nl << "public abstract class " << classNameAMI << '_' << name
- << " extends " << baseClass;
- out << sb;
- out << sp;
- writeDocCommentAsync(out, p, OutParam);
- out << nl << "public abstract void ice_response" << spar << params << epar << ';';
- out << sp << nl << "/**";
- out << nl << " * ice_exception indicates to the caller that";
- out << nl << " * the operation completed with an exception.";
- out << nl << " * @param ex The Ice run-time exception to be raised.";
- out << nl << " **/";
- out << nl << "public abstract void ice_exception(Ice.LocalException ex);";
- if(!throws.empty())
- {
- out << sp << nl << "/**";
- out << nl << " * ice_exception indicates to the caller that";
- out << nl << " * the operation completed with an exception.";
- out << nl << " * @param ex The user exception to be raised.";
- out << nl << " **/";
- out << nl << "public abstract void ice_exception(Ice.UserException ex);";
- }
-
- out << sp << nl << "public final void response" << spar << params << epar;
- out << sb;
- out << nl << "ice_response" << spar;
- if(ret)
- {
- out << "__ret";
- }
- out << args << epar << ';';
- out << eb;
- if(!throws.empty())
- {
- out << sp << nl << "public final void exception(Ice.UserException __ex)";
- out << sb;
- out << nl << "ice_exception(__ex);";
- out << eb;
- }
- out << sp << nl << "public final void exception(Ice.LocalException __ex)";
- out << sb;
- out << nl << "ice_exception(__ex);";
- out << eb;
- out << sp << nl << "@Override public final void sent(boolean sentSynchronously)";
- out << sb;
- out << nl << "if(!sentSynchronously && this instanceof Ice.AMISentCallback)";
- out << sb;
- out << nl << "((Ice.AMISentCallback)this).ice_sent();";
- out << eb;
- out << eb;
-
- out << eb;
-
- close();
- }
-
if(cl->hasMetaData("amd") || p->hasMetaData("amd"))
{
string classNameAMD = "AMD_" + cl->name();
diff --git a/cpp/test/Ice/custom/AllTests.cpp b/cpp/test/Ice/custom/AllTests.cpp
index 32a8c7c93be..0dd933cd77a 100644
--- a/cpp/test/Ice/custom/AllTests.cpp
+++ b/cpp/test/Ice/custom/AllTests.cpp
@@ -83,1006 +83,6 @@ private:
bool _called;
};
-class AMI_TestIntf_opDoubleArrayI : public Test::AMI_TestIntf_opDoubleArray, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opDoubleArrayI(const ::std::pair<const double*, const double*>& in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const ::std::pair<const double*, const double*>& ret,
- const ::std::pair<const double*, const double*>& out)
- {
- test(arrayRangeEquals<double>(out, _in));
- test(arrayRangeEquals<double>(ret, _in));
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- const ::std::pair<const double*, const double*> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opDoubleArrayI> AMI_TestIntf_opDoubleArrayIPtr;
-
-class AMI_TestIntf_opBoolArrayI : public Test::AMI_TestIntf_opBoolArray, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opBoolArrayI(const ::std::pair<const bool*, const bool*>& in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const ::std::pair<const bool*, const bool*>& ret,
- const ::std::pair<const bool*, const bool*>& out)
- {
- test(arrayRangeEquals<bool>(out, _in));
- test(arrayRangeEquals<bool>(ret, _in));
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- const ::std::pair<const bool*, const bool*> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opBoolArrayI> AMI_TestIntf_opBoolArrayIPtr;
-
-class AMI_TestIntf_opByteArrayI : public Test::AMI_TestIntf_opByteArray, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opByteArrayI(const pair<const Ice::Byte*, const Ice::Byte*>& in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const pair<const Ice::Byte*, const Ice::Byte*>& ret,
- const pair<const Ice::Byte*, const Ice::Byte*>& out)
- {
- test(arrayRangeEquals<Ice::Byte>(out, _in));
- test(arrayRangeEquals<Ice::Byte>(ret, _in));
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- pair<const Ice::Byte*, const Ice::Byte*> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opByteArrayI> AMI_TestIntf_opByteArrayIPtr;
-
-class AMI_TestIntf_opVariableArrayI : public Test::AMI_TestIntf_opVariableArray, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opVariableArrayI(pair<const Test::Variable*, const Test::Variable*> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const pair<const Test::Variable*, const Test::Variable*>& ret,
- const pair<const Test::Variable*, const Test::Variable*>& out)
- {
- test(arrayRangeEquals<Test::Variable>(out, _in));
- test(arrayRangeEquals<Test::Variable>(ret, _in));
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- pair<const Test::Variable*, const Test::Variable*> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opVariableArrayI> AMI_TestIntf_opVariableArrayIPtr;
-
-class AMI_TestIntf_opBoolRangeI : public Test::AMI_TestIntf_opBoolRange, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opBoolRangeI(pair<Test::BoolSeq::const_iterator, Test::BoolSeq::const_iterator> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const pair<Test::BoolSeq::const_iterator, Test::BoolSeq::const_iterator>& ret,
- const pair<Test::BoolSeq::const_iterator, Test::BoolSeq::const_iterator>& out)
- {
- test(equal(out.first, out.second, _in.first));
- test(equal(ret.first, ret.second, _in.first));
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- pair<Test::BoolSeq::const_iterator, Test::BoolSeq::const_iterator> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opBoolRangeI> AMI_TestIntf_opBoolRangeIPtr;
-
-class AMI_TestIntf_opByteRangeI : public Test::AMI_TestIntf_opByteRange, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opByteRangeI(const pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator>& in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator>& ret,
- const pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator>& out)
- {
- test(equal(out.first, out.second, _in.first));
- test(equal(ret.first, ret.second, _in.first));
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opByteRangeI> AMI_TestIntf_opByteRangeIPtr;
-
-class AMI_TestIntf_opVariableRangeI : public Test::AMI_TestIntf_opVariableRange, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opVariableRangeI(const pair<Test::VariableList::const_iterator,
- Test::VariableList::const_iterator>& in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const pair<Test::VariableList::const_iterator, Test::VariableList::const_iterator>& ret,
- const pair<Test::VariableList::const_iterator, Test::VariableList::const_iterator>& out)
- {
- test(equal(out.first, out.second, _in.first));
- test(equal(ret.first, ret.second, _in.first));
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- pair<Test::VariableList::const_iterator, Test::VariableList::const_iterator> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opVariableRangeI> AMI_TestIntf_opVariableRangeIPtr;
-
-class AMI_TestIntf_opBoolRangeTypeI : public Test::AMI_TestIntf_opBoolRangeType, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opBoolRangeTypeI(const pair<const bool*, const bool*>& in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const pair<const bool*, const bool*>& ret,
- const pair<const bool*, const bool*>& out)
- {
- test(arrayRangeEquals<bool>(out, _in));
- test(arrayRangeEquals<bool>(ret, _in));
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- pair<const bool*, const bool*> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opBoolRangeTypeI> AMI_TestIntf_opBoolRangeTypeIPtr;
-
-class AMI_TestIntf_opByteRangeTypeI : public Test::AMI_TestIntf_opByteRangeType, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opByteRangeTypeI(const pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator>& in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator>& ret,
- const pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator>& out)
- {
- test(equal(out.first, out.second, _in.first));
- test(equal(ret.first, ret.second, _in.first));
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opByteRangeTypeI> AMI_TestIntf_opByteRangeTypeIPtr;
-
-class AMI_TestIntf_opVariableRangeTypeI : public Test::AMI_TestIntf_opVariableRangeType, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opVariableRangeTypeI(const pair<deque<Test::Variable>::const_iterator,
- deque<Test::Variable>::const_iterator>& in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const pair<deque<Test::Variable>::const_iterator,
- deque<Test::Variable>::const_iterator>& ret,
- const pair<deque<Test::Variable>::const_iterator,
- deque<Test::Variable>::const_iterator>& out)
- {
- test(equal(out.first, out.second, _in.first));
- test(equal(ret.first, ret.second, _in.first));
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- pair<deque<Test::Variable>::const_iterator, deque<Test::Variable>::const_iterator> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opVariableRangeTypeI> AMI_TestIntf_opVariableRangeTypeIPtr;
-
-class AMI_TestIntf_opBoolSeqI : public Test::AMI_TestIntf_opBoolSeq, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opBoolSeqI(deque<bool> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const deque<bool>& ret, const deque<bool>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- deque<bool> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opBoolSeqI> AMI_TestIntf_opBoolSeqIPtr;
-
-class AMI_TestIntf_opBoolListI : public Test::AMI_TestIntf_opBoolList, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opBoolListI(list<bool> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const list<bool>& ret, const list<bool>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- list<bool> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opBoolListI> AMI_TestIntf_opBoolListIPtr;
-
-class AMI_TestIntf_opByteSeqI : public Test::AMI_TestIntf_opByteSeq, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opByteSeqI(deque<Ice::Byte> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const deque<Ice::Byte>& ret, const deque<Ice::Byte>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- deque<Ice::Byte> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opByteSeqI> AMI_TestIntf_opByteSeqIPtr;
-
-class AMI_TestIntf_opByteListI : public Test::AMI_TestIntf_opByteList, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opByteListI(list<Ice::Byte> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const list<Ice::Byte>& ret, const list<Ice::Byte>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- list<Ice::Byte> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opByteListI> AMI_TestIntf_opByteListIPtr;
-
-class AMI_TestIntf_opMyByteSeqI : public Test::AMI_TestIntf_opMyByteSeq, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opMyByteSeqI(MyByteSeq in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const MyByteSeq& ret, const MyByteSeq& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- MyByteSeq _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opMyByteSeqI> AMI_TestIntf_opMyByteSeqIPtr;
-
-class AMI_TestIntf_opStringSeqI : public Test::AMI_TestIntf_opStringSeq, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opStringSeqI(deque<string> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const deque<string>& ret, const deque<string>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- deque<string> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opStringSeqI> AMI_TestIntf_opStringSeqIPtr;
-
-class AMI_TestIntf_opStringListI : public Test::AMI_TestIntf_opStringList, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opStringListI(list<string> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const list<string>& ret, const list<string>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- list<string> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opStringListI> AMI_TestIntf_opStringListIPtr;
-
-class AMI_TestIntf_opFixedSeqI : public Test::AMI_TestIntf_opFixedSeq, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opFixedSeqI(deque<Test::Fixed> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const deque<Test::Fixed>& ret, const deque<Test::Fixed>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- deque<Test::Fixed> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opFixedSeqI> AMI_TestIntf_opFixedSeqIPtr;
-
-class AMI_TestIntf_opFixedListI : public Test::AMI_TestIntf_opFixedList, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opFixedListI(list<Test::Fixed> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const list<Test::Fixed>& ret, const list<Test::Fixed>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- list<Test::Fixed> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opFixedListI> AMI_TestIntf_opFixedListIPtr;
-
-class AMI_TestIntf_opVariableSeqI : public Test::AMI_TestIntf_opVariableSeq, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opVariableSeqI(deque<Test::Variable> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const deque<Test::Variable>& ret, const deque<Test::Variable>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- deque<Test::Variable> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opVariableSeqI> AMI_TestIntf_opVariableSeqIPtr;
-
-class AMI_TestIntf_opVariableListI : public Test::AMI_TestIntf_opVariableList, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opVariableListI(list<Test::Variable> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const list<Test::Variable>& ret, const list<Test::Variable>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- list<Test::Variable> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opVariableListI> AMI_TestIntf_opVariableListIPtr;
-
-class AMI_TestIntf_opStringStringDictSeqI : public Test::AMI_TestIntf_opStringStringDictSeq, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opStringStringDictSeqI(deque<Test::StringStringDict> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const deque<Test::StringStringDict>& ret, const deque<Test::StringStringDict>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- deque<Test::StringStringDict> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opStringStringDictSeqI> AMI_TestIntf_opStringStringDictSeqIPtr;
-
-class AMI_TestIntf_opStringStringDictListI : public Test::AMI_TestIntf_opStringStringDictList, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opStringStringDictListI(list<Test::StringStringDict> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const list<Test::StringStringDict>& ret, const list<Test::StringStringDict>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- list<Test::StringStringDict> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opStringStringDictListI> AMI_TestIntf_opStringStringDictListIPtr;
-
-class AMI_TestIntf_opESeqI : public Test::AMI_TestIntf_opESeq, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opESeqI(deque<Test::E> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const deque<Test::E>& ret, const deque<Test::E>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- deque<Test::E> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opESeqI> AMI_TestIntf_opESeqIPtr;
-
-class AMI_TestIntf_opEListI : public Test::AMI_TestIntf_opEList, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opEListI(list<Test::E> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const list<Test::E>& ret, const list<Test::E>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- list<Test::E> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opEListI> AMI_TestIntf_opEListIPtr;
-
-class AMI_TestIntf_opCPrxSeqI : public Test::AMI_TestIntf_opCPrxSeq, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opCPrxSeqI(deque<Test::CPrx> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const deque<Test::CPrx>& ret, const deque<Test::CPrx>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- deque<Test::CPrx> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opCPrxSeqI> AMI_TestIntf_opCPrxSeqIPtr;
-
-class AMI_TestIntf_opCPrxListI : public Test::AMI_TestIntf_opCPrxList, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opCPrxListI(list<Test::CPrx> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const list<Test::CPrx>& ret, const list<Test::CPrx>& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- list<Test::CPrx> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opCPrxListI> AMI_TestIntf_opCPrxListIPtr;
-
-class AMI_TestIntf_opCSeqI : public Test::AMI_TestIntf_opCSeq, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opCSeqI(deque<Test::CPtr> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const deque<Test::CPtr>& ret, const deque<Test::CPtr>& out)
- {
- test(out.size() == _in.size());
- test(ret.size() == _in.size());
- for(unsigned int i = 1; i < _in.size(); ++i)
- {
- test(out[i] == out[0]);
- test(ret[i] == out[i]);
- }
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- deque<Test::CPtr> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opCSeqI> AMI_TestIntf_opCSeqIPtr;
-
-class AMI_TestIntf_opCListI : public Test::AMI_TestIntf_opCList, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opCListI(list<Test::CPtr> in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const list<Test::CPtr>& ret, const list<Test::CPtr>& out)
- {
- test(out.size() == _in.size());
- test(ret.size() == _in.size());
- list<Test::CPtr>::const_iterator p1;
- list<Test::CPtr>::const_iterator p2;
- for(p1 = out.begin(), p2 = ret.begin(); p1 != out.end(); ++p1, ++p2)
- {
- test(*p1 == *p2);
- }
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- list<Test::CPtr> _in;
-};
-
-typedef IceUtil::Handle<AMI_TestIntf_opCListI> AMI_TestIntf_opCListIPtr;
-
-class AMI_TestIntf_opClassStructI : public Test::AMI_TestIntf_opClassStruct, public CallbackBase
-{
-public:
-
- AMI_TestIntf_opClassStructI(const Test::ClassStructPtr& cs, const Test::ClassStructSeq& csseq1) :
- _cs(cs), _csseq1(csseq1)
- {
- }
-
- virtual void ice_response(const ::Test::ClassStructPtr& ret,
- const ::Test::ClassStructPtr& cs1,
- const ::Test::ClassStructSeq& seq)
- {
- test(ret == _cs);
- test(cs1 == _cs);
- test(seq == _csseq1);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- const Test::ClassStructPtr _cs;
- const Test::ClassStructSeq _csseq1;
-};
-typedef IceUtil::Handle<AMI_TestIntf_opClassStructI> AMI_TestIntf_opClassStructIPtr;
-
-class AMI_Test1_opStringI : public Test1::AMI_WstringClass_opString, public CallbackBase
-{
-public:
-
- AMI_Test1_opStringI(wstring in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const wstring& ret, const wstring& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- wstring _in;
-};
-
-typedef IceUtil::Handle<AMI_Test1_opStringI> AMI_Test1_opStringIPtr;
-
-class AMI_Test2_opStringI : public Test2::AMI_WstringClass_opString, public CallbackBase
-{
-public:
-
- AMI_Test2_opStringI(wstring in)
- : _in(in)
- {
- }
-
- virtual void ice_response(const wstring& ret, const wstring& out)
- {
- test(out == _in);
- test(ret == _in);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- wstring _in;
-};
-
-typedef IceUtil::Handle<AMI_Test2_opStringI> AMI_Test2_opStringIPtr;
-
-class AMI_Test1_throwExceptI : public Test1::AMI_WstringClass_throwExcept, public CallbackBase
-{
-public:
-
- AMI_Test1_throwExceptI(wstring in)
- : _in(in)
- {
- }
-
- virtual void ice_response()
- {
- test(false);
- }
-
- virtual void ice_exception(const ::Ice::Exception& ex)
- {
- try
- {
- ex.ice_throw();
- }
- catch(const Test1::WstringException& e)
- {
- test(e.reason == _in);
- called();
- }
- catch(...)
- {
- test(false);
- }
- }
-
-private:
-
- wstring _in;
-};
-
-typedef IceUtil::Handle<AMI_Test1_throwExceptI> AMI_Test1_throwExceptIPtr;
-
-class AMI_Test2_throwExceptI : public Test2::AMI_WstringClass_throwExcept, public CallbackBase
-{
-public:
-
- AMI_Test2_throwExceptI(wstring in)
- : _in(in)
- {
- }
-
- virtual void ice_response()
- {
- test(false);
- }
-
- virtual void ice_exception(const ::Ice::Exception& ex)
- {
- try
- {
- ex.ice_throw();
- }
- catch(const Test2::WstringException& e)
- {
- test(e.reason == _in);
- called();
- }
- catch(...)
- {
- test(false);
- }
- }
-
-private:
-
- wstring _in;
-};
-
-typedef IceUtil::Handle<AMI_Test2_throwExceptI> AMI_Test2_throwExceptIPtr;
-
class InParam : public Ice::LocalObject
{
};
@@ -2227,452 +1227,8 @@ allTests(const Ice::CommunicatorPtr& communicator)
test(rs == rs2);
}
cout << "ok" << endl;
-
- cout << "testing alternate sequences with AMI... " << flush;
-
- {
- Test::DoubleSeq in(5);
- in[0] = 3.14;
- in[1] = 1 / 3;
- in[2] = 0.375;
- in[3] = 4 / 3;
- in[4] = -5.725;
- Ice::Double inArray[5];
- for(int i = 0; i < 5; ++i)
- {
- inArray[i] = in[i];
- }
- pair<const Ice::Double*, const Ice::Double*> inPair(inArray, inArray + 5);
-
- AMI_TestIntf_opDoubleArrayIPtr cb = new AMI_TestIntf_opDoubleArrayI(inPair);
- t->opDoubleArray_async(cb, inPair);
- cb->check();
- }
-
- {
- Test::BoolSeq in(5);
- in[0] = false;
- in[1] = true;
- in[2] = true;
- in[3] = false;
- in[4] = true;
- bool inArray[5];
- for(int i = 0; i < 5; ++i)
- {
- inArray[i] = in[i];
- }
- pair<const bool*, const bool*> inPair(inArray, inArray + 5);
-
- AMI_TestIntf_opBoolArrayIPtr cb = new AMI_TestIntf_opBoolArrayI(inPair);
- t->opBoolArray_async(cb, inPair);
- cb->check();
- }
-
- {
- Ice::Byte in[5];
- in[0] = '1';
- in[1] = '2';
- in[2] = '3';
- in[3] = '4';
- in[4] = '5';
- pair<const Ice::Byte*, const Ice::Byte*> inPair(in, in + 5);
-
- AMI_TestIntf_opByteArrayIPtr cb = new AMI_TestIntf_opByteArrayI(inPair);
- t->opByteArray_async(cb, inPair);
- cb->check();
- }
-
- {
- Test::VariableList in;
- Test::Variable inArray[5];
- inArray[0].s = "These";
- in.push_back(inArray[0]);
- inArray[1].s = "are";
- in.push_back(inArray[1]);
- inArray[2].s = "five";
- in.push_back(inArray[2]);
- inArray[3].s = "short";
- in.push_back(inArray[3]);
- inArray[4].s = "strings.";
- in.push_back(inArray[4]);
- pair<const Test::Variable*, const Test::Variable*> inPair(inArray, inArray + 5);
-
- AMI_TestIntf_opVariableArrayIPtr cb = new AMI_TestIntf_opVariableArrayI(inPair);
- t->opVariableArray_async(cb, inPair);
- cb->check();
- }
-
- {
- Test::BoolSeq in(5);
- in[0] = false;
- in[1] = true;
- in[2] = true;
- in[3] = false;
- in[4] = true;
- pair<Test::BoolSeq::const_iterator, Test::BoolSeq::const_iterator> inPair(in.begin(), in.end());
-
- AMI_TestIntf_opBoolRangeIPtr cb = new AMI_TestIntf_opBoolRangeI(inPair);
- t->opBoolRange_async(cb, inPair);
- cb->check();
- }
-
- {
- Test::ByteList in;
- in.push_back('1');
- in.push_back('2');
- in.push_back('3');
- in.push_back('4');
- in.push_back('5');
- pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator> inPair(in.begin(), in.end());
-
- AMI_TestIntf_opByteRangeIPtr cb = new AMI_TestIntf_opByteRangeI(inPair);
- t->opByteRange_async(cb, inPair);
- cb->check();
- }
-
- {
- Test::VariableList in;
- Test::Variable v;
- v.s = "These";
- in.push_back(v);
- v.s = "are";
- in.push_back(v);
- v.s = "five";
- in.push_back(v);
- v.s = "short";
- in.push_back(v);
- v.s = "strings.";
- in.push_back(v);
- pair<Test::VariableList::const_iterator, Test::VariableList::const_iterator> inPair(in.begin(), in.end());
-
- AMI_TestIntf_opVariableRangeIPtr cb = new AMI_TestIntf_opVariableRangeI(inPair);
- t->opVariableRange_async(cb, inPair);
- cb->check();
- }
-
- {
- Test::BoolSeq in(5);
- in[0] = false;
- in[1] = true;
- in[2] = true;
- in[3] = false;
- in[4] = true;
- bool inArray[5];
- for(int i = 0; i < 5; ++i)
- {
- inArray[i] = in[i];
- }
- pair<const bool*, const bool*> inPair(inArray, inArray + 5);
-
- AMI_TestIntf_opBoolRangeTypeIPtr cb = new AMI_TestIntf_opBoolRangeTypeI(inPair);
- t->opBoolRangeType_async(cb, inPair);
- cb->check();
- }
-
- {
- Test::ByteList in;
- in.push_back('1');
- in.push_back('2');
- in.push_back('3');
- in.push_back('4');
- in.push_back('5');
- pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator> inPair(in.begin(), in.end());
-
- AMI_TestIntf_opByteRangeTypeIPtr cb = new AMI_TestIntf_opByteRangeTypeI(inPair);
- t->opByteRangeType_async(cb, inPair);
- cb->check();
- }
-
- {
- Test::VariableList in;
- deque<Test::Variable> inSeq;
- Test::Variable v;
- v.s = "These";
- in.push_back(v);
- inSeq.push_back(v);
- v.s = "are";
- in.push_back(v);
- inSeq.push_back(v);
- v.s = "five";
- in.push_back(v);
- inSeq.push_back(v);
- v.s = "short";
- in.push_back(v);
- inSeq.push_back(v);
- v.s = "strings.";
- in.push_back(v);
- inSeq.push_back(v);
- pair<deque<Test::Variable>::const_iterator, deque<Test::Variable>::const_iterator> inPair(inSeq.begin(),
- inSeq.end());
-
- AMI_TestIntf_opVariableRangeTypeIPtr cb = new AMI_TestIntf_opVariableRangeTypeI(inPair);
- t->opVariableRangeType_async(cb, inPair);
- cb->check();
- }
-
- {
- deque<bool> in(5);
- in[0] = false;
- in[1] = true;
- in[2] = true;
- in[3] = false;
- in[4] = true;
-
- AMI_TestIntf_opBoolSeqIPtr cb = new AMI_TestIntf_opBoolSeqI(in);
- t->opBoolSeq_async(cb, in);
- cb->check();
- }
-
- {
- list<bool> in;
- in.push_back(false);
- in.push_back(true);
- in.push_back(true);
- in.push_back(false);
- in.push_back(true);
-
- AMI_TestIntf_opBoolListIPtr cb = new AMI_TestIntf_opBoolListI(in);
- t->opBoolList_async(cb, in);
- cb->check();
- }
-
- {
- deque< ::Ice::Byte> in(5);
- in[0] = '1';
- in[1] = '2';
- in[2] = '3';
- in[3] = '4';
- in[4] = '5';
-
- AMI_TestIntf_opByteSeqIPtr cb = new AMI_TestIntf_opByteSeqI(in);
- t->opByteSeq_async(cb, in);
- cb->check();
- }
-
- {
- list< ::Ice::Byte> in;
- in.push_back('1');
- in.push_back('2');
- in.push_back('3');
- in.push_back('4');
- in.push_back('5');
-
- AMI_TestIntf_opByteListIPtr cb = new AMI_TestIntf_opByteListI(in);
- t->opByteList_async(cb, in);
- cb->check();
- }
-
- {
- MyByteSeq in(5);
- int i = 0;
- for(MyByteSeq::iterator p = in.begin(); p != in.end(); ++p)
- {
- *p = '1' + i++;
- }
-
- AMI_TestIntf_opMyByteSeqIPtr cb = new AMI_TestIntf_opMyByteSeqI(in);
- t->opMyByteSeq_async(cb, in);
- cb->check();
- }
-
- {
- deque<string> in(5);
- in[0] = "These";
- in[1] = "are";
- in[2] = "five";
- in[3] = "short";
- in[4] = "strings.";
-
- AMI_TestIntf_opStringSeqIPtr cb = new AMI_TestIntf_opStringSeqI(in);
- t->opStringSeq_async(cb, in);
- cb->check();
- }
-
- {
- list<string> in;
- in.push_back("These");
- in.push_back("are");
- in.push_back("five");
- in.push_back("short");
- in.push_back("strings.");
-
- AMI_TestIntf_opStringListIPtr cb = new AMI_TestIntf_opStringListI(in);
- t->opStringList_async(cb, in);
- cb->check();
- }
-
- {
- deque<Test::Fixed> in(5);
- in[0].s = 1;
- in[1].s = 2;
- in[2].s = 3;
- in[3].s = 4;
- in[4].s = 5;
-
- AMI_TestIntf_opFixedSeqIPtr cb = new AMI_TestIntf_opFixedSeqI(in);
- t->opFixedSeq_async(cb, in);
- cb->check();
- }
-
- {
- list<Test::Fixed> in(5);
- short num = 1;
- for(list<Test::Fixed>::iterator p = in.begin(); p != in.end(); ++p)
- {
- (*p).s = num++;
- }
-
- AMI_TestIntf_opFixedListIPtr cb = new AMI_TestIntf_opFixedListI(in);
- t->opFixedList_async(cb, in);
- cb->check();
- }
-
- {
- deque<Test::Variable> in(5);
- in[0].s = "These";
- in[1].s = "are";
- in[2].s = "five";
- in[3].s = "short";
- in[4].s = "strings.";
-
- AMI_TestIntf_opVariableSeqIPtr cb = new AMI_TestIntf_opVariableSeqI(in);
- t->opVariableSeq_async(cb, in);
- cb->check();
- }
-
- {
- list<Test::Variable> in;
- Test::Variable v;
- v.s = "These";
- in.push_back(v);
- v.s = "are";
- in.push_back(v);
- v.s = "five";
- in.push_back(v);
- v.s = "short";
- in.push_back(v);
- v.s = "strings.";
- in.push_back(v);
-
- AMI_TestIntf_opVariableListIPtr cb = new AMI_TestIntf_opVariableListI(in);
- t->opVariableList_async(cb, in);
- cb->check();
- }
-
- {
- deque<Test::StringStringDict> in(5);
- in[0]["A"] = "a";
- in[1]["B"] = "b";
- in[2]["C"] = "c";
- in[3]["D"] = "d";
- in[4]["E"] = "e";
-
- AMI_TestIntf_opStringStringDictSeqIPtr cb = new AMI_TestIntf_opStringStringDictSeqI(in);
- t->opStringStringDictSeq_async(cb, in);
- cb->check();
- }
-
- {
- list<Test::StringStringDict> in;
- Test::StringStringDict ssd;
- ssd["A"] = "a";
- in.push_back(ssd);
- ssd["B"] = "b";
- in.push_back(ssd);
- ssd["C"] = "c";
- in.push_back(ssd);
- ssd["D"] = "d";
- in.push_back(ssd);
- ssd["E"] = "e";
- in.push_back(ssd);
-
- AMI_TestIntf_opStringStringDictListIPtr cb = new AMI_TestIntf_opStringStringDictListI(in);
- t->opStringStringDictList_async(cb, in);
- cb->check();
- }
-
- {
- deque<Test::E> in(5);
- in[0] = Test::E1;
- in[1] = Test::E2;
- in[2] = Test::E3;
- in[3] = Test::E1;
- in[4] = Test::E3;
-
- AMI_TestIntf_opESeqIPtr cb = new AMI_TestIntf_opESeqI(in);
- t->opESeq_async(cb, in);
- cb->check();
- }
-
- {
- list<Test::E> in;
- in.push_back(Test::E1);
- in.push_back(Test::E2);
- in.push_back(Test::E3);
- in.push_back(Test::E1);
- in.push_back(Test::E3);
-
- AMI_TestIntf_opEListIPtr cb = new AMI_TestIntf_opEListI(in);
- t->opEList_async(cb, in);
- cb->check();
- }
-
- {
- deque<Test::CPrx> in(5);
- in[0] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C1:default -p 12010 -t 10000"));
- in[1] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C2:default -p 12010 -t 10001"));
- in[2] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C3:default -p 12010 -t 10002"));
- in[3] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C4:default -p 12010 -t 10003"));
- in[4] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C5:default -p 12010 -t 10004"));
-
- AMI_TestIntf_opCPrxSeqIPtr cb = new AMI_TestIntf_opCPrxSeqI(in);
- t->opCPrxSeq_async(cb, in);
- cb->check();
- }
-
- {
- list<Test::CPrx> in;
- in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C1:default -p 12010 -t 10000")));
- in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C2:default -p 12010 -t 10001")));
- in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C3:default -p 12010 -t 10002")));
- in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C4:default -p 12010 -t 10003")));
- in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C5:default -p 12010 -t 10004")));
-
- AMI_TestIntf_opCPrxListIPtr cb = new AMI_TestIntf_opCPrxListI(in);
- t->opCPrxList_async(cb, in);
- cb->check();
- }
-
- {
- deque<Test::CPtr> in(5);
- in[0] = new Test::C();
- in[1] = in[0];
- in[2] = in[0];
- in[3] = in[0];
- in[4] = in[0];
-
- AMI_TestIntf_opCSeqIPtr cb = new AMI_TestIntf_opCSeqI(in);
- t->opCSeq_async(cb, in);
- cb->check();
- }
-
- {
- list<Test::CPtr> in;
- in.push_back(new Test::C());
- in.push_back(new Test::C());
- in.push_back(new Test::C());
- in.push_back(new Test::C());
- in.push_back(new Test::C());
-
- AMI_TestIntf_opCListIPtr cb = new AMI_TestIntf_opCListI(in);
- t->opCList_async(cb, in);
- cb->check();
- }
-
- cout << "ok" << endl;
-
- cout << "testing alternate strings with new AMI... " << flush;
+ cout << "testing alternate strings with AMI... " << flush;
{
Util::string_view in = "Hello World!";
@@ -2685,7 +1241,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
}
cout << "ok" << endl;
- cout << "testing alternate sequences with new AMI... " << flush;
+ cout << "testing alternate sequences with AMI... " << flush;
{
{
Test::DoubleSeq in(5);
@@ -4758,14 +3314,6 @@ allTests(const Ice::CommunicatorPtr& communicator)
cout << "testing class mapped structs with AMI... " << flush;
{
- AMI_TestIntf_opClassStructIPtr cb = new AMI_TestIntf_opClassStructI(cs, csseq1);
- t->opClassStruct_async(cb, cs, csseq1);
- cb->check();
- }
- cout << "ok" << endl;
-
- cout << "testing class mapped structs with new AMI... " << flush;
- {
Test::ClassStructPtr cs2;
Test::ClassStructSeq csseq2;
Ice::AsyncResultPtr r = t->begin_opClassStruct(cs, csseq1);
@@ -4835,11 +3383,6 @@ allTests(const Ice::CommunicatorPtr& communicator)
test(ret == wstr);
{
- AMI_Test1_opStringIPtr cb = new AMI_Test1_opStringI(wstr);
- wsc1->opString_async(cb, wstr);
- cb->check();
- }
- {
Ice::AsyncResultPtr r = wsc1->begin_opString(wstr);
wstring out;
wstring ret = wsc1->end_opString(out, r);
@@ -4873,11 +3416,6 @@ allTests(const Ice::CommunicatorPtr& communicator)
test(ret == wstr);
{
- AMI_Test2_opStringIPtr cb = new AMI_Test2_opStringI(wstr);
- wsc2->opString_async(cb, wstr);
- cb->check();
- }
- {
Ice::AsyncResultPtr r = wsc2->begin_opString(wstr);
wstring out;
wstring ret = wsc2->end_opString(out, r);
@@ -4936,11 +3474,6 @@ allTests(const Ice::CommunicatorPtr& communicator)
}
{
- AMI_Test1_throwExceptIPtr cb = new AMI_Test1_throwExceptI(wstr);
- wsc1->throwExcept_async(cb, wstr);
- cb->check();
- }
- {
Ice::AsyncResultPtr r = wsc1->begin_throwExcept(wstr);
try
{
@@ -4979,11 +3512,6 @@ allTests(const Ice::CommunicatorPtr& communicator)
}
{
- AMI_Test2_throwExceptIPtr cb = new AMI_Test2_throwExceptI(wstr);
- wsc2->throwExcept_async(cb, wstr);
- cb->check();
- }
- {
Ice::AsyncResultPtr r = wsc2->begin_throwExcept(wstr);
try
{
diff --git a/cpp/test/Ice/custom/Test.ice b/cpp/test/Ice/custom/Test.ice
index 30926c6542e..4a3a79a5e67 100644
--- a/cpp/test/Ice/custom/Test.ice
+++ b/cpp/test/Ice/custom/Test.ice
@@ -138,7 +138,7 @@ class DictClass
DoubleBuffer doubleBuf;
};
-["ami"] class TestIntf
+class TestIntf
{
["cpp:array"] DoubleSeq opDoubleArray(["cpp:array"] DoubleSeq inSeq, out ["cpp:array"] DoubleSeq outSeq);
diff --git a/cpp/test/Ice/custom/TestAMD.ice b/cpp/test/Ice/custom/TestAMD.ice
index 2047de07e15..044b897deca 100644
--- a/cpp/test/Ice/custom/TestAMD.ice
+++ b/cpp/test/Ice/custom/TestAMD.ice
@@ -136,7 +136,7 @@ struct BufferStruct
DoubleBuffer doubleBuf;
};
-["amd", "ami"] class TestIntf
+["amd"] class TestIntf
{
DoubleSeq opDoubleArray(["cpp:array"] DoubleSeq inSeq, out DoubleSeq outSeq);
diff --git a/cpp/test/Ice/custom/Wstring.ice b/cpp/test/Ice/custom/Wstring.ice
index 74b5fd51f1a..01ab6ef5eac 100644
--- a/cpp/test/Ice/custom/Wstring.ice
+++ b/cpp/test/Ice/custom/Wstring.ice
@@ -26,7 +26,7 @@ exception WstringException
string reason;
};
-["ami"] class WstringClass
+class WstringClass
{
string opString(string s1, out string s2);
@@ -57,7 +57,7 @@ dictionary<["cpp:type:wstring"] string, ["cpp:type:wstring"] string> WstringWStr
string reason;
};
-["ami", "cpp:type:wstring"] class WstringClass
+["cpp:type:wstring"] class WstringClass
{
string opString(string s1, out string s2);
diff --git a/cpp/test/Ice/custom/WstringAMD.ice b/cpp/test/Ice/custom/WstringAMD.ice
index 74b27c153b0..c50f1376da3 100644
--- a/cpp/test/Ice/custom/WstringAMD.ice
+++ b/cpp/test/Ice/custom/WstringAMD.ice
@@ -26,7 +26,7 @@ exception WstringException
string reason;
};
-["amd", "ami"] class WstringClass
+["amd"] class WstringClass
{
string opString(string s1, out string s2);
@@ -57,7 +57,7 @@ dictionary<["cpp:type:wstring"] string, ["cpp:type:wstring"] string> WstringWStr
string reason;
};
-["amd", "ami", "cpp:type:wstring"] class WstringClass
+["amd", "cpp:type:wstring"] class WstringClass
{
string opString(string s1, out string s2);
diff --git a/cpp/test/Ice/exceptions/AllTests.cpp b/cpp/test/Ice/exceptions/AllTests.cpp
index 81a093f5c2c..5432ff35ee0 100644
--- a/cpp/test/Ice/exceptions/AllTests.cpp
+++ b/cpp/test/Ice/exceptions/AllTests.cpp
@@ -72,502 +72,6 @@ private:
bool _called;
};
-class AMI_Thrower_throwAasAI : public AMI_Thrower_throwAasA, public CallbackBase
-{
-public:
-
- virtual void ice_response()
- {
- test(false);
- }
-
- virtual void ice_exception(const Ice::Exception& exc)
- {
- try
- {
- exc.ice_throw();
- }
- catch(const A& ex)
- {
- test(ex.aMem == 1);
- }
- catch(...)
- {
- test(false);
- }
- called();
- }
-};
-
-typedef IceUtil::Handle<AMI_Thrower_throwAasAI> AMI_Thrower_throwAasAIPtr;
-
-class AMI_Thrower_throwAasAObjectNotExistI : public AMI_Thrower_throwAasA, public CallbackBase
-{
-public:
-
- AMI_Thrower_throwAasAObjectNotExistI(const Ice::CommunicatorPtr& communicator) :
- _communicator(communicator)
- {
- }
-
- virtual void ice_response()
- {
- test(false);
- }
-
- virtual void ice_exception(const Ice::Exception& exc)
- {
- try
- {
- exc.ice_throw();
- }
- catch(const Ice::ObjectNotExistException& ex)
- {
- Ice::Identity id = _communicator->stringToIdentity("does not exist");
- test(ex.id == id);
- }
- catch(const Ice::Exception& ex)
- {
- cerr << ex << endl;
- test(false);
- }
- catch(...)
- {
- test(false);
- }
- called();
- }
-
-private:
-
- Ice::CommunicatorPtr _communicator;
-};
-
-typedef IceUtil::Handle<AMI_Thrower_throwAasAObjectNotExistI> AMI_Thrower_throwAasAObjectNotExistIPtr;
-
-class AMI_Thrower_throwAasAFacetNotExistI : public AMI_Thrower_throwAasA, public CallbackBase
-{
-public:
-
- virtual void ice_response()
- {
- test(false);
- }
-
- virtual void ice_exception(const Ice::Exception& exc)
- {
- try
- {
- exc.ice_throw();
- }
- catch(const Ice::FacetNotExistException& ex)
- {
- test(ex.facet == "no such facet");
- }
- catch(...)
- {
- test(false);
- }
- called();
- }
-};
-
-typedef IceUtil::Handle<AMI_Thrower_throwAasAFacetNotExistI> AMI_Thrower_throwAasAFacetNotExistIPtr;
-
-class AMI_Thrower_throwAorDasAorDI : public AMI_Thrower_throwAorDasAorD, public CallbackBase
-{
-public:
-
- virtual void ice_response()
- {
- test(false);
- }
-
- virtual void ice_exception(const Ice::Exception& exc)
- {
- try
- {
- exc.ice_throw();
- }
- catch(const A& ex)
- {
- test(ex.aMem == 1);
- }
- catch(const D& ex)
- {
- test(ex.dMem == -1);
- }
- catch(...)
- {
- test(false);
- }
- called();
- }
-};
-
-typedef IceUtil::Handle<AMI_Thrower_throwAorDasAorDI> AMI_Thrower_throwAorDasAorDIPtr;
-
-class AMI_Thrower_throwBasAI : public AMI_Thrower_throwBasA, public CallbackBase
-{
-public:
-
- virtual void ice_response()
- {
- test(false);
- }
-
- virtual void ice_exception(const Ice::Exception& exc)
- {
- try
- {
- exc.ice_throw();
- }
- catch(const B& ex)
- {
- test(ex.aMem == 1);
- test(ex.bMem == 2);
- }
- catch(...)
- {
- test(false);
- }
- called();
- }
-};
-
-typedef IceUtil::Handle<AMI_Thrower_throwBasAI> AMI_Thrower_throwBasAIPtr;
-
-class AMI_Thrower_throwCasAI : public AMI_Thrower_throwCasA, public CallbackBase
-{
-public:
-
- virtual void ice_response()
- {
- test(false);
- }
-
- virtual void ice_exception(const Ice::Exception& exc)
- {
- try
- {
- exc.ice_throw();
- }
- catch(const C& ex)
- {
- test(ex.aMem == 1);
- test(ex.bMem == 2);
- test(ex.cMem == 3);
- }
- catch(...)
- {
- test(false);
- }
- called();
- }
-};
-
-typedef IceUtil::Handle<AMI_Thrower_throwCasAI> AMI_Thrower_throwCasAIPtr;
-
-class AMI_Thrower_throwBasBI : public AMI_Thrower_throwBasB, public CallbackBase
-{
-public:
-
- virtual void ice_response()
- {
- test(false);
- }
-
- virtual void ice_exception(const Ice::Exception& exc)
- {
- try
- {
- exc.ice_throw();
- }
- catch(const B& ex)
- {
- test(ex.aMem == 1);
- test(ex.bMem == 2);
- }
- catch(...)
- {
- test(false);
- }
- called();
- }
-};
-
-typedef IceUtil::Handle<AMI_Thrower_throwBasBI> AMI_Thrower_throwBasBIPtr;
-
-class AMI_Thrower_throwCasBI : public AMI_Thrower_throwCasB, public CallbackBase
-{
-public:
-
- virtual void ice_response()
- {
- test(false);
- }
-
- virtual void ice_exception(const Ice::Exception& exc)
- {
- try
- {
- exc.ice_throw();
- }
- catch(const C& ex)
- {
- test(ex.aMem == 1);
- test(ex.bMem == 2);
- test(ex.cMem == 3);
- }
- catch(...)
- {
- test(false);
- }
- called();
- }
-};
-
-typedef IceUtil::Handle<AMI_Thrower_throwCasBI> AMI_Thrower_throwCasBIPtr;
-
-class AMI_Thrower_throwCasCI : public AMI_Thrower_throwCasC, public CallbackBase
-{
-public:
-
- virtual void ice_response()
- {
- test(false);
- }
-
- virtual void ice_exception(const Ice::Exception& exc)
- {
- try
- {
- exc.ice_throw();
- }
- catch(const C& ex)
- {
- test(ex.aMem == 1);
- test(ex.bMem == 2);
- test(ex.cMem == 3);
- }
- catch(...)
- {
- test(false);
- }
- called();
- }
-};
-
-typedef IceUtil::Handle<AMI_Thrower_throwCasCI> AMI_Thrower_throwCasCIPtr;
-
-
-class AMI_Thrower_throwModAI : public AMI_Thrower_throwModA, public CallbackBase
-{
-public:
-
- virtual void ice_response()
- {
- test(false);
- }
-
- virtual void ice_exception(const Ice::Exception& exc)
- {
- try
- {
- exc.ice_throw();
- }
- catch(const Mod::A& ex)
- {
- test(ex.aMem == 1);
- test(ex.a2Mem == 2);
- }
- catch(const Ice::OperationNotExistException&)
- {
- //
- // This operation is not supported in Java.
- //
- }
- catch(...)
- {
- test(false);
- }
- called();
- }
-};
-
-typedef IceUtil::Handle<AMI_Thrower_throwModAI> AMI_Thrower_throwModAIPtr;
-
-
-
-class AMI_Thrower_throwUndeclaredAI : public AMI_Thrower_throwUndeclaredA, public CallbackBase
-{
-public:
-
- virtual void ice_response()
- {
- test(false);
- }
-
- virtual void ice_exception(const Ice::Exception& exc)
- {
- try
- {
- exc.ice_throw();
- }
- catch(const Ice::UnknownUserException&)
- {
- }
- catch(...)
- {
- test(false);
- }
- called();
- }
-};
-
-typedef IceUtil::Handle<AMI_Thrower_throwUndeclaredAI> AMI_Thrower_throwUndeclaredAIPtr;
-
-class AMI_Thrower_throwUndeclaredBI : public AMI_Thrower_throwUndeclaredB, public CallbackBase
-{
-public:
-
- virtual void ice_response()
- {
- test(false);
- }
-
- virtual void ice_exception(const Ice::Exception& exc)
- {
- try
- {
- exc.ice_throw();
- }
- catch(const Ice::UnknownUserException&)
- {
- }
- catch(...)
- {
- test(false);
- }
- called();
- }
-};
-
-typedef IceUtil::Handle<AMI_Thrower_throwUndeclaredBI> AMI_Thrower_throwUndeclaredBIPtr;
-
-class AMI_Thrower_throwUndeclaredCI : public AMI_Thrower_throwUndeclaredC, public CallbackBase
-{
-public:
-
- virtual void ice_response()
- {
- test(false);
- }
-
- virtual void ice_exception(const Ice::Exception& exc)
- {
- try
- {
- exc.ice_throw();
- }
- catch(const Ice::UnknownUserException&)
- {
- }
- catch(...)
- {
- test(false);
- }
- called();
- }
-};
-
-typedef IceUtil::Handle<AMI_Thrower_throwUndeclaredCI> AMI_Thrower_throwUndeclaredCIPtr;
-
-class AMI_Thrower_throwLocalExceptionI : public AMI_Thrower_throwLocalException, public CallbackBase
-{
-public:
-
- virtual void ice_response()
- {
- test(false);
- }
-
- virtual void ice_exception(const Ice::Exception& exc)
- {
- try
- {
- exc.ice_throw();
- }
- catch(const Ice::UnknownLocalException&)
- {
- }
- catch(...)
- {
- test(false);
- }
- called();
- }
-};
-
-typedef IceUtil::Handle<AMI_Thrower_throwLocalExceptionI> AMI_Thrower_throwLocalExceptionIPtr;
-
-class AMI_Thrower_throwNonIceExceptionI : public AMI_Thrower_throwNonIceException, public CallbackBase
-{
-public:
-
- virtual void ice_response()
- {
- test(false);
- }
-
- virtual void ice_exception(const Ice::Exception& exc)
- {
- try
- {
- exc.ice_throw();
- }
- catch(const Ice::UnknownException&)
- {
- }
- catch(...)
- {
- test(false);
- }
- called();
- }
-};
-
-typedef IceUtil::Handle<AMI_Thrower_throwNonIceExceptionI> AMI_Thrower_throwNonIceExceptionIPtr;
-
-class AMI_WrongOperation_noSuchOperationI : public AMI_WrongOperation_noSuchOperation, public CallbackBase
-{
-public:
-
- virtual void ice_response()
- {
- test(false);
- }
-
- virtual void ice_exception(const Ice::Exception& exc)
- {
- try
- {
- exc.ice_throw();
- }
- catch(const Ice::OperationNotExistException& ex)
- {
- test(ex.operation == "noSuchOperation");
- }
- catch(...)
- {
- test(false);
- }
- called();
- }
-};
-
-typedef IceUtil::Handle<AMI_WrongOperation_noSuchOperationI> AMI_WrongOperation_noSuchOperationIPtr;
-
class Callback : public CallbackBase, public IceUtil::Shared
{
public:
@@ -1540,151 +1044,6 @@ allTests(const Ice::CommunicatorPtr& communicator)
}
cout << "ok" << endl;
-
- cout << "catching exact types with AMI... " << flush;
-
- {
- AMI_Thrower_throwAasAIPtr 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_throwAorDasAorDIPtr cb = new AMI_Thrower_throwAorDasAorDI;
- thrower->throwAorDasAorD_async(cb, 1);
- cb->check();
- }
-
- {
- AMI_Thrower_throwAorDasAorDIPtr cb = new AMI_Thrower_throwAorDasAorDI;
- thrower->throwAorDasAorD_async(cb, -1);
- cb->check();
- }
-
- {
- AMI_Thrower_throwBasBIPtr cb = new AMI_Thrower_throwBasBI;
- thrower->throwBasB_async(cb, 1, 2);
- cb->check();
- }
-
- {
- AMI_Thrower_throwCasCIPtr 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();
- }
-
- {
- AMI_Thrower_throwModAIPtr cb = new AMI_Thrower_throwModAI;
- thrower->throwModA_async(cb, 1, 2);
- cb->check();
- }
-
- cout << "ok" << endl;
-
- cout << "catching derived types... " << flush;
-
- {
- AMI_Thrower_throwBasAIPtr cb = new AMI_Thrower_throwBasAI;
- thrower->throwBasA_async(cb, 1, 2);
- cb->check();
- }
-
- {
- AMI_Thrower_throwCasAIPtr cb = new AMI_Thrower_throwCasAI;
- thrower->throwCasA_async(cb, 1, 2, 3);
- cb->check();
- }
-
- {
- AMI_Thrower_throwCasBIPtr cb = new AMI_Thrower_throwCasBI;
- thrower->throwCasB_async(cb, 1, 2, 3);
- cb->check();
- }
-
- cout << "ok" << endl;
-
- if(thrower->supportsUndeclaredExceptions())
- {
- cout << "catching unknown user exception with AMI... " << flush;
-
- {
- AMI_Thrower_throwUndeclaredAIPtr cb = new AMI_Thrower_throwUndeclaredAI;
- thrower->throwUndeclaredA_async(cb, 1);
- cb->check();
- }
-
- {
- AMI_Thrower_throwUndeclaredBIPtr cb = new AMI_Thrower_throwUndeclaredBI;
- thrower->throwUndeclaredB_async(cb, 1, 2);
- cb->check();
- }
-
- {
- AMI_Thrower_throwUndeclaredCIPtr cb = new AMI_Thrower_throwUndeclaredCI;
- thrower->throwUndeclaredC_async(cb, 1, 2, 3);
- cb->check();
- }
-
- cout << "ok" << endl;
- }
-
- cout << "catching object not exist exception with AMI... " << flush;
-
- {
- id = communicator->stringToIdentity("does not exist");
- ThrowerPrx thrower2 = ThrowerPrx::uncheckedCast(thrower->ice_identity(id));
- AMI_Thrower_throwAasAObjectNotExistIPtr cb = new AMI_Thrower_throwAasAObjectNotExistI(communicator);
- thrower2->throwAasA_async(cb, 1);
- cb->check();
- }
-
- cout << "ok" << endl;
-
- cout << "catching facet not exist exception with AMI... " << flush;
-
- ThrowerPrx thrower2 = ThrowerPrx::uncheckedCast(thrower, "no such facet");
- {
- AMI_Thrower_throwAasAFacetNotExistIPtr cb = new AMI_Thrower_throwAasAFacetNotExistI;
- thrower2->throwAasA_async(cb, 1);
- cb->check();
- }
-
- cout << "ok" << endl;
-
- cout << "catching operation not exist exception with AMI... " << flush;
-
- {
- AMI_WrongOperation_noSuchOperationIPtr cb = new AMI_WrongOperation_noSuchOperationI;
- WrongOperationPrx thrower4 = WrongOperationPrx::uncheckedCast(thrower);
- thrower4->noSuchOperation_async(cb);
- cb->check();
- }
-
- cout << "ok" << endl;
-
- cout << "catching unknown local exception with AMI... " << flush;
-
- {
- AMI_Thrower_throwLocalExceptionIPtr cb = new AMI_Thrower_throwLocalExceptionI;
- thrower->throwLocalException_async(cb);
- cb->check();
- }
-
- cout << "ok" << endl;
-
- cout << "catching unknown non-Ice exception with AMI... " << flush;
-
- AMI_Thrower_throwNonIceExceptionIPtr cb = new AMI_Thrower_throwNonIceExceptionI;
- thrower->throwNonIceException_async(cb);
- cb->check();
-
- cout << "ok" << endl;
cout << "catching exact types with new AMI mapping... " << flush;
@@ -1813,8 +1172,8 @@ allTests(const Ice::CommunicatorPtr& communicator)
cout << "catching facet not exist exception with new AMI mapping... " << flush;
- thrower2 = ThrowerPrx::uncheckedCast(thrower, "no such facet");
{
+ ThrowerPrx thrower2 = ThrowerPrx::uncheckedCast(thrower, "no such facet");
CallbackPtr cb = new Callback;
Callback_Thrower_throwAasAPtr callback =
newCallback_Thrower_throwAasA(cb, &Callback::response, &Callback::exception_AasAFacetNotExist);
diff --git a/cpp/test/Ice/exceptions/Test.ice b/cpp/test/Ice/exceptions/Test.ice
index 471a30769a0..68c3559a6dc 100644
--- a/cpp/test/Ice/exceptions/Test.ice
+++ b/cpp/test/Ice/exceptions/Test.ice
@@ -70,7 +70,7 @@ module Mod
};
};
-["ami"] interface Thrower
+interface Thrower
{
void shutdown();
bool supportsUndeclaredExceptions();
@@ -100,7 +100,7 @@ module Mod
void throwAfterException() throws A;
};
-["ami"] interface WrongOperation
+interface WrongOperation
{
void noSuchOperation();
};
diff --git a/cpp/test/Ice/exceptions/TestAMD.ice b/cpp/test/Ice/exceptions/TestAMD.ice
index c59d27a0d2e..a0764371dcc 100644
--- a/cpp/test/Ice/exceptions/TestAMD.ice
+++ b/cpp/test/Ice/exceptions/TestAMD.ice
@@ -71,7 +71,7 @@ module Mod
};
-["ami", "amd"] interface Thrower
+["amd"] interface Thrower
{
void shutdown();
bool supportsUndeclaredExceptions();
@@ -106,7 +106,7 @@ module Mod
void throwH();
};
-["ami", "amd"] interface WrongOperation
+["amd"] interface WrongOperation
{
void noSuchOperation();
};
diff --git a/cpp/test/Ice/operations/AllTests.cpp b/cpp/test/Ice/operations/AllTests.cpp
index 62ca357166d..e81186f18f4 100644
--- a/cpp/test/Ice/operations/AllTests.cpp
+++ b/cpp/test/Ice/operations/AllTests.cpp
@@ -40,22 +40,11 @@ allTests(const Ice::CommunicatorPtr& communicator)
twowaysAMI(communicator, derived);
cout << "ok" << endl;
- cout << "testing twoway operations with new AMI mapping... " << flush;
- void twowaysNewAMI(const Ice::CommunicatorPtr&, const Test::MyClassPrx&);
- twowaysNewAMI(communicator, cl);
- twowaysNewAMI(communicator, derived);
- cout << "ok" << endl;
-
cout << "testing oneway operations with AMI... " << flush;
void onewaysAMI(const Ice::CommunicatorPtr&, const Test::MyClassPrx&);
onewaysAMI(communicator, cl);
cout << "ok" << endl;
- cout << "testing oneway operations with new AMI mapping... " << flush;
- void onewaysNewAMI(const Ice::CommunicatorPtr&, const Test::MyClassPrx&);
- onewaysNewAMI(communicator, cl);
- cout << "ok" << endl;
-
cout << "testing batch oneway operations... " << flush;
void batchOneways(const Test::MyClassPrx&);
batchOneways(cl);
diff --git a/cpp/test/Ice/operations/Makefile b/cpp/test/Ice/operations/Makefile
index 23db66b2101..f8e06334dc9 100644
--- a/cpp/test/Ice/operations/Makefile
+++ b/cpp/test/Ice/operations/Makefile
@@ -24,9 +24,7 @@ COBJS = Test.o \
Twoways.o \
Oneways.o \
TwowaysAMI.o \
- TwowaysNewAMI.o \
OnewaysAMI.o \
- OnewaysNewAMI.o \
BatchOneways.o \
BatchOnewaysAMI.o
@@ -45,9 +43,7 @@ COLOBJS = Test.o \
Twoways.o \
Oneways.o \
TwowaysAMI.o \
- TwowaysNewAMI.o \
OnewaysAMI.o \
- OnewaysNewAMI.o \
BatchOneways.o \
BatchOnewaysAMI.o
diff --git a/cpp/test/Ice/operations/Makefile.mak b/cpp/test/Ice/operations/Makefile.mak
index c3593a12b26..a0cebb019bb 100644
--- a/cpp/test/Ice/operations/Makefile.mak
+++ b/cpp/test/Ice/operations/Makefile.mak
@@ -33,8 +33,6 @@ COBJS = .\Test.obj \
.\Oneways.obj \
.\TwowaysAMI.obj \
.\OnewaysAMI.obj \
- .\TwowaysNewAMI.obj \
- .\OnewaysNewAMI.obj \
.\BatchOneways.obj \
.\BatchOnewaysAMI.obj
@@ -54,8 +52,6 @@ COLOBJS = .\Test.obj \
.\Oneways.obj \
.\TwowaysAMI.obj \
.\OnewaysAMI.obj \
- .\TwowaysNewAMI.obj \
- .\OnewaysNewAMI.obj \
.\BatchOneways.obj \
.\BatchOnewaysAMI.obj
diff --git a/cpp/test/Ice/operations/OnewaysAMI.cpp b/cpp/test/Ice/operations/OnewaysAMI.cpp
index a6749d69d2d..2c870f46891 100644
--- a/cpp/test/Ice/operations/OnewaysAMI.cpp
+++ b/cpp/test/Ice/operations/OnewaysAMI.cpp
@@ -10,14 +10,13 @@
#include <Ice/Ice.h>
#include <TestCommon.h>
#include <Test.h>
-#include <limits>
using namespace std;
namespace
{
-class CallbackBase : public IceUtil::Monitor<IceUtil::Mutex>
+class CallbackBase : public Ice::LocalObject
{
public:
@@ -32,10 +31,10 @@ public:
void check()
{
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
+ IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_m);
while(!_called)
{
- wait();
+ _m.wait();
}
_called = false;
}
@@ -44,147 +43,197 @@ protected:
void called()
{
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
+ IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_m);
assert(!_called);
_called = true;
- notify();
+ _m.notify();
}
private:
+ IceUtil::Monitor<IceUtil::Mutex> _m;
bool _called;
};
-class AMI_MyClass_onewayOpVoidI : public Test::AMI_MyClass_opVoid, public CallbackBase
+typedef IceUtil::Handle<CallbackBase> CallbackBasePtr;
+
+class Callback : public CallbackBase
{
public:
- virtual void ice_response()
+ Callback()
{
- called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-};
-
-typedef IceUtil::Handle<AMI_MyClass_onewayOpVoidI> AMI_MyClass_onewayOpVoidIPtr;
-
-class AMI_MyClass_onewayOpIdempotentI : public Test::AMI_MyClass_opIdempotent, public CallbackBase
-{
-public:
-
- virtual void ice_response()
+ void sent(bool)
{
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
+ void noException(const Ice::Exception&)
{
test(false);
}
};
+typedef IceUtil::Handle<Callback> CallbackPtr;
-typedef IceUtil::Handle<AMI_MyClass_onewayOpIdempotentI> AMI_MyClass_onewayOpIdempotentIPtr;
+}
-class AMI_MyClass_onewayOpNonmutatingI : public Test::AMI_MyClass_opNonmutating, public CallbackBase
+void
+onewaysAMI(const Ice::CommunicatorPtr&, const Test::MyClassPrx& proxy)
{
-public:
+ Test::MyClassPrx p = Test::MyClassPrx::uncheckedCast(proxy->ice_oneway());
- virtual void ice_response()
{
- called();
+ CallbackPtr cb = new Callback;
+ Ice::Callback_Object_ice_pingPtr callback =
+ Ice::newCallback_Object_ice_ping(cb, &Callback::noException, &Callback::sent);
+ p->begin_ice_ping(callback);
+ cb->check();
}
- virtual void ice_exception(const ::Ice::Exception&)
{
- test(false);
+ try
+ {
+ p->begin_ice_isA(Test::MyClass::ice_staticId());
+ test(false);
+ }
+ catch(const IceUtil::IllegalArgumentException&)
+ {
+ }
}
-};
-
-typedef IceUtil::Handle<AMI_MyClass_onewayOpNonmutatingI> AMI_MyClass_onewayOpNonmutatingIPtr;
-
-class AMI_MyClass_onewayOpVoidExI : public Test::AMI_MyClass_opVoid, public CallbackBase
-{
-public:
-
- virtual void ice_response()
+
{
- test(false);
+ try
+ {
+ p->begin_ice_id();
+ test(false);
+ }
+ catch(const IceUtil::IllegalArgumentException&)
+ {
+ }
}
-
- virtual void ice_exception(const ::Ice::Exception& ex)
+
{
- test(dynamic_cast<const ::Ice::NoEndpointException*>(&ex));
- called();
+ try
+ {
+ p->begin_ice_ids();
+ test(false);
+ }
+ catch(const IceUtil::IllegalArgumentException&)
+ {
+ }
}
-};
-typedef IceUtil::Handle<AMI_MyClass_onewayOpVoidExI> AMI_MyClass_onewayOpVoidExIPtr;
-
-class AMI_MyClass_onewayOpByteExI : public Test::AMI_MyClass_opByte, public CallbackBase
-{
-public:
-
- virtual void ice_response(::Ice::Byte, ::Ice::Byte)
{
- test(false);
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opVoidPtr callback =
+ Test::newCallback_MyClass_opVoid(cb, &Callback::noException, &Callback::sent);
+ p->begin_opVoid(callback);
+ cb->check();
}
- virtual void ice_exception(const ::Ice::Exception& ex)
{
- test(dynamic_cast<const ::Ice::TwowayOnlyException*>(&ex));
- called();
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opIdempotentPtr callback =
+ Test::newCallback_MyClass_opIdempotent(cb, &Callback::noException, &Callback::sent);
+ p->begin_opIdempotent(callback);
+ cb->check();
}
-};
-
-typedef IceUtil::Handle<AMI_MyClass_onewayOpByteExI> AMI_MyClass_onewayOpByteExIPtr;
-
-}
-
-void
-onewaysAMI(const Ice::CommunicatorPtr&, const Test::MyClassPrx& proxy)
-{
- Test::MyClassPrx p = Test::MyClassPrx::uncheckedCast(proxy->ice_oneway());
{
- AMI_MyClass_onewayOpVoidIPtr cb = new AMI_MyClass_onewayOpVoidI();
- p->opVoid_async(cb);
- // Let's check if we can reuse the same callback object for another call.
- p->opVoid_async(cb);
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opNonmutatingPtr callback =
+ Test::newCallback_MyClass_opNonmutating(cb, &Callback::noException, &Callback::sent);
+ p->begin_opNonmutating(callback);
+ cb->check();
}
{
- AMI_MyClass_onewayOpIdempotentIPtr cb = new AMI_MyClass_onewayOpIdempotentI();
- p->opIdempotent_async(cb);
+ try
+ {
+ p->begin_opByte(Ice::Byte(0xff), Ice::Byte(0x0f));
+ test(false);
+ }
+ catch(const IceUtil::IllegalArgumentException&)
+ {
+ }
}
-
+#ifdef ICE_CPP11
{
- AMI_MyClass_onewayOpNonmutatingIPtr cb = new AMI_MyClass_onewayOpNonmutatingI();
- p->opNonmutating_async(cb);
+ CallbackPtr cb = new Callback;
+ p->begin_ice_ping(nullptr,
+ [=](const Ice::Exception& ex){ cb->noException(ex); },
+ [=](bool sent){ cb->sent(sent); });
+ cb->check();
}
{
- // Check that a call to a void operation raises NoEndpointException
- // in the ice_exception() callback instead of at the point of call.
- Test::MyClassPrx indirect = Test::MyClassPrx::uncheckedCast(p->ice_adapterId("dummy"));
- AMI_MyClass_onewayOpVoidExIPtr cb = new AMI_MyClass_onewayOpVoidExI();
try
{
- indirect->opVoid_async(cb);
+ p->begin_ice_isA(Test::MyClass::ice_staticId(), [=](bool){ test(false); });
+ test(false);
+ }
+ catch(const IceUtil::IllegalArgumentException&)
+ {
+ }
+ }
+
+ {
+ try
+ {
+ p->begin_ice_id([=](const string&){ test(false); });
+ test(false);
}
- catch(const Ice::Exception&)
+ catch(const IceUtil::IllegalArgumentException&)
{
+ }
+ }
+
+ {
+ try
+ {
+ p->begin_ice_ids([=](const Ice::StringSeq&){ test(false); });
test(false);
}
+ catch(const IceUtil::IllegalArgumentException&)
+ {
+ }
+ }
+
+ {
+ CallbackPtr cb = new Callback;
+ p->begin_opVoid(nullptr,
+ [=](const Ice::Exception& ex){ cb->noException(ex); },
+ [=](bool sent){ cb->sent(sent); });
cb->check();
}
{
- AMI_MyClass_onewayOpByteExIPtr cb = new AMI_MyClass_onewayOpByteExI();
- p->opByte_async(cb, 0, 0);
+ CallbackPtr cb = new Callback;
+ p->begin_opIdempotent(nullptr,
+ [=](const Ice::Exception& ex){ cb->noException(ex); },
+ [=](bool sent){ cb->sent(sent); });
cb->check();
}
+
+ {
+ CallbackPtr cb = new Callback;
+ p->begin_opNonmutating(nullptr,
+ [=](const Ice::Exception& ex){ cb->noException(ex); },
+ [=](bool sent){ cb->sent(sent); });
+ cb->check();
+ }
+
+ {
+ try
+ {
+ p->begin_opByte(Ice::Byte(0xff), Ice::Byte(0x0f), [=](const Ice::Byte&, const Ice::Byte&){ test(false); });
+ test(false);
+ }
+ catch(const IceUtil::IllegalArgumentException&)
+ {
+ }
+ }
+#endif
}
diff --git a/cpp/test/Ice/operations/OnewaysNewAMI.cpp b/cpp/test/Ice/operations/OnewaysNewAMI.cpp
deleted file mode 100644
index 4dd9a79031d..00000000000
--- a/cpp/test/Ice/operations/OnewaysNewAMI.cpp
+++ /dev/null
@@ -1,239 +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.
-//
-// **********************************************************************
-
-#include <Ice/Ice.h>
-#include <TestCommon.h>
-#include <Test.h>
-
-using namespace std;
-
-namespace
-{
-
-class CallbackBase : public Ice::LocalObject
-{
-public:
-
- CallbackBase() :
- _called(false)
- {
- }
-
- virtual ~CallbackBase()
- {
- }
-
- void check()
- {
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_m);
- while(!_called)
- {
- _m.wait();
- }
- _called = false;
- }
-
-protected:
-
- void called()
- {
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_m);
- assert(!_called);
- _called = true;
- _m.notify();
- }
-
-private:
-
- IceUtil::Monitor<IceUtil::Mutex> _m;
- bool _called;
-};
-
-typedef IceUtil::Handle<CallbackBase> CallbackBasePtr;
-
-class Callback : public CallbackBase
-{
-public:
-
- Callback()
- {
- }
-
- void sent(bool)
- {
- called();
- }
-
- void noException(const Ice::Exception&)
- {
- test(false);
- }
-};
-typedef IceUtil::Handle<Callback> CallbackPtr;
-
-}
-
-void
-onewaysNewAMI(const Ice::CommunicatorPtr&, const Test::MyClassPrx& proxy)
-{
- Test::MyClassPrx p = Test::MyClassPrx::uncheckedCast(proxy->ice_oneway());
-
- {
- CallbackPtr cb = new Callback;
- Ice::Callback_Object_ice_pingPtr callback =
- Ice::newCallback_Object_ice_ping(cb, &Callback::noException, &Callback::sent);
- p->begin_ice_ping(callback);
- cb->check();
- }
-
- {
- try
- {
- p->begin_ice_isA(Test::MyClass::ice_staticId());
- test(false);
- }
- catch(const IceUtil::IllegalArgumentException&)
- {
- }
- }
-
- {
- try
- {
- p->begin_ice_id();
- test(false);
- }
- catch(const IceUtil::IllegalArgumentException&)
- {
- }
- }
-
- {
- try
- {
- p->begin_ice_ids();
- test(false);
- }
- catch(const IceUtil::IllegalArgumentException&)
- {
- }
- }
-
- {
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opVoidPtr callback =
- Test::newCallback_MyClass_opVoid(cb, &Callback::noException, &Callback::sent);
- p->begin_opVoid(callback);
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opIdempotentPtr callback =
- Test::newCallback_MyClass_opIdempotent(cb, &Callback::noException, &Callback::sent);
- p->begin_opIdempotent(callback);
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opNonmutatingPtr callback =
- Test::newCallback_MyClass_opNonmutating(cb, &Callback::noException, &Callback::sent);
- p->begin_opNonmutating(callback);
- cb->check();
- }
-
- {
- try
- {
- p->begin_opByte(Ice::Byte(0xff), Ice::Byte(0x0f));
- test(false);
- }
- catch(const IceUtil::IllegalArgumentException&)
- {
- }
- }
-#ifdef ICE_CPP11
- {
- CallbackPtr cb = new Callback;
- p->begin_ice_ping(nullptr,
- [=](const Ice::Exception& ex){ cb->noException(ex); },
- [=](bool sent){ cb->sent(sent); });
- cb->check();
- }
-
- {
- try
- {
- p->begin_ice_isA(Test::MyClass::ice_staticId(), [=](bool){ test(false); });
- test(false);
- }
- catch(const IceUtil::IllegalArgumentException&)
- {
- }
- }
-
- {
- try
- {
- p->begin_ice_id([=](const string&){ test(false); });
- test(false);
- }
- catch(const IceUtil::IllegalArgumentException&)
- {
- }
- }
-
- {
- try
- {
- p->begin_ice_ids([=](const Ice::StringSeq&){ test(false); });
- test(false);
- }
- catch(const IceUtil::IllegalArgumentException&)
- {
- }
- }
-
- {
- CallbackPtr cb = new Callback;
- p->begin_opVoid(nullptr,
- [=](const Ice::Exception& ex){ cb->noException(ex); },
- [=](bool sent){ cb->sent(sent); });
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- p->begin_opIdempotent(nullptr,
- [=](const Ice::Exception& ex){ cb->noException(ex); },
- [=](bool sent){ cb->sent(sent); });
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- p->begin_opNonmutating(nullptr,
- [=](const Ice::Exception& ex){ cb->noException(ex); },
- [=](bool sent){ cb->sent(sent); });
- cb->check();
- }
-
- {
- try
- {
- p->begin_opByte(Ice::Byte(0xff), Ice::Byte(0x0f), [=](const Ice::Byte&, const Ice::Byte&){ test(false); });
- test(false);
- }
- catch(const IceUtil::IllegalArgumentException&)
- {
- }
- }
-#endif
-}
diff --git a/cpp/test/Ice/operations/Test.ice b/cpp/test/Ice/operations/Test.ice
index b3893d7fe3f..ba8e8996747 100644
--- a/cpp/test/Ice/operations/Test.ice
+++ b/cpp/test/Ice/operations/Test.ice
@@ -75,7 +75,7 @@ dictionary<MyStruct, MyEnum> MyStructMyEnumD;
exception SomeException {};
-["ami"] class MyClass
+class MyClass
{
void shutdown();
@@ -173,7 +173,7 @@ exception SomeException {};
["nonmutating"] idempotent void opNonmutating();
};
-["ami"] class MyDerivedClass extends MyClass
+class MyDerivedClass extends MyClass
{
void opDerived();
};
diff --git a/cpp/test/Ice/operations/TestAMD.ice b/cpp/test/Ice/operations/TestAMD.ice
index ee39ee0edd4..951d81bfe2b 100644
--- a/cpp/test/Ice/operations/TestAMD.ice
+++ b/cpp/test/Ice/operations/TestAMD.ice
@@ -73,7 +73,7 @@ dictionary<string, MyEnum> StringMyEnumD;
dictionary<MyEnum, string> MyEnumStringD;
dictionary<MyStruct, MyEnum> MyStructMyEnumD;
-["ami", "amd"] class MyClass
+["amd"] class MyClass
{
void shutdown();
@@ -171,7 +171,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/cpp/test/Ice/operations/TwowaysAMI.cpp b/cpp/test/Ice/operations/TwowaysAMI.cpp
index 4723440088c..d7f6bc06dbd 100644
--- a/cpp/test/Ice/operations/TwowaysAMI.cpp
+++ b/cpp/test/Ice/operations/TwowaysAMI.cpp
@@ -10,7 +10,6 @@
#include <Ice/Ice.h>
#include <TestCommon.h>
#include <Test.h>
-#include <limits>
//
// Work-around for GCC warning bug
@@ -24,7 +23,7 @@ using namespace std;
namespace
{
-class CallbackBase : public IceUtil::Monitor<IceUtil::Mutex>
+class CallbackBase : public Ice::LocalObject
{
public:
@@ -39,10 +38,10 @@ public:
void check()
{
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
+ IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_m);
while(!_called)
{
- wait();
+ _m.wait();
}
_called = false;
}
@@ -51,114 +50,84 @@ protected:
void called()
{
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
+ IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_m);
assert(!_called);
_called = true;
- notify();
+ _m.notify();
}
private:
+ IceUtil::Monitor<IceUtil::Mutex> _m;
bool _called;
};
-class AMI_MyClass_opVoidI : public Test::AMI_MyClass_opVoid, public CallbackBase
+typedef IceUtil::Handle<CallbackBase> CallbackBasePtr;
+
+class Callback : public CallbackBase
{
public:
- virtual void ice_response()
+ Callback()
{
- called();
}
- virtual void ice_exception(const ::Ice::Exception&)
+ Callback(const Ice::CommunicatorPtr& communicator)
+ : _communicator(communicator)
{
- test(false);
}
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opVoidI> AMI_MyClass_opVoidIPtr;
-class AMI_MyClass_opVoidExI : public Test::AMI_MyClass_opVoid, public CallbackBase
-{
-public:
-
- virtual void ice_response()
+ void ping()
{
- test(false);
+ called();
}
- virtual void ice_exception(const ::Ice::Exception& ex)
+ void isA(bool result)
{
- test(dynamic_cast<const ::Ice::NoEndpointException*>(&ex));
+ test(result);
called();
}
-};
-typedef IceUtil::Handle<AMI_MyClass_opVoidExI> AMI_MyClass_opVoidExIPtr;
-
-class AMI_MyClass_opByteI : public Test::AMI_MyClass_opByte, public CallbackBase
-{
-public:
-
- virtual void ice_response(::Ice::Byte r, ::Ice::Byte b)
+ void id(const string& id)
{
- test(b == Ice::Byte(0xf0));
- test(r == Ice::Byte(0xff));
+ test(id == Test::MyDerivedClass::ice_staticId());
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
+ void ids(const Ice::StringSeq& ids)
{
- test(false);
+ test(ids.size() == 3);
+ test(ids[0] == "::Ice::Object");
+ test(ids[1] == "::Test::MyClass");
+ test(ids[2] == "::Test::MyDerivedClass");
+ called();
}
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opByteI> AMI_MyClass_opByteIPtr;
-
-class AMI_MyClass_opByteExI : public Test::AMI_MyClass_opByte, public CallbackBase
-{
-public:
- virtual void ice_response(::Ice::Byte, ::Ice::Byte)
+ void opVoid()
{
- test(false);
+ called();
}
- virtual void ice_exception(const ::Ice::Exception& ex)
+ void opContext(const Ice::Context&)
{
- test(dynamic_cast<const ::Ice::NoEndpointException*>(&ex));
called();
}
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opByteExI> AMI_MyClass_opByteExIPtr;
+ void opByte(Ice::Byte r, Ice::Byte b)
+ {
+ test(b == Ice::Byte(0xf0));
+ test(r == Ice::Byte(0xff));
+ called();
+ }
-class AMI_MyClass_opBoolI : public Test::AMI_MyClass_opBool, public CallbackBase
-{
-public:
-
- virtual void ice_response(bool r, bool b)
+ void opBool(bool r, bool b)
{
test(b);
test(!r);
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opBoolI> AMI_MyClass_opBoolIPtr;
-
-class AMI_MyClass_opShortIntLongI : public Test::AMI_MyClass_opShortIntLong, public CallbackBase
-{
-public:
-
- virtual void ice_response(::Ice::Long r, ::Ice::Short s, ::Ice::Int i, ::Ice::Long l)
+ void opShortIntLong(Ice::Long r, Ice::Short s, Ice::Int i, Ice::Long l)
{
test(s == 10);
test(i == 11);
@@ -167,19 +136,7 @@ public:
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opShortIntLongI> AMI_MyClass_opShortIntLongIPtr;
-
-class AMI_MyClass_opFloatDoubleI : public Test::AMI_MyClass_opFloatDouble, public CallbackBase
-{
-public:
-
- virtual void ice_response(::Ice::Double r, ::Ice::Float f, ::Ice::Double d)
+ void opFloatDouble(Ice::Double r, Ice::Float f, Ice::Double d)
{
test(f == Ice::Float(3.14));
test(d == Ice::Double(1.1E10));
@@ -187,67 +144,29 @@ public:
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opFloatDoubleI> AMI_MyClass_opFloatDoubleIPtr;
-
-class AMI_MyClass_opStringI : public Test::AMI_MyClass_opString, public CallbackBase
-{
-public:
-
- virtual void ice_response(const ::std::string& r, const ::std::string& s)
+ void opString(const ::std::string& r, const ::std::string& s)
{
test(s == "world hello");
test(r == "hello world");
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opStringI> AMI_MyClass_opStringIPtr;
-
-class AMI_MyClass_opMyEnumI : public Test::AMI_MyClass_opMyEnum, public CallbackBase
-{
-public:
-
- virtual void ice_response(::Test::MyEnum r, ::Test::MyEnum e)
+ void opMyEnum(Test::MyEnum r, Test::MyEnum e)
{
test(e == Test::enum2);
test(r == Test::enum3);
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opMyEnumI> AMI_MyClass_opMyEnumIPtr;
-
-class AMI_MyClass_opMyClassI : public Test::AMI_MyClass_opMyClass, public CallbackBase
-{
-public:
-
- AMI_MyClass_opMyClassI(const Ice::CommunicatorPtr& communicator) :
- _communicator(communicator)
- {
- }
-
- virtual void ice_response(const ::Test::MyClassPrx& r, const ::Test::MyClassPrx& c1, const ::Test::MyClassPrx& c2)
+ void opMyClass(const Test::MyClassPrx& r, const Test::MyClassPrx& c1, const Test::MyClassPrx& c2)
{
test(c1->ice_getIdentity() == _communicator->stringToIdentity("test"));
test(c2->ice_getIdentity() == _communicator->stringToIdentity("noSuchIdentity"));
test(r->ice_getIdentity() == _communicator->stringToIdentity("test"));
+
+ //
// We can't do the callbacks below in connection serialization mode.
+ //
if(_communicator->getProperties()->getPropertyAsInt("Ice.ThreadPool.Client.Serialize"))
{
r->opVoid();
@@ -264,35 +183,17 @@ public:
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- Ice::CommunicatorPtr _communicator;
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opMyClassI> AMI_MyClass_opMyClassIPtr;
-
-class AMI_MyClass_opStructI : public Test::AMI_MyClass_opStruct, public CallbackBase
-{
-public:
-
- AMI_MyClass_opStructI(const Ice::CommunicatorPtr& communicator) :
- _communicator(communicator)
- {
- }
-
- virtual void ice_response(const ::Test::Structure& rso, const ::Test::Structure& so)
+ void opStruct(const Test::Structure& rso, const Test::Structure& so)
{
test(rso.p == 0);
test(rso.e == Test::enum2);
test(rso.s.s == "def");
test(so.e == Test::enum3);
test(so.s.s == "a new string");
+
+ //
// We can't do the callbacks below in connection serialization mode.
+ //
if(_communicator->getProperties()->getPropertyAsInt("Ice.ThreadPool.Client.Serialize"))
{
so.p->opVoid();
@@ -300,23 +201,7 @@ public:
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- Ice::CommunicatorPtr _communicator;
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opStructI> AMI_MyClass_opStructIPtr;
-
-class AMI_MyClass_opByteSI : public Test::AMI_MyClass_opByteS, public CallbackBase
-{
-public:
-
- virtual void ice_response(const ::Test::ByteS& rso, const ::Test::ByteS& bso)
+ void opByteS(const Test::ByteS& rso, const Test::ByteS& bso)
{
test(bso.size() == 4);
test(bso[0] == Ice::Byte(0x22));
@@ -335,19 +220,7 @@ public:
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opByteSI> AMI_MyClass_opByteSIPtr;
-
-class AMI_MyClass_opBoolSI : public Test::AMI_MyClass_opBoolS, public CallbackBase
-{
-public:
-
- virtual void ice_response(const ::Test::BoolS& rso, const ::Test::BoolS& bso)
+ void opBoolS(const Test::BoolS& rso, const Test::BoolS& bso)
{
test(bso.size() == 4);
test(bso[0]);
@@ -361,20 +234,7 @@ public:
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opBoolSI> AMI_MyClass_opBoolSIPtr;
-
-class AMI_MyClass_opShortIntLongSI : public Test::AMI_MyClass_opShortIntLongS, public CallbackBase
-{
-public:
-
- virtual void ice_response(const ::Test::LongS& rso, const ::Test::ShortS& sso, const ::Test::IntS& iso,
- const ::Test::LongS& lso)
+ void opShortIntLongS(const Test::LongS& rso, const Test::ShortS& sso, const Test::IntS& iso, const Test::LongS& lso)
{
test(sso.size() == 3);
test(sso[0] == 1);
@@ -399,19 +259,7 @@ public:
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opShortIntLongSI> AMI_MyClass_opShortIntLongSIPtr;
-
-class AMI_MyClass_opFloatDoubleSI : public Test::AMI_MyClass_opFloatDoubleS, public CallbackBase
-{
-public:
-
- virtual void ice_response(const ::Test::DoubleS& rso, const ::Test::FloatS& fso, const ::Test::DoubleS& dso)
+ void opFloatDoubleS(const Test::DoubleS& rso, const Test::FloatS& fso, const Test::DoubleS& dso)
{
test(fso.size() == 2);
test(fso[0] == ::Ice::Float(3.14));
@@ -429,19 +277,7 @@ public:
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opFloatDoubleSI> AMI_MyClass_opFloatDoubleSIPtr;
-
-class AMI_MyClass_opStringSI : public Test::AMI_MyClass_opStringS, public CallbackBase
-{
-public:
-
- virtual void ice_response(const ::Test::StringS& rso, const ::Test::StringS& sso)
+ void opStringS(const Test::StringS& rso, const Test::StringS& sso)
{
test(sso.size() == 4);
test(sso[0] == "abc");
@@ -455,19 +291,7 @@ public:
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opStringSI> AMI_MyClass_opStringSIPtr;
-
-class AMI_MyClass_opByteSSI : public Test::AMI_MyClass_opByteSS, public CallbackBase
-{
-public:
-
- virtual void ice_response(const ::Test::ByteSS& rso, const ::Test::ByteSS& bso)
+ void opByteSS(const Test::ByteSS& rso, const Test::ByteSS& bso)
{
test(bso.size() == 2);
test(bso[0].size() == 1);
@@ -491,19 +315,7 @@ public:
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opByteSSI> AMI_MyClass_opByteSSIPtr;
-
-class AMI_MyClass_opBoolSSI : public Test::AMI_MyClass_opBoolSS, public CallbackBase
-{
-public:
-
- virtual void ice_response(const ::Test::BoolSS& rso, const ::Test::BoolSS& bso)
+ void opBoolSS(const Test::BoolSS& rso, const Test::BoolSS& bso)
{
test(bso.size() == 4);
test(bso[0].size() == 1);
@@ -528,20 +340,10 @@ public:
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opBoolSSI> AMI_MyClass_opBoolSSIPtr;
-
-class AMI_MyClass_opShortIntLongSSI : public Test::AMI_MyClass_opShortIntLongSS, public CallbackBase
-{
-public:
-
- virtual void ice_response(const ::Test::LongSS& rso, const ::Test::ShortSS& sso, const ::Test::IntSS& iso,
- const ::Test::LongSS& lso)
+ void opShortIntLongSS(const Test::LongSS& rso,
+ const Test::ShortSS& sso,
+ const Test::IntSS& iso,
+ const Test::LongSS& lso)
{
test(rso.size() == 1);
test(rso[0].size() == 2);
@@ -571,19 +373,7 @@ public:
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opShortIntLongSSI> AMI_MyClass_opShortIntLongSSIPtr;
-
-class AMI_MyClass_opFloatDoubleSSI : public Test::AMI_MyClass_opFloatDoubleSS, public CallbackBase
-{
-public:
-
- virtual void ice_response(const ::Test::DoubleSS& rso, const ::Test::FloatSS& fso, const ::Test::DoubleSS& dso)
+ void opFloatDoubleSS(const Test::DoubleSS& rso, const Test::FloatSS& fso, const Test::DoubleSS& dso)
{
test(fso.size() == 3);
test(fso[0].size() == 1);
@@ -608,19 +398,7 @@ public:
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opFloatDoubleSSI> AMI_MyClass_opFloatDoubleSSIPtr;
-
-class AMI_MyClass_opStringSSI : public Test::AMI_MyClass_opStringSS, public CallbackBase
-{
-public:
-
- virtual void ice_response(const ::Test::StringSS& rso, const ::Test::StringSS& sso)
+ void opStringSS(const Test::StringSS& rso, const Test::StringSS& sso)
{
test(sso.size() == 5);
test(sso[0].size() == 1);
@@ -640,19 +418,7 @@ public:
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opStringSSI> AMI_MyClass_opStringSSIPtr;
-
-class AMI_MyClass_opByteBoolDI : public Test::AMI_MyClass_opByteBoolD, public CallbackBase
-{
-public:
-
- virtual void ice_response(const ::Test::ByteBoolD& ro, const ::Test::ByteBoolD& _do)
+ void opByteBoolD(const Test::ByteBoolD& ro, const Test::ByteBoolD& _do)
{
Test::ByteBoolD di1;
di1[10] = true;
@@ -670,19 +436,7 @@ public:
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opByteBoolDI> AMI_MyClass_opByteBoolDIPtr;
-
-class AMI_MyClass_opShortIntDI : public Test::AMI_MyClass_opShortIntD, public CallbackBase
-{
-public:
-
- virtual void ice_response(const ::Test::ShortIntD& ro, const ::Test::ShortIntD& _do)
+ void opShortIntD(const Test::ShortIntD& ro, const Test::ShortIntD& _do)
{
Test::ShortIntD di1;
di1[110] = -1;
@@ -700,19 +454,7 @@ public:
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opShortIntDI> AMI_MyClass_opShortIntDIPtr;
-
-class AMI_MyClass_opLongFloatDI : public Test::AMI_MyClass_opLongFloatD, public CallbackBase
-{
-public:
-
- virtual void ice_response(const ::Test::LongFloatD& ro, const ::Test::LongFloatD& _do)
+ void opLongFloatD(const Test::LongFloatD& ro, const Test::LongFloatD& _do)
{
Test::LongFloatD di1;
di1[999999110] = Ice::Float(-1.1);
@@ -730,19 +472,7 @@ public:
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opLongFloatDI> AMI_MyClass_opLongFloatDIPtr;
-
-class AMI_MyClass_opStringStringDI : public Test::AMI_MyClass_opStringStringD, public CallbackBase
-{
-public:
-
- virtual void ice_response(const ::Test::StringStringD& ro, const ::Test::StringStringD& _do)
+ void opStringStringD(const Test::StringStringD& ro, const Test::StringStringD& _do)
{
Test::StringStringD di1;
di1["foo"] = "abc -1.1";
@@ -760,19 +490,7 @@ public:
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opStringStringDI> AMI_MyClass_opStringStringDIPtr;
-
-class AMI_MyClass_opStringMyEnumDI : public Test::AMI_MyClass_opStringMyEnumD, public CallbackBase
-{
-public:
-
- virtual void ice_response(const ::Test::StringMyEnumD& ro, const ::Test::StringMyEnumD& _do)
+ void opStringMyEnumD(const Test::StringMyEnumD& ro, const Test::StringMyEnumD& _do)
{
Test::StringMyEnumD di1;
di1["abc"] = Test::enum1;
@@ -790,46 +508,7 @@ public:
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opStringMyEnumDI> AMI_MyClass_opStringMyEnumDIPtr;
-
-class AMI_MyClass_opMyEnumStringDI : public Test::AMI_MyClass_opMyEnumStringD, public CallbackBase
-{
-public:
-
- virtual void ice_response(const ::Test::MyEnumStringD& ro, const ::Test::MyEnumStringD& _do)
- {
- Test::MyEnumStringD di1;
- di1[Test::enum1] = "abc";
- test(_do == di1);
- test(ro.size() == 3);
- test(ro.find(Test::enum1) != ro.end());
- test(ro.find(Test::enum1)->second == "abc");
- test(ro.find(Test::enum2) != ro.end());
- test(ro.find(Test::enum2)->second == "Hello!!");
- test(ro.find(Test::enum3) != ro.end());
- test(ro.find(Test::enum3)->second == "qwerty");
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opMyEnumStringDI> AMI_MyClass_opMyEnumStringDIPtr;
-
-class AMI_MyClass_opMyStructMyEnumDI : public Test::AMI_MyClass_opMyStructMyEnumD, public CallbackBase
-{
-public:
-
- virtual void ice_response(const ::Test::MyStructMyEnumD& ro, const ::Test::MyStructMyEnumD& _do)
+ void opMyStructMyEnumD(const Test::MyStructMyEnumD& ro, const Test::MyStructMyEnumD& _do)
{
Test::MyStruct s11 = { 1, 1 };
Test::MyStruct s12 = { 1, 2 };
@@ -851,161 +530,45 @@ public:
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opMyStructMyEnumDI> AMI_MyClass_opMyStructMyEnumDIPtr;
-
-class AMI_MyClass_opIntSI : public Test::AMI_MyClass_opIntS, public CallbackBase
-{
-public:
-
- AMI_MyClass_opIntSI(int l) : _l(l) {}
-
- virtual void ice_response(const Test::IntS& r)
+ void opIntS(const Test::IntS& r)
{
- test(r.size() == static_cast<size_t>(_l));
- for(int j = 0; j < _l; ++j)
+ for(int j = 0; j < static_cast<int>(r.size()); ++j)
{
test(r[j] == -j);
}
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- int _l;
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opIntSI> AMI_MyClass_opIntSIPtr;
-
-class AMI_MyClass_opContextEqualI : public Test::AMI_MyClass_opContext, public CallbackBase
-{
-public:
-
- AMI_MyClass_opContextEqualI(const Test::StringStringD &d) : _d(d)
- {
- }
-
- virtual void ice_response(const Test::StringStringD& r)
- {
- test(r == _d);
- called();
- }
-
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- Test::StringStringD _d;
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opContextEqualI> AMI_MyClass_opContextEqualIPtr;
-
-class AMI_MyClass_opContextNotEqualI : public Test::AMI_MyClass_opContext, public CallbackBase
-{
-public:
-
- AMI_MyClass_opContextNotEqualI(const Test::StringStringD &d) : _d(d)
- {
- }
-
- virtual void ice_response(const Test::StringStringD& r)
+ void opDoubleMarshaling()
{
- test(r != _d);
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- Test::StringStringD _d;
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opContextNotEqualI> AMI_MyClass_opContextNotEqualIPtr;
-
-class AMI_MyDerivedClass_opDerivedI : public Test::AMI_MyDerivedClass_opDerived, public CallbackBase
-{
-public:
-
- virtual void ice_response()
+ void opIdempotent()
{
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-};
-
-typedef IceUtil::Handle<AMI_MyDerivedClass_opDerivedI> AMI_MyDerivedClass_opDerivedIPtr;
-
-class AMI_MyClass_opDoubleMarshalingI : public Test::AMI_MyClass_opDoubleMarshaling, public CallbackBase
-{
-public:
-
- virtual void ice_response()
+ void opNonmutating()
{
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opDoubleMarshalingI> AMI_MyClass_opDoubleMarshalingIPtr;
-
-class AMI_MyClass_opIdempotentI : public Test::AMI_MyClass_opIdempotent, public CallbackBase
-{
-public:
-
- virtual void ice_response()
+ void opDerived()
{
called();
}
- virtual void ice_exception(const ::Ice::Exception&)
+ void exCB(const Ice::Exception&)
{
test(false);
}
-};
-
-typedef IceUtil::Handle<AMI_MyClass_opIdempotentI> AMI_MyClass_opIdempotentIPtr;
-
-class AMI_MyClass_opNonmutatingI : public Test::AMI_MyClass_opNonmutating, public CallbackBase
-{
-public:
- virtual void ice_response()
- {
- called();
- }
+private:
- virtual void ice_exception(const ::Ice::Exception&)
- {
- test(false);
- }
+ Ice::CommunicatorPtr _communicator;
};
-
-typedef IceUtil::Handle<AMI_MyClass_opNonmutatingI> AMI_MyClass_opNonmutatingIPtr;
+typedef IceUtil::Handle<Callback> CallbackPtr;
}
@@ -1013,114 +576,108 @@ void
twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
{
{
- // Check that a call to a void operation raises NoEndpointException
- // in the ice_exception() callback instead of at the point of call.
- Test::MyClassPrx indirect = Test::MyClassPrx::uncheckedCast(p->ice_adapterId("dummy"));
- AMI_MyClass_opVoidExIPtr cb = new AMI_MyClass_opVoidExI;
- try
- {
- test(!indirect->opVoid_async(cb));
- }
- catch(const Ice::Exception&)
- {
- test(false);
- }
+ CallbackPtr cb = new Callback;
+ Ice::Callback_Object_ice_pingPtr callback = Ice::newCallback_Object_ice_ping(cb,
+ &Callback::ping,
+ &Callback::exCB);
+ p->begin_ice_ping(callback);
cb->check();
}
{
- //
- // Check that a call to a twoway operation raises NoEndpointException
- // in the ice_exception() callback instead of at the point of call.
- //
- Test::MyClassPrx indirect = Test::MyClassPrx::uncheckedCast(p->ice_adapterId("dummy"));
- AMI_MyClass_opByteExIPtr cb = new AMI_MyClass_opByteExI;
- try
- {
- test(!indirect->opByte_async(cb, 0, 0));
- }
- catch(const Ice::Exception&)
- {
- test(false);
- }
+ CallbackPtr cb = new Callback;
+ Ice::Callback_Object_ice_isAPtr callback = Ice::newCallback_Object_ice_isA(cb,
+ &Callback::isA,
+ &Callback::exCB);
+ p->begin_ice_isA(Test::MyClass::ice_staticId(), callback);
cb->check();
}
{
- AMI_MyClass_opVoidIPtr 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);
+ CallbackPtr cb = new Callback;
+ Ice::Callback_Object_ice_idPtr callback = Ice::newCallback_Object_ice_id(cb,
+ &Callback::id,
+ &Callback::exCB);
+ p->begin_ice_id(callback);
cb->check();
}
{
- //
- // Check that CommunicatorDestroyedException is raised directly.
- //
- Ice::InitializationData initData;
- initData.properties = communicator->getProperties()->clone();
- Ice::CommunicatorPtr ic = Ice::initialize(initData);
- Ice::ObjectPrx obj = ic->stringToProxy(p->ice_toString());
- Test::MyClassPrx p2 = Test::MyClassPrx::checkedCast(obj);
-
- ic->destroy();
-
- AMI_MyClass_opVoidIPtr cb = new AMI_MyClass_opVoidI;
- try
- {
- test(!p2->opVoid_async(cb));
- test(false);
- }
- catch(const Ice::CommunicatorDestroyedException&)
- {
- // Expected.
- }
+ CallbackPtr cb = new Callback;
+ Ice::Callback_Object_ice_idsPtr callback = Ice::newCallback_Object_ice_ids(cb,
+ &Callback::ids,
+ &Callback::exCB);
+ p->begin_ice_ids(callback);
+ cb->check();
}
{
- AMI_MyClass_opByteIPtr cb = new AMI_MyClass_opByteI;
- p->opByte_async(cb, Ice::Byte(0xff), Ice::Byte(0x0f));
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opVoidPtr callback = Test::newCallback_MyClass_opVoid(cb,
+ &Callback::opVoid,
+ &Callback::exCB);
+ p->begin_opVoid(callback);
cb->check();
}
{
- AMI_MyClass_opBoolIPtr cb = new AMI_MyClass_opBoolI;
- p->opBool_async(cb, true, false);
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opBytePtr callback = Test::newCallback_MyClass_opByte(cb,
+ &Callback::opByte,
+ &Callback::exCB);
+ p->begin_opByte(Ice::Byte(0xff), Ice::Byte(0x0f), callback);
cb->check();
}
{
- AMI_MyClass_opShortIntLongIPtr cb = new AMI_MyClass_opShortIntLongI;
- p->opShortIntLong_async(cb, 10, 11, 12);
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opBoolPtr callback = Test::newCallback_MyClass_opBool(cb,
+ &Callback::opBool,
+ &Callback::exCB);
+ p->begin_opBool(true, false, callback);
cb->check();
}
{
- AMI_MyClass_opFloatDoubleIPtr cb = new AMI_MyClass_opFloatDoubleI;
- p->opFloatDouble_async(cb, Ice::Float(3.14), Ice::Double(1.1E10));
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opShortIntLongPtr callback =
+ Test::newCallback_MyClass_opShortIntLong(cb, &Callback::opShortIntLong, &Callback::exCB);
+ p->begin_opShortIntLong(10, 11, 12, callback);
cb->check();
- // Let's check if we can reuse the same callback object for another call.
- p->opFloatDouble_async(cb, Ice::Float(3.14), Ice::Double(1.1E10));
+ }
+
+ {
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opFloatDoublePtr callback =
+ Test::newCallback_MyClass_opFloatDouble(cb, &Callback::opFloatDouble, &Callback::exCB);
+ p->begin_opFloatDouble(Ice::Float(3.14), Ice::Double(1.1E10), callback);
cb->check();
}
{
- AMI_MyClass_opStringIPtr cb = new AMI_MyClass_opStringI;
- p->opString_async(cb, "hello", "world");
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opStringPtr callback = Test::newCallback_MyClass_opString(cb,
+ &Callback::opString,
+ &Callback::exCB);
+ p->begin_opString("hello", "world", callback);
cb->check();
}
{
- AMI_MyClass_opMyEnumIPtr cb = new AMI_MyClass_opMyEnumI;
- p->opMyEnum_async(cb, Test::enum2);
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opMyEnumPtr callback = Test::newCallback_MyClass_opMyEnum(cb,
+ &Callback::opMyEnum,
+ &Callback::exCB);
+ p->begin_opMyEnum(Test::enum2, callback);
cb->check();
}
{
- AMI_MyClass_opMyClassIPtr cb = new AMI_MyClass_opMyClassI(communicator);
- p->opMyClass_async(cb, p);
+ CallbackPtr cb = new Callback(communicator);
+ Test::Callback_MyClass_opMyClassPtr callback = Test::newCallback_MyClass_opMyClass(cb,
+ &Callback::opMyClass,
+ &Callback::exCB);
+ p->begin_opMyClass(p, callback);
cb->check();
}
@@ -1134,8 +691,11 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
si2.e = Test::enum2;
si2.s.s = "def";
- AMI_MyClass_opStructIPtr cb = new AMI_MyClass_opStructI(communicator);
- p->opStruct_async(cb, si1, si2);
+ CallbackPtr cb = new Callback(communicator);
+ Test::Callback_MyClass_opStructPtr callback = Test::newCallback_MyClass_opStruct(cb,
+ &Callback::opStruct,
+ &Callback::exCB);
+ p->begin_opStruct(si1, si2, callback);
cb->check();
}
@@ -1153,8 +713,11 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
bsi2.push_back(Ice::Byte(0xf3));
bsi2.push_back(Ice::Byte(0xf4));
- AMI_MyClass_opByteSIPtr cb = new AMI_MyClass_opByteSI;
- p->opByteS_async(cb, bsi1, bsi2);
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opByteSPtr callback = Test::newCallback_MyClass_opByteS(cb,
+ &Callback::opByteS,
+ &Callback::exCB);
+ p->begin_opByteS(bsi1, bsi2, callback);
cb->check();
}
@@ -1168,8 +731,11 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
bsi2.push_back(false);
- AMI_MyClass_opBoolSIPtr cb = new AMI_MyClass_opBoolSI;
- p->opBoolS_async(cb, bsi1, bsi2);
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opBoolSPtr callback = Test::newCallback_MyClass_opBoolS(cb,
+ &Callback::opBoolS,
+ &Callback::exCB);
+ p->begin_opBoolS(bsi1, bsi2, callback);
cb->check();
}
@@ -1191,8 +757,10 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
lsi.push_back(30);
lsi.push_back(20);
- AMI_MyClass_opShortIntLongSIPtr cb = new AMI_MyClass_opShortIntLongSI;
- p->opShortIntLongS_async(cb, ssi, isi, lsi);
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opShortIntLongSPtr callback =
+ Test::newCallback_MyClass_opShortIntLongS(cb, &Callback::opShortIntLongS, &Callback::exCB);
+ p->begin_opShortIntLongS(ssi, isi, lsi, callback);
cb->check();
}
@@ -1207,8 +775,10 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
dsi.push_back(Ice::Double(1.2E10));
dsi.push_back(Ice::Double(1.3E10));
- AMI_MyClass_opFloatDoubleSIPtr cb = new AMI_MyClass_opFloatDoubleSI;
- p->opFloatDoubleS_async(cb, fsi, dsi);
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opFloatDoubleSPtr callback =
+ Test::newCallback_MyClass_opFloatDoubleS(cb, &Callback::opFloatDoubleS, &Callback::exCB);
+ p->begin_opFloatDoubleS(fsi, dsi, callback);
cb->check();
}
@@ -1222,8 +792,11 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
ssi2.push_back("xyz");
- AMI_MyClass_opStringSIPtr cb = new AMI_MyClass_opStringSI;
- p->opStringS_async(cb, ssi1, ssi2);
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opStringSPtr callback = Test::newCallback_MyClass_opStringS(cb,
+ &Callback::opStringS,
+ &Callback::exCB);
+ p->begin_opStringS(ssi1, ssi2, callback);
cb->check();
}
@@ -1242,8 +815,11 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
bsi2[1].push_back(Ice::Byte(0xf2));
bsi2[1].push_back(Ice::Byte(0xf1));
- AMI_MyClass_opByteSSIPtr cb = new AMI_MyClass_opByteSSI;
- p->opByteSS_async(cb, bsi1, bsi2);
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opByteSSPtr callback = Test::newCallback_MyClass_opByteSS(cb,
+ &Callback::opByteSS,
+ &Callback::exCB);
+ p->begin_opByteSS(bsi1, bsi2, callback);
cb->check();
}
@@ -1261,8 +837,12 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
bsi2[0].push_back(false);
bsi2[0].push_back(false);
bsi2[0].push_back(true);
- AMI_MyClass_opBoolSSIPtr cb = new AMI_MyClass_opBoolSSI;
- p->opBoolSS_async(cb, bsi1, bsi2);
+
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opBoolSSPtr callback = Test::newCallback_MyClass_opBoolSS(cb,
+ &Callback::opBoolSS,
+ &Callback::exCB);
+ p->begin_opBoolSS(bsi1, bsi2, callback);
cb->check();
}
@@ -1283,12 +863,14 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
lsi[0].push_back(496);
lsi[0].push_back(1729);
- AMI_MyClass_opShortIntLongSSIPtr cb = new AMI_MyClass_opShortIntLongSSI;
- p->opShortIntLongSS_async(cb, ssi, isi, lsi);
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opShortIntLongSSPtr callback = Test::newCallback_MyClass_opShortIntLongSS(cb,
+ &Callback::opShortIntLongSS,
+ &Callback::exCB);
+ p->begin_opShortIntLongSS(ssi, isi, lsi, callback);
cb->check();
}
-
{
Test::FloatSS fsi;
fsi.resize(3);
@@ -1302,8 +884,10 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
dsi[0].push_back(Ice::Double(1.2E10));
dsi[0].push_back(Ice::Double(1.3E10));
- AMI_MyClass_opFloatDoubleSSIPtr cb = new AMI_MyClass_opFloatDoubleSSI;
- p->opFloatDoubleSS_async(cb, fsi, dsi);
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opFloatDoubleSSPtr callback =
+ Test::newCallback_MyClass_opFloatDoubleSS(cb, &Callback::opFloatDoubleSS, &Callback::exCB);
+ p->begin_opFloatDoubleSS(fsi, dsi, callback);
cb->check();
}
@@ -1319,8 +903,10 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
ssi2[2].push_back("xyz");
- AMI_MyClass_opStringSSIPtr cb = new AMI_MyClass_opStringSSI;
- p->opStringSS_async(cb, ssi1, ssi2);
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opStringSSPtr callback =
+ Test::newCallback_MyClass_opStringSS(cb, &Callback::opStringSS, &Callback::exCB);
+ p->begin_opStringSS(ssi1, ssi2, callback);
cb->check();
}
@@ -1333,8 +919,10 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
di2[11] = false;
di2[101] = true;
- AMI_MyClass_opByteBoolDIPtr cb = new AMI_MyClass_opByteBoolDI;
- p->opByteBoolD_async(cb, di1, di2);
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opByteBoolDPtr callback =
+ Test::newCallback_MyClass_opByteBoolD(cb, &Callback::opByteBoolD, &Callback::exCB);
+ p->begin_opByteBoolD(di1, di2, callback);
cb->check();
}
@@ -1347,8 +935,10 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
di2[111] = -100;
di2[1101] = 0;
- AMI_MyClass_opShortIntDIPtr cb = new AMI_MyClass_opShortIntDI;
- p->opShortIntD_async(cb, di1, di2);
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opShortIntDPtr callback =
+ Test::newCallback_MyClass_opShortIntD(cb, &Callback::opShortIntD, &Callback::exCB);
+ p->begin_opShortIntD(di1, di2, callback);
cb->check();
}
@@ -1361,8 +951,10 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
di2[999999120] = Ice::Float(-100.4);
di2[999999130] = Ice::Float(0.5);
- AMI_MyClass_opLongFloatDIPtr cb = new AMI_MyClass_opLongFloatDI;
- p->opLongFloatD_async(cb, di1, di2);
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opLongFloatDPtr callback =
+ Test::newCallback_MyClass_opLongFloatD(cb, &Callback::opLongFloatD, &Callback::exCB);
+ p->begin_opLongFloatD(di1, di2, callback);
cb->check();
}
@@ -1375,8 +967,10 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
di2["FOO"] = "abc -100.4";
di2["BAR"] = "abc 0.5";
- AMI_MyClass_opStringStringDIPtr cb = new AMI_MyClass_opStringStringDI;
- p->opStringStringD_async(cb, di1, di2);
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opStringStringDPtr callback =
+ Test::newCallback_MyClass_opStringStringD(cb, &Callback::opStringStringD, &Callback::exCB);
+ p->begin_opStringStringD(di1, di2, callback);
cb->check();
}
@@ -1389,20 +983,10 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
di2["qwerty"] = Test::enum3;
di2["Hello!!"] = Test::enum2;
- AMI_MyClass_opStringMyEnumDIPtr cb = new AMI_MyClass_opStringMyEnumDI;
- p->opStringMyEnumD_async(cb, di1, di2);
- cb->check();
- }
-
- {
- Test::MyEnumStringD di1;
- di1[Test::enum1] = "abc";
- Test::MyEnumStringD di2;
- di2[Test::enum2] = "Hello!!";
- di2[Test::enum3] = "qwerty";
-
- AMI_MyClass_opMyEnumStringDIPtr cb = new AMI_MyClass_opMyEnumStringDI;
- p->opMyEnumStringD_async(cb, di1, di2);
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opStringMyEnumDPtr callback =
+ Test::newCallback_MyClass_opStringMyEnumD(cb, &Callback::opStringMyEnumD, &Callback::exCB);
+ p->begin_opStringMyEnumD(di1, di2, callback);
cb->check();
}
@@ -1420,8 +1004,10 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
di2[s22] = Test::enum3;
di2[s23] = Test::enum2;
- AMI_MyClass_opMyStructMyEnumDIPtr cb = new AMI_MyClass_opMyStructMyEnumDI;
- p->opMyStructMyEnumD_async(cb, di1, di2);
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opMyStructMyEnumDPtr callback =
+ Test::newCallback_MyClass_opMyStructMyEnumD(cb, &Callback::opMyStructMyEnumD, &Callback::exCB);
+ p->begin_opMyStructMyEnumD(di1, di2, callback);
cb->check();
}
@@ -1435,8 +1021,10 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
{
s.push_back(i);
}
- AMI_MyClass_opIntSIPtr cb = new AMI_MyClass_opIntSI(lengths[l]);
- p->opIntS_async(cb, s);
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opIntSPtr callback =
+ Test::newCallback_MyClass_opIntS(cb, &Callback::opIntS, &Callback::exCB);
+ p->begin_opIntS(s, callback);
cb->check();
}
}
@@ -1448,28 +1036,28 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
ctx["three"] = "THREE";
{
test(p->ice_getContext().empty());
- AMI_MyClass_opContextNotEqualIPtr cb = new AMI_MyClass_opContextNotEqualI(ctx);
- p->opContext_async(cb);
- cb->check();
+ Ice::AsyncResultPtr r = p->begin_opContext();
+ Ice::Context c = p->end_opContext(r);
+ test(c != ctx);
}
{
test(p->ice_getContext().empty());
- AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(ctx);
- p->opContext_async(cb, ctx);
- cb->check();
+ Ice::AsyncResultPtr r = p->begin_opContext(ctx);
+ Ice::Context c = p->end_opContext(r);
+ test(c == ctx);
}
Test::MyClassPrx p2 = Test::MyClassPrx::checkedCast(p->ice_context(ctx));
test(p2->ice_getContext() == ctx);
{
- AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(ctx);
- p2->opContext_async(cb);
- cb->check();
+ Ice::AsyncResultPtr r = p2->begin_opContext();
+ Ice::Context c = p2->end_opContext(r);
+ test(c == ctx);
}
{
Test::MyClassPrx p2 = Test::MyClassPrx::checkedCast(p->ice_context(ctx));
- AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(ctx);
- p2->opContext_async(cb, ctx);
- cb->check();
+ Ice::AsyncResultPtr r = p2->begin_opContext(ctx);
+ Ice::Context c = p2->end_opContext(r);
+ test(c == ctx);
}
#ifndef ICE_OS_WINRT
@@ -1494,24 +1082,24 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
Test::MyClassPrx p = Test::MyClassPrx::uncheckedCast(
- ic->stringToProxy("test:default -p 12010"));
+ ic->stringToProxy("test:default -p 12010"));
ic->getImplicitContext()->setContext(ctx);
test(ic->getImplicitContext()->getContext() == ctx);
{
- AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(ctx);
- p->opContext_async(cb);
- cb->check();
+ Ice::AsyncResultPtr r = p->begin_opContext();
+ Ice::Context c = p->end_opContext(r);
+ test(c == ctx);
}
ic->getImplicitContext()->put("zero", "ZERO");
ctx = ic->getImplicitContext()->getContext();
{
- AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(ctx);
- p->opContext_async(cb);
- cb->check();
+ Ice::AsyncResultPtr r = p->begin_opContext();
+ Ice::Context c = p->end_opContext(r);
+ test(c == ctx);
}
Ice::Context prxContext;
@@ -1526,16 +1114,16 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
ic->getImplicitContext()->setContext(Ice::Context());
{
- AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(prxContext);
- p->opContext_async(cb);
- cb->check();
+ Ice::AsyncResultPtr r = p->begin_opContext();
+ Ice::Context c = p->end_opContext(r);
+ test(c == prxContext);
}
ic->getImplicitContext()->setContext(ctx);
{
- AMI_MyClass_opContextEqualIPtr cb = new AMI_MyClass_opContextEqualI(combined);
- p->opContext_async(cb);
- cb->check();
+ Ice::AsyncResultPtr r = p->begin_opContext();
+ Ice::Context c = p->end_opContext(r);
+ test(c == combined);
}
ic->getImplicitContext()->setContext(Ice::Context());
@@ -1548,28 +1136,530 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
{
Ice::Double d = 1278312346.0 / 13.0;
Test::DoubleS ds(5, d);
- AMI_MyClass_opDoubleMarshalingIPtr cb = new AMI_MyClass_opDoubleMarshalingI;
- p->opDoubleMarshaling_async(cb, d, ds);
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opDoubleMarshalingPtr callback =
+ Test::newCallback_MyClass_opDoubleMarshaling(cb, &Callback::opDoubleMarshaling, &Callback::exCB);
+ p->begin_opDoubleMarshaling(d, ds, callback);
cb->check();
}
{
- AMI_MyClass_opIdempotentIPtr cb = new AMI_MyClass_opIdempotentI;
- p->opIdempotent_async(cb);
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opIdempotentPtr callback =
+ Test::newCallback_MyClass_opIdempotent(cb, &Callback::opIdempotent, &Callback::exCB);
+ p->begin_opIdempotent(callback);
cb->check();
}
{
- AMI_MyClass_opNonmutatingIPtr cb = new AMI_MyClass_opNonmutatingI;
- p->opNonmutating_async(cb);
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opNonmutatingPtr callback =
+ Test::newCallback_MyClass_opNonmutating(cb, &Callback::opNonmutating, &Callback::exCB);
+ p->begin_opNonmutating(callback);
cb->check();
}
{
Test::MyDerivedClassPrx derived = Test::MyDerivedClassPrx::checkedCast(p);
test(derived);
- AMI_MyDerivedClass_opDerivedIPtr cb = new AMI_MyDerivedClass_opDerivedI;
- derived->opDerived_async(cb);
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyDerivedClass_opDerivedPtr callback =
+ Test::newCallback_MyDerivedClass_opDerived(cb, &Callback::opDerived, &Callback::exCB);
+ derived->begin_opDerived(callback);
+ cb->check();
+ }
+#ifdef ICE_CPP11
+
+ {
+ CallbackPtr cb = new Callback;
+ p->begin_ice_ping([=](){ cb->ping(); }, [=](const Ice::Exception& ex){ cb->exCB(ex); });
+ cb->check();
+ }
+
+ {
+ CallbackPtr cb = new Callback;
+ p->begin_ice_isA(Test::MyClass::ice_staticId(), [=](bool isA){ cb->isA(isA); }, [=](const Ice::Exception& ex){ cb->exCB(ex); });
+ cb->check();
+ }
+
+ {
+ CallbackPtr cb = new Callback;
+ p->begin_ice_id([=](const string& id){ cb->id(id); }, [=](const Ice::Exception& ex){ cb->exCB(ex); });
+ cb->check();
+ }
+
+ {
+ CallbackPtr cb = new Callback;
+ p->begin_ice_ids([=](const Ice::StringSeq& ids){ cb->ids(ids); }, [=](const Ice::Exception& ex){ cb->exCB(ex); });
cb->check();
}
+
+ {
+ CallbackPtr cb = new Callback;
+ p->begin_opVoid([=](){ cb->opVoid(); }, [=](const Ice::Exception& ex){ cb->exCB(ex); });
+ cb->check();
+ }
+
+ {
+ CallbackPtr cb = new Callback;
+ p->begin_opByte(Ice::Byte(0xff), Ice::Byte(0x0f),
+ [=](const Ice::Byte& p1, const Ice::Byte& p2){ cb->opByte(p1, p2); },
+ [=](const Ice::Exception& ex){ cb->exCB(ex); });
+ cb->check();
+ }
+
+ {
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opBoolPtr callback = Test::newCallback_MyClass_opBool(cb,
+ &Callback::opBool,
+ &Callback::exCB);
+ p->begin_opBool(true, false, [=](bool p1, bool p2){ cb->opBool(p1, p2); }, [=](const Ice::Exception& ex){ cb->exCB(ex); });
+ cb->check();
+ }
+
+ {
+ CallbackPtr cb = new Callback;
+ p->begin_opShortIntLong(10, 11, 12,
+ [=](Ice::Long p1, Ice::Short p2, Ice::Int p3, Ice::Long p4){ cb->opShortIntLong(p1, p2, p3, p4); },
+ [=](const Ice::Exception& ex){ cb->exCB(ex); });
+ cb->check();
+ }
+
+ {
+ CallbackPtr cb = new Callback;
+ p->begin_opFloatDouble(Ice::Float(3.14), Ice::Double(1.1E10),
+ [=](Ice::Double p1, Ice::Float p2, Ice::Double p3){ cb->opFloatDouble(p1, p2, p3); },
+ [=](const Ice::Exception& ex){ cb->exCB(ex); });
+ cb->check();
+ }
+
+ {
+ CallbackPtr cb = new Callback;
+ p->begin_opString("hello", "world",
+ [=](const string& p1, const string& p2){ cb->opString(p1, p2); },
+ [=](const Ice::Exception& ex){ cb->exCB(ex); });
+ cb->check();
+ }
+
+ {
+ CallbackPtr cb = new Callback;
+ p->begin_opMyEnum(Test::enum2,
+ [=](Test::MyEnum p1, Test::MyEnum p2){ cb->opMyEnum(p1, p2); },
+ [=](const Ice::Exception& ex){ cb->exCB(ex); });
+ cb->check();
+ }
+
+ {
+ CallbackPtr cb = new Callback(communicator);
+ p->begin_opMyClass(p,
+ [=](const Test::MyClassPrx& p1, const Test::MyClassPrx p2, const Test::MyClassPrx p3)
+ {
+ cb->opMyClass(p1, p2, p3);
+ },
+ [=](const Ice::Exception& ex){ cb->exCB(ex); });
+ cb->check();
+ }
+
+ {
+ Test::Structure si1;
+ si1.p = p;
+ si1.e = Test::enum3;
+ si1.s.s = "abc";
+ Test::Structure si2;
+ si2.p = 0;
+ si2.e = Test::enum2;
+ si2.s.s = "def";
+
+ CallbackPtr cb = new Callback(communicator);
+ p->begin_opStruct(si1, si2,
+ [=](const Test::Structure& p1, const Test::Structure& p2)
+ {
+ cb->opStruct(p1, p2);
+ },
+ [=](const Ice::Exception& ex){ cb->exCB(ex); });
+ cb->check();
+ }
+
+ {
+ Test::ByteS bsi1;
+ Test::ByteS bsi2;
+
+ bsi1.push_back(Ice::Byte(0x01));
+ bsi1.push_back(Ice::Byte(0x11));
+ bsi1.push_back(Ice::Byte(0x12));
+ bsi1.push_back(Ice::Byte(0x22));
+
+ bsi2.push_back(Ice::Byte(0xf1));
+ bsi2.push_back(Ice::Byte(0xf2));
+ bsi2.push_back(Ice::Byte(0xf3));
+ bsi2.push_back(Ice::Byte(0xf4));
+
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opByteSPtr callback = Test::newCallback_MyClass_opByteS(cb,
+ &Callback::opByteS,
+ &Callback::exCB);
+ p->begin_opByteS(bsi1, bsi2,
+ [=](const Test::ByteS& p1, const Test::ByteS& p2)
+ {
+ cb->opByteS(p1, p2);
+ },
+ [=](const Ice::Exception& ex){ cb->exCB(ex); });
+ cb->check();
+ }
+
+ {
+ Test::BoolS bsi1;
+ Test::BoolS bsi2;
+
+ bsi1.push_back(true);
+ bsi1.push_back(true);
+ bsi1.push_back(false);
+
+ bsi2.push_back(false);
+
+ CallbackPtr cb = new Callback;
+ p->begin_opBoolS(bsi1, bsi2,
+ [=](const Test::BoolS& p1, const Test::BoolS& p2)
+ {
+ cb->opBoolS(p1, p2);
+ },
+ [=](const Ice::Exception& ex){ cb->exCB(ex); });
+ cb->check();
+ }
+
+ {
+ Test::ShortS ssi;
+ Test::IntS isi;
+ Test::LongS lsi;
+
+ ssi.push_back(1);
+ ssi.push_back(2);
+ ssi.push_back(3);
+
+ isi.push_back(5);
+ isi.push_back(6);
+ isi.push_back(7);
+ isi.push_back(8);
+
+ lsi.push_back(10);
+ lsi.push_back(30);
+ lsi.push_back(20);
+
+ CallbackPtr cb = new Callback;
+ p->begin_opShortIntLongS(ssi, isi, lsi,
+ [=](const Test::LongS& p1, const Test::ShortS& p2, const Test::IntS& p3, const Test::LongS& p4)
+ {
+ cb->opShortIntLongS(p1, p2, p3, p4);
+ },
+ [=](const Ice::Exception& ex){ cb->exCB(ex); });
+ cb->check();
+ }
+
+ {
+ Test::FloatS fsi;
+ Test::DoubleS dsi;
+
+ fsi.push_back(Ice::Float(3.14));
+ fsi.push_back(Ice::Float(1.11));
+
+ dsi.push_back(Ice::Double(1.1E10));
+ dsi.push_back(Ice::Double(1.2E10));
+ dsi.push_back(Ice::Double(1.3E10));
+
+ CallbackPtr cb = new Callback;
+ p->begin_opFloatDoubleS(fsi, dsi,
+ [=](const Test::DoubleS& p1, const Test::FloatS& p2, const Test::DoubleS& p3)
+ {
+ cb->opFloatDoubleS(p1, p2, p3);
+ },
+ [=](const Ice::Exception& ex){ cb->exCB(ex); });
+ cb->check();
+ }
+
+ {
+ Test::StringS ssi1;
+ Test::StringS ssi2;
+
+ ssi1.push_back("abc");
+ ssi1.push_back("de");
+ ssi1.push_back("fghi");
+
+ ssi2.push_back("xyz");
+
+ CallbackPtr cb = new Callback;
+ p->begin_opStringS(ssi1, ssi2,
+ [=](const Test::StringS& p1, const Test::StringS& p2)
+ {
+ cb->opStringS(p1, p2);
+ },
+ [=](const Ice::Exception& ex){ cb->exCB(ex); });
+ cb->check();
+ }
+
+ {
+ Test::ByteSS bsi1;
+ bsi1.resize(2);
+ Test::ByteSS bsi2;
+ bsi2.resize(2);
+
+ bsi1[0].push_back(Ice::Byte(0x01));
+ bsi1[0].push_back(Ice::Byte(0x11));
+ bsi1[0].push_back(Ice::Byte(0x12));
+ bsi1[1].push_back(Ice::Byte(0xff));
+
+ bsi2[0].push_back(Ice::Byte(0x0e));
+ bsi2[1].push_back(Ice::Byte(0xf2));
+ bsi2[1].push_back(Ice::Byte(0xf1));
+
+ CallbackPtr cb = new Callback;
+ p->begin_opByteSS(bsi1, bsi2,
+ [=](const Test::ByteSS& p1, const Test::ByteSS& p2)
+ {
+ cb->opByteSS(p1, p2);
+ },
+ [=](const Ice::Exception& ex){ cb->exCB(ex); });
+ cb->check();
+ }
+
+ {
+ Test::FloatSS fsi;
+ fsi.resize(3);
+ Test::DoubleSS dsi;
+ dsi.resize(1);
+
+ fsi[0].push_back(Ice::Float(3.14));
+ fsi[1].push_back(Ice::Float(1.11));
+
+ dsi[0].push_back(Ice::Double(1.1E10));
+ dsi[0].push_back(Ice::Double(1.2E10));
+ dsi[0].push_back(Ice::Double(1.3E10));
+
+ CallbackPtr cb = new Callback;
+ p->begin_opFloatDoubleSS(fsi, dsi,
+ [=](const Test::DoubleSS& p1, const Test::FloatSS& p2, const Test::DoubleSS& p3)
+ {
+ cb->opFloatDoubleSS(p1, p2, p3);
+ },
+ [=](const Ice::Exception& ex){ cb->exCB(ex); });
+ cb->check();
+ }
+
+ {
+ Test::StringSS ssi1;
+ ssi1.resize(2);
+ Test::StringSS ssi2;
+ ssi2.resize(3);
+
+ ssi1[0].push_back("abc");
+ ssi1[1].push_back("de");
+ ssi1[1].push_back("fghi");
+
+ ssi2[2].push_back("xyz");
+
+ CallbackPtr cb = new Callback;
+ p->begin_opStringSS(ssi1, ssi2,
+ [=](const Test::StringSS& p1, const Test::StringSS& p2)
+ {
+ cb->opStringSS(p1, p2);
+ },
+ [=](const Ice::Exception& ex){ cb->exCB(ex); });
+ cb->check();
+ }
+
+ {
+ Test::ByteBoolD di1;
+ di1[10] = true;
+ di1[100] = false;
+ Test::ByteBoolD di2;
+ di2[10] = true;
+ di2[11] = false;
+ di2[101] = true;
+
+ CallbackPtr cb = new Callback;
+ p->begin_opByteBoolD(di1, di2,
+ [=](const Test::ByteBoolD& p1, const Test::ByteBoolD& p2)
+ {
+ cb->opByteBoolD(p1, p2);
+ },
+ [=](const Ice::Exception& ex)
+ {
+ cb->exCB(ex);
+ });
+ cb->check();
+ }
+
+ {
+ Test::ShortIntD di1;
+ di1[110] = -1;
+ di1[1100] = 123123;
+ Test::ShortIntD di2;
+ di2[110] = -1;
+ di2[111] = -100;
+ di2[1101] = 0;
+
+ CallbackPtr cb = new Callback;
+ p->begin_opShortIntD(di1, di2,
+ [=](const Test::ShortIntD& p1, const Test::ShortIntD& p2)
+ {
+ cb->opShortIntD(p1, p2);
+ },
+ [=](const Ice::Exception& ex)
+ {
+ cb->exCB(ex);
+ });
+ cb->check();
+ }
+
+ {
+ Test::LongFloatD di1;
+ di1[999999110] = Ice::Float(-1.1);
+ di1[999999111] = Ice::Float(123123.2);
+ Test::LongFloatD di2;
+ di2[999999110] = Ice::Float(-1.1);
+ di2[999999120] = Ice::Float(-100.4);
+ di2[999999130] = Ice::Float(0.5);
+
+ CallbackPtr cb = new Callback;
+ p->begin_opLongFloatD(di1, di2,
+ [=](const Test::LongFloatD& p1, const Test::LongFloatD& p2)
+ {
+ cb->opLongFloatD(p1, p2);
+ },
+ [=](const Ice::Exception& ex)
+ {
+ cb->exCB(ex);
+ });
+ cb->check();
+ }
+
+ {
+ Test::StringStringD di1;
+ di1["foo"] = "abc -1.1";
+ di1["bar"] = "abc 123123.2";
+ Test::StringStringD di2;
+ di2["foo"] = "abc -1.1";
+ di2["FOO"] = "abc -100.4";
+ di2["BAR"] = "abc 0.5";
+
+ CallbackPtr cb = new Callback;
+ p->begin_opStringStringD(di1, di2,
+ [=](const Test::StringStringD& p1, const Test::StringStringD& p2)
+ {
+ cb->opStringStringD(p1, p2);
+ },
+ [=](const Ice::Exception& ex)
+ {
+ cb->exCB(ex);
+ });
+ cb->check();
+ }
+
+ {
+ Test::StringMyEnumD di1;
+ di1["abc"] = Test::enum1;
+ di1[""] = Test::enum2;
+ Test::StringMyEnumD di2;
+ di2["abc"] = Test::enum1;
+ di2["qwerty"] = Test::enum3;
+ di2["Hello!!"] = Test::enum2;
+
+ CallbackPtr cb = new Callback;
+ p->begin_opStringMyEnumD(di1, di2,
+ [=](const Test::StringMyEnumD& p1, const Test::StringMyEnumD& p2)
+ {
+ cb->opStringMyEnumD(p1, p2);
+ },
+ [=](const Ice::Exception& ex)
+ {
+ cb->exCB(ex);
+ });
+ cb->check();
+ }
+
+ {
+ Test::MyStruct s11 = { 1, 1 };
+ Test::MyStruct s12 = { 1, 2 };
+ Test::MyStructMyEnumD di1;
+ di1[s11] = Test::enum1;
+ di1[s12] = Test::enum2;
+
+ Test::MyStruct s22 = { 2, 2 };
+ Test::MyStruct s23 = { 2, 3 };
+ Test::MyStructMyEnumD di2;
+ di2[s11] = Test::enum1;
+ di2[s22] = Test::enum3;
+ di2[s23] = Test::enum2;
+
+ CallbackPtr cb = new Callback;
+ p->begin_opMyStructMyEnumD(di1, di2,
+ [=](const Test::MyStructMyEnumD& p1, const Test::MyStructMyEnumD& p2)
+ {
+ cb->opMyStructMyEnumD(p1, p2);
+ },
+ [=](const Ice::Exception& ex)
+ {
+ cb->exCB(ex);
+ });
+ cb->check();
+ }
+
+ {
+ const int lengths[] = { 0, 1, 2, 126, 127, 128, 129, 253, 254, 255, 256, 257, 1000 };
+
+ for(unsigned int l = 0; l != sizeof(lengths) / sizeof(*lengths); ++l)
+ {
+ Test::IntS s;
+ for(int i = 0; i < lengths[l]; ++i)
+ {
+ s.push_back(i);
+ }
+ CallbackPtr cb = new Callback;
+ p->begin_opIntS(s,
+ [=](const Test::IntS& p1)
+ {
+ cb->opIntS(p1);
+ },
+ [=](const Ice::Exception& ex)
+ {
+ cb->exCB(ex);
+ });
+ cb->check();
+ }
+ }
+
+ {
+ Ice::Double d = 1278312346.0 / 13.0;
+ Test::DoubleS ds(5, d);
+ CallbackPtr cb = new Callback;
+ p->begin_opDoubleMarshaling(d, ds,
+ [=](){ cb->opDoubleMarshaling(); },
+ [=](const Ice::Exception& ex){ cb->exCB(ex); });
+ cb->check();
+ }
+
+ {
+ CallbackPtr cb = new Callback;
+ Test::Callback_MyClass_opIdempotentPtr callback =
+ Test::newCallback_MyClass_opIdempotent(cb, &Callback::opIdempotent, &Callback::exCB);
+ p->begin_opIdempotent([=](){ cb->opIdempotent(); },
+ [=](const Ice::Exception& ex){ cb->exCB(ex); });
+ cb->check();
+ }
+
+ {
+ CallbackPtr cb = new Callback;
+ p->begin_opNonmutating([=](){ cb->opNonmutating(); },
+ [=](const Ice::Exception& ex){ cb->exCB(ex); });
+ cb->check();
+ }
+
+ {
+ Test::MyDerivedClassPrx derived = Test::MyDerivedClassPrx::checkedCast(p);
+ test(derived);
+ CallbackPtr cb = new Callback;
+ derived->begin_opDerived([=](){ cb->opDerived(); },
+ [=](const Ice::Exception& ex){ cb->exCB(ex); });
+ cb->check();
+ }
+#endif
}
diff --git a/cpp/test/Ice/operations/TwowaysNewAMI.cpp b/cpp/test/Ice/operations/TwowaysNewAMI.cpp
deleted file mode 100644
index c3b8c29f14f..00000000000
--- a/cpp/test/Ice/operations/TwowaysNewAMI.cpp
+++ /dev/null
@@ -1,1665 +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.
-//
-// **********************************************************************
-
-#include <Ice/Ice.h>
-#include <TestCommon.h>
-#include <Test.h>
-
-//
-// Work-around for GCC warning bug
-//
-#if defined(__GNUC__)
-# pragma GCC diagnostic ignored "-Wstrict-aliasing"
-#endif
-
-using namespace std;
-
-namespace
-{
-
-class CallbackBase : public Ice::LocalObject
-{
-public:
-
- CallbackBase() :
- _called(false)
- {
- }
-
- virtual ~CallbackBase()
- {
- }
-
- void check()
- {
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_m);
- while(!_called)
- {
- _m.wait();
- }
- _called = false;
- }
-
-protected:
-
- void called()
- {
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_m);
- assert(!_called);
- _called = true;
- _m.notify();
- }
-
-private:
-
- IceUtil::Monitor<IceUtil::Mutex> _m;
- bool _called;
-};
-
-typedef IceUtil::Handle<CallbackBase> CallbackBasePtr;
-
-class Callback : public CallbackBase
-{
-public:
-
- Callback()
- {
- }
-
- Callback(const Ice::CommunicatorPtr& communicator)
- : _communicator(communicator)
- {
- }
-
- void ping()
- {
- called();
- }
-
- void isA(bool result)
- {
- test(result);
- called();
- }
-
- void id(const string& id)
- {
- test(id == Test::MyDerivedClass::ice_staticId());
- called();
- }
-
- void ids(const Ice::StringSeq& ids)
- {
- test(ids.size() == 3);
- test(ids[0] == "::Ice::Object");
- test(ids[1] == "::Test::MyClass");
- test(ids[2] == "::Test::MyDerivedClass");
- called();
- }
-
- void opVoid()
- {
- called();
- }
-
- void opContext(const Ice::Context&)
- {
- called();
- }
-
- void opByte(Ice::Byte r, Ice::Byte b)
- {
- test(b == Ice::Byte(0xf0));
- test(r == Ice::Byte(0xff));
- called();
- }
-
- void opBool(bool r, bool b)
- {
- test(b);
- test(!r);
- called();
- }
-
- void opShortIntLong(Ice::Long r, Ice::Short s, Ice::Int i, Ice::Long l)
- {
- test(s == 10);
- test(i == 11);
- test(l == 12);
- test(r == 12);
- called();
- }
-
- void opFloatDouble(Ice::Double r, Ice::Float f, Ice::Double d)
- {
- test(f == Ice::Float(3.14));
- test(d == Ice::Double(1.1E10));
- test(r == Ice::Double(1.1E10));
- called();
- }
-
- void opString(const ::std::string& r, const ::std::string& s)
- {
- test(s == "world hello");
- test(r == "hello world");
- called();
- }
-
- void opMyEnum(Test::MyEnum r, Test::MyEnum e)
- {
- test(e == Test::enum2);
- test(r == Test::enum3);
- called();
- }
-
- void opMyClass(const Test::MyClassPrx& r, const Test::MyClassPrx& c1, const Test::MyClassPrx& c2)
- {
- test(c1->ice_getIdentity() == _communicator->stringToIdentity("test"));
- test(c2->ice_getIdentity() == _communicator->stringToIdentity("noSuchIdentity"));
- test(r->ice_getIdentity() == _communicator->stringToIdentity("test"));
-
- //
- // We can't do the callbacks below in connection serialization mode.
- //
- if(_communicator->getProperties()->getPropertyAsInt("Ice.ThreadPool.Client.Serialize"))
- {
- r->opVoid();
- c1->opVoid();
- try
- {
- c2->opVoid();
- test(false);
- }
- catch(const Ice::ObjectNotExistException&)
- {
- }
- }
- called();
- }
-
- void opStruct(const Test::Structure& rso, const Test::Structure& so)
- {
- test(rso.p == 0);
- test(rso.e == Test::enum2);
- test(rso.s.s == "def");
- test(so.e == Test::enum3);
- test(so.s.s == "a new string");
-
- //
- // We can't do the callbacks below in connection serialization mode.
- //
- if(_communicator->getProperties()->getPropertyAsInt("Ice.ThreadPool.Client.Serialize"))
- {
- so.p->opVoid();
- }
- called();
- }
-
- void opByteS(const Test::ByteS& rso, const Test::ByteS& bso)
- {
- test(bso.size() == 4);
- test(bso[0] == Ice::Byte(0x22));
- test(bso[1] == Ice::Byte(0x12));
- test(bso[2] == Ice::Byte(0x11));
- test(bso[3] == Ice::Byte(0x01));
- test(rso.size() == 8);
- test(rso[0] == Ice::Byte(0x01));
- test(rso[1] == Ice::Byte(0x11));
- test(rso[2] == Ice::Byte(0x12));
- test(rso[3] == Ice::Byte(0x22));
- test(rso[4] == Ice::Byte(0xf1));
- test(rso[5] == Ice::Byte(0xf2));
- test(rso[6] == Ice::Byte(0xf3));
- test(rso[7] == Ice::Byte(0xf4));
- called();
- }
-
- void opBoolS(const Test::BoolS& rso, const Test::BoolS& bso)
- {
- test(bso.size() == 4);
- test(bso[0]);
- test(bso[1]);
- test(!bso[2]);
- test(!bso[3]);
- test(rso.size() == 3);
- test(!rso[0]);
- test(rso[1]);
- test(rso[2]);
- called();
- }
-
- void opShortIntLongS(const Test::LongS& rso, const Test::ShortS& sso, const Test::IntS& iso, const Test::LongS& lso)
- {
- test(sso.size() == 3);
- test(sso[0] == 1);
- test(sso[1] == 2);
- test(sso[2] == 3);
- test(iso.size() == 4);
- test(iso[0] == 8);
- test(iso[1] == 7);
- test(iso[2] == 6);
- test(iso[3] == 5);
- test(lso.size() == 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.size() == 3);
- test(rso[0] == 10);
- test(rso[1] == 30);
- test(rso[2] == 20);
- called();
- }
-
- void opFloatDoubleS(const Test::DoubleS& rso, const Test::FloatS& fso, const Test::DoubleS& dso)
- {
- test(fso.size() == 2);
- test(fso[0] == ::Ice::Float(3.14));
- test(fso[1] == ::Ice::Float(1.11));
- test(dso.size() == 3);
- test(dso[0] == ::Ice::Double(1.3E10));
- test(dso[1] == ::Ice::Double(1.2E10));
- test(dso[2] == ::Ice::Double(1.1E10));
- test(rso.size() == 5);
- test(rso[0] == ::Ice::Double(1.1E10));
- test(rso[1] == ::Ice::Double(1.2E10));
- test(rso[2] == ::Ice::Double(1.3E10));
- test(::Ice::Float(rso[3]) == ::Ice::Float(3.14));
- test(::Ice::Float(rso[4]) == ::Ice::Float(1.11));
- called();
- }
-
- void opStringS(const Test::StringS& rso, const Test::StringS& sso)
- {
- test(sso.size() == 4);
- test(sso[0] == "abc");
- test(sso[1] == "de");
- test(sso[2] == "fghi");
- test(sso[3] == "xyz");
- test(rso.size() == 3);
- test(rso[0] == "fghi");
- test(rso[1] == "de");
- test(rso[2] == "abc");
- called();
- }
-
- void opByteSS(const Test::ByteSS& rso, const Test::ByteSS& bso)
- {
- test(bso.size() == 2);
- test(bso[0].size() == 1);
- test(bso[0][0] == Ice::Byte(0xff));
- test(bso[1].size() == 3);
- test(bso[1][0] == Ice::Byte(0x01));
- test(bso[1][1] == Ice::Byte(0x11));
- test(bso[1][2] == Ice::Byte(0x12));
- test(rso.size() == 4);
- test(rso[0].size() == 3);
- test(rso[0][0] == Ice::Byte(0x01));
- test(rso[0][1] == Ice::Byte(0x11));
- test(rso[0][2] == Ice::Byte(0x12));
- test(rso[1].size() == 1);
- test(rso[1][0] == Ice::Byte(0xff));
- test(rso[2].size() == 1);
- test(rso[2][0] == Ice::Byte(0x0e));
- test(rso[3].size() == 2);
- test(rso[3][0] == Ice::Byte(0xf2));
- test(rso[3][1] == Ice::Byte(0xf1));
- called();
- }
-
- void opBoolSS(const Test::BoolSS& rso, const Test::BoolSS& bso)
- {
- test(bso.size() == 4);
- test(bso[0].size() == 1);
- test(bso[0][0]);
- test(bso[1].size() == 1);
- test(!bso[1][0]);
- test(bso[2].size() == 2);
- test(bso[2][0]);
- test(bso[2][1]);
- test(bso[3].size() == 3);
- test(!bso[3][0]);
- test(!bso[3][1]);
- test(bso[3][2]);
- test(rso.size() == 3);
- test(rso[0].size() == 2);
- test(rso[0][0]);
- test(rso[0][1]);
- test(rso[1].size() == 1);
- test(!rso[1][0]);
- test(rso[2].size() == 1);
- test(rso[2][0]);
- called();
- }
-
- void opShortIntLongSS(const Test::LongSS& rso,
- const Test::ShortSS& sso,
- const Test::IntSS& iso,
- const Test::LongSS& lso)
- {
- test(rso.size() == 1);
- test(rso[0].size() == 2);
- test(rso[0][0] == 496);
- test(rso[0][1] == 1729);
- test(sso.size() == 3);
- test(sso[0].size() == 3);
- test(sso[0][0] == 1);
- test(sso[0][1] == 2);
- test(sso[0][2] == 5);
- test(sso[1].size() == 1);
- test(sso[1][0] == 13);
- test(sso[2].size() == 0);
- test(iso.size() == 2);
- test(iso[0].size() == 1);
- test(iso[0][0] == 42);
- test(iso[1].size() == 2);
- test(iso[1][0] == 24);
- test(iso[1][1] == 98);
- test(lso.size() == 2);
- test(lso[0].size() == 2);
- test(lso[0][0] == 496);
- test(lso[0][1] == 1729);
- test(lso[1].size() == 2);
- test(lso[1][0] == 496);
- test(lso[1][1] == 1729);
- called();
- }
-
- void opFloatDoubleSS(const Test::DoubleSS& rso, const Test::FloatSS& fso, const Test::DoubleSS& dso)
- {
- test(fso.size() == 3);
- test(fso[0].size() == 1);
- test(fso[0][0] == ::Ice::Float(3.14));
- test(fso[1].size() == 1);
- test(fso[1][0] == ::Ice::Float(1.11));
- test(fso[2].size() == 0);
- test(dso.size() == 1);
- test(dso[0].size() == 3);
- test(dso[0][0] == ::Ice::Double(1.1E10));
- test(dso[0][1] == ::Ice::Double(1.2E10));
- test(dso[0][2] == ::Ice::Double(1.3E10));
- test(rso.size() == 2);
- test(rso[0].size() == 3);
- test(rso[0][0] == ::Ice::Double(1.1E10));
- test(rso[0][1] == ::Ice::Double(1.2E10));
- test(rso[0][2] == ::Ice::Double(1.3E10));
- test(rso[1].size() == 3);
- test(rso[1][0] == ::Ice::Double(1.1E10));
- test(rso[1][1] == ::Ice::Double(1.2E10));
- test(rso[1][2] == ::Ice::Double(1.3E10));
- called();
- }
-
- void opStringSS(const Test::StringSS& rso, const Test::StringSS& sso)
- {
- test(sso.size() == 5);
- test(sso[0].size() == 1);
- test(sso[0][0] == "abc");
- test(sso[1].size() == 2);
- test(sso[1][0] == "de");
- test(sso[1][1] == "fghi");
- test(sso[2].size() == 0);
- test(sso[3].size() == 0);
- test(sso[4].size() == 1);
- test(sso[4][0] == "xyz");
- test(rso.size() == 3);
- test(rso[0].size() == 1);
- test(rso[0][0] == "xyz");
- test(rso[1].size() == 0);
- test(rso[2].size() == 0);
- called();
- }
-
- void opByteBoolD(const Test::ByteBoolD& ro, const Test::ByteBoolD& _do)
- {
- Test::ByteBoolD di1;
- di1[10] = true;
- di1[100] = false;
- test(_do == di1);
- test(ro.size() == 4);
- test(ro.find(10) != ro.end());
- test(ro.find(10)->second == true);
- test(ro.find(11) != ro.end());
- test(ro.find(11)->second == false);
- test(ro.find(100) != ro.end());
- test(ro.find(100)->second == false);
- test(ro.find(101) != ro.end());
- test(ro.find(101)->second == true);
- called();
- }
-
- void opShortIntD(const Test::ShortIntD& ro, const Test::ShortIntD& _do)
- {
- Test::ShortIntD di1;
- di1[110] = -1;
- di1[1100] = 123123;
- test(_do == di1);
- test(ro.size() == 4);
- test(ro.find(110) != ro.end());
- test(ro.find(110)->second == -1);
- test(ro.find(111) != ro.end());
- test(ro.find(111)->second == -100);
- test(ro.find(1100) != ro.end());
- test(ro.find(1100)->second == 123123);
- test(ro.find(1101) != ro.end());
- test(ro.find(1101)->second == 0);
- called();
- }
-
- void opLongFloatD(const Test::LongFloatD& ro, const Test::LongFloatD& _do)
- {
- Test::LongFloatD di1;
- di1[999999110] = Ice::Float(-1.1);
- di1[999999111] = Ice::Float(123123.2);
- test(_do == di1);
- test(ro.size() == 4);
- test(ro.find(999999110) != ro.end());
- test(ro.find(999999110)->second == Ice::Float(-1.1));
- test(ro.find(999999120) != ro.end());
- test(ro.find(999999120)->second == Ice::Float(-100.4));
- test(ro.find(999999111) != ro.end());
- test(ro.find(999999111)->second == Ice::Float(123123.2));
- test(ro.find(999999130) != ro.end());
- test(ro.find(999999130)->second == Ice::Float(0.5));
- called();
- }
-
- void opStringStringD(const Test::StringStringD& ro, const Test::StringStringD& _do)
- {
- Test::StringStringD di1;
- di1["foo"] = "abc -1.1";
- di1["bar"] = "abc 123123.2";
- test(_do == di1);
- test(ro.size() == 4);
- test(ro.find("foo") != ro.end());
- test(ro.find("foo")->second == "abc -1.1");
- test(ro.find("FOO") != ro.end());
- test(ro.find("FOO")->second == "abc -100.4");
- test(ro.find("bar") != ro.end());
- test(ro.find("bar")->second == "abc 123123.2");
- test(ro.find("BAR") != ro.end());
- test(ro.find("BAR")->second == "abc 0.5");
- called();
- }
-
- void opStringMyEnumD(const Test::StringMyEnumD& ro, const Test::StringMyEnumD& _do)
- {
- Test::StringMyEnumD di1;
- di1["abc"] = Test::enum1;
- di1[""] = Test::enum2;
- test(_do == di1);
- test(ro.size() == 4);
- test(ro.find("abc") != ro.end());
- test(ro.find("abc")->second == Test::enum1);
- test(ro.find("qwerty") != ro.end());
- test(ro.find("qwerty")->second == Test::enum3);
- test(ro.find("") != ro.end());
- test(ro.find("")->second == Test::enum2);
- test(ro.find("Hello!!") != ro.end());
- test(ro.find("Hello!!")->second == Test::enum2);
- called();
- }
-
- void opMyStructMyEnumD(const Test::MyStructMyEnumD& ro, const Test::MyStructMyEnumD& _do)
- {
- Test::MyStruct s11 = { 1, 1 };
- Test::MyStruct s12 = { 1, 2 };
- Test::MyStructMyEnumD di1;
- di1[s11] = Test::enum1;
- di1[s12] = Test::enum2;
- test(_do == di1);
- Test::MyStruct s22 = { 2, 2 };
- Test::MyStruct s23 = { 2, 3 };
- test(ro.size() == 4);
- test(ro.find(s11) != ro.end());
- test(ro.find(s11)->second == Test::enum1);
- test(ro.find(s12) != ro.end());
- test(ro.find(s12)->second == Test::enum2);
- test(ro.find(s22) != ro.end());
- test(ro.find(s22)->second == Test::enum3);
- test(ro.find(s23) != ro.end());
- test(ro.find(s23)->second == Test::enum2);
- called();
- }
-
- void opIntS(const Test::IntS& r)
- {
- for(int j = 0; j < static_cast<int>(r.size()); ++j)
- {
- test(r[j] == -j);
- }
- called();
- }
-
- void opDoubleMarshaling()
- {
- called();
- }
-
- void opIdempotent()
- {
- called();
- }
-
- void opNonmutating()
- {
- called();
- }
-
- void opDerived()
- {
- called();
- }
-
- void exCB(const Ice::Exception&)
- {
- test(false);
- }
-
-private:
-
- Ice::CommunicatorPtr _communicator;
-};
-typedef IceUtil::Handle<Callback> CallbackPtr;
-
-}
-
-void
-twowaysNewAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
-{
- {
- CallbackPtr cb = new Callback;
- Ice::Callback_Object_ice_pingPtr callback = Ice::newCallback_Object_ice_ping(cb,
- &Callback::ping,
- &Callback::exCB);
- p->begin_ice_ping(callback);
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- Ice::Callback_Object_ice_isAPtr callback = Ice::newCallback_Object_ice_isA(cb,
- &Callback::isA,
- &Callback::exCB);
- p->begin_ice_isA(Test::MyClass::ice_staticId(), callback);
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- Ice::Callback_Object_ice_idPtr callback = Ice::newCallback_Object_ice_id(cb,
- &Callback::id,
- &Callback::exCB);
- p->begin_ice_id(callback);
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- Ice::Callback_Object_ice_idsPtr callback = Ice::newCallback_Object_ice_ids(cb,
- &Callback::ids,
- &Callback::exCB);
- p->begin_ice_ids(callback);
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opVoidPtr callback = Test::newCallback_MyClass_opVoid(cb,
- &Callback::opVoid,
- &Callback::exCB);
- p->begin_opVoid(callback);
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opBytePtr callback = Test::newCallback_MyClass_opByte(cb,
- &Callback::opByte,
- &Callback::exCB);
- p->begin_opByte(Ice::Byte(0xff), Ice::Byte(0x0f), callback);
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opBoolPtr callback = Test::newCallback_MyClass_opBool(cb,
- &Callback::opBool,
- &Callback::exCB);
- p->begin_opBool(true, false, callback);
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opShortIntLongPtr callback =
- Test::newCallback_MyClass_opShortIntLong(cb, &Callback::opShortIntLong, &Callback::exCB);
- p->begin_opShortIntLong(10, 11, 12, callback);
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opFloatDoublePtr callback =
- Test::newCallback_MyClass_opFloatDouble(cb, &Callback::opFloatDouble, &Callback::exCB);
- p->begin_opFloatDouble(Ice::Float(3.14), Ice::Double(1.1E10), callback);
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opStringPtr callback = Test::newCallback_MyClass_opString(cb,
- &Callback::opString,
- &Callback::exCB);
- p->begin_opString("hello", "world", callback);
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opMyEnumPtr callback = Test::newCallback_MyClass_opMyEnum(cb,
- &Callback::opMyEnum,
- &Callback::exCB);
- p->begin_opMyEnum(Test::enum2, callback);
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback(communicator);
- Test::Callback_MyClass_opMyClassPtr callback = Test::newCallback_MyClass_opMyClass(cb,
- &Callback::opMyClass,
- &Callback::exCB);
- p->begin_opMyClass(p, callback);
- cb->check();
- }
-
- {
- Test::Structure si1;
- si1.p = p;
- si1.e = Test::enum3;
- si1.s.s = "abc";
- Test::Structure si2;
- si2.p = 0;
- si2.e = Test::enum2;
- si2.s.s = "def";
-
- CallbackPtr cb = new Callback(communicator);
- Test::Callback_MyClass_opStructPtr callback = Test::newCallback_MyClass_opStruct(cb,
- &Callback::opStruct,
- &Callback::exCB);
- p->begin_opStruct(si1, si2, callback);
- cb->check();
- }
-
- {
- Test::ByteS bsi1;
- Test::ByteS bsi2;
-
- bsi1.push_back(Ice::Byte(0x01));
- bsi1.push_back(Ice::Byte(0x11));
- bsi1.push_back(Ice::Byte(0x12));
- bsi1.push_back(Ice::Byte(0x22));
-
- bsi2.push_back(Ice::Byte(0xf1));
- bsi2.push_back(Ice::Byte(0xf2));
- bsi2.push_back(Ice::Byte(0xf3));
- bsi2.push_back(Ice::Byte(0xf4));
-
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opByteSPtr callback = Test::newCallback_MyClass_opByteS(cb,
- &Callback::opByteS,
- &Callback::exCB);
- p->begin_opByteS(bsi1, bsi2, callback);
- cb->check();
- }
-
- {
- Test::BoolS bsi1;
- Test::BoolS bsi2;
-
- bsi1.push_back(true);
- bsi1.push_back(true);
- bsi1.push_back(false);
-
- bsi2.push_back(false);
-
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opBoolSPtr callback = Test::newCallback_MyClass_opBoolS(cb,
- &Callback::opBoolS,
- &Callback::exCB);
- p->begin_opBoolS(bsi1, bsi2, callback);
- cb->check();
- }
-
- {
- Test::ShortS ssi;
- Test::IntS isi;
- Test::LongS lsi;
-
- ssi.push_back(1);
- ssi.push_back(2);
- ssi.push_back(3);
-
- isi.push_back(5);
- isi.push_back(6);
- isi.push_back(7);
- isi.push_back(8);
-
- lsi.push_back(10);
- lsi.push_back(30);
- lsi.push_back(20);
-
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opShortIntLongSPtr callback =
- Test::newCallback_MyClass_opShortIntLongS(cb, &Callback::opShortIntLongS, &Callback::exCB);
- p->begin_opShortIntLongS(ssi, isi, lsi, callback);
- cb->check();
- }
-
- {
- Test::FloatS fsi;
- Test::DoubleS dsi;
-
- fsi.push_back(Ice::Float(3.14));
- fsi.push_back(Ice::Float(1.11));
-
- dsi.push_back(Ice::Double(1.1E10));
- dsi.push_back(Ice::Double(1.2E10));
- dsi.push_back(Ice::Double(1.3E10));
-
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opFloatDoubleSPtr callback =
- Test::newCallback_MyClass_opFloatDoubleS(cb, &Callback::opFloatDoubleS, &Callback::exCB);
- p->begin_opFloatDoubleS(fsi, dsi, callback);
- cb->check();
- }
-
- {
- Test::StringS ssi1;
- Test::StringS ssi2;
-
- ssi1.push_back("abc");
- ssi1.push_back("de");
- ssi1.push_back("fghi");
-
- ssi2.push_back("xyz");
-
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opStringSPtr callback = Test::newCallback_MyClass_opStringS(cb,
- &Callback::opStringS,
- &Callback::exCB);
- p->begin_opStringS(ssi1, ssi2, callback);
- cb->check();
- }
-
- {
- Test::ByteSS bsi1;
- bsi1.resize(2);
- Test::ByteSS bsi2;
- bsi2.resize(2);
-
- bsi1[0].push_back(Ice::Byte(0x01));
- bsi1[0].push_back(Ice::Byte(0x11));
- bsi1[0].push_back(Ice::Byte(0x12));
- bsi1[1].push_back(Ice::Byte(0xff));
-
- bsi2[0].push_back(Ice::Byte(0x0e));
- bsi2[1].push_back(Ice::Byte(0xf2));
- bsi2[1].push_back(Ice::Byte(0xf1));
-
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opByteSSPtr callback = Test::newCallback_MyClass_opByteSS(cb,
- &Callback::opByteSS,
- &Callback::exCB);
- p->begin_opByteSS(bsi1, bsi2, callback);
- cb->check();
- }
-
- {
- Test::BoolSS bsi1;
- bsi1.resize(3);
- Test::BoolSS bsi2;
- bsi2.resize(1);
-
- bsi1[0].push_back(true);
- bsi1[1].push_back(false);
- bsi1[2].push_back(true);
- bsi1[2].push_back(true);
-
- bsi2[0].push_back(false);
- bsi2[0].push_back(false);
- bsi2[0].push_back(true);
-
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opBoolSSPtr callback = Test::newCallback_MyClass_opBoolSS(cb,
- &Callback::opBoolSS,
- &Callback::exCB);
- p->begin_opBoolSS(bsi1, bsi2, callback);
- cb->check();
- }
-
- {
- Test::ShortSS ssi;
- ssi.resize(3);
- Test::IntSS isi;
- isi.resize(2);
- Test::LongSS lsi;
- lsi.resize(1);
- ssi[0].push_back(1);
- ssi[0].push_back(2);
- ssi[0].push_back(5);
- ssi[1].push_back(13);
- isi[0].push_back(24);
- isi[0].push_back(98);
- isi[1].push_back(42);
- lsi[0].push_back(496);
- lsi[0].push_back(1729);
-
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opShortIntLongSSPtr callback = Test::newCallback_MyClass_opShortIntLongSS(cb,
- &Callback::opShortIntLongSS,
- &Callback::exCB);
- p->begin_opShortIntLongSS(ssi, isi, lsi, callback);
- cb->check();
- }
-
- {
- Test::FloatSS fsi;
- fsi.resize(3);
- Test::DoubleSS dsi;
- dsi.resize(1);
-
- fsi[0].push_back(Ice::Float(3.14));
- fsi[1].push_back(Ice::Float(1.11));
-
- dsi[0].push_back(Ice::Double(1.1E10));
- dsi[0].push_back(Ice::Double(1.2E10));
- dsi[0].push_back(Ice::Double(1.3E10));
-
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opFloatDoubleSSPtr callback =
- Test::newCallback_MyClass_opFloatDoubleSS(cb, &Callback::opFloatDoubleSS, &Callback::exCB);
- p->begin_opFloatDoubleSS(fsi, dsi, callback);
- cb->check();
- }
-
- {
- Test::StringSS ssi1;
- ssi1.resize(2);
- Test::StringSS ssi2;
- ssi2.resize(3);
-
- ssi1[0].push_back("abc");
- ssi1[1].push_back("de");
- ssi1[1].push_back("fghi");
-
- ssi2[2].push_back("xyz");
-
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opStringSSPtr callback =
- Test::newCallback_MyClass_opStringSS(cb, &Callback::opStringSS, &Callback::exCB);
- p->begin_opStringSS(ssi1, ssi2, callback);
- cb->check();
- }
-
- {
- Test::ByteBoolD di1;
- di1[10] = true;
- di1[100] = false;
- Test::ByteBoolD di2;
- di2[10] = true;
- di2[11] = false;
- di2[101] = true;
-
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opByteBoolDPtr callback =
- Test::newCallback_MyClass_opByteBoolD(cb, &Callback::opByteBoolD, &Callback::exCB);
- p->begin_opByteBoolD(di1, di2, callback);
- cb->check();
- }
-
- {
- Test::ShortIntD di1;
- di1[110] = -1;
- di1[1100] = 123123;
- Test::ShortIntD di2;
- di2[110] = -1;
- di2[111] = -100;
- di2[1101] = 0;
-
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opShortIntDPtr callback =
- Test::newCallback_MyClass_opShortIntD(cb, &Callback::opShortIntD, &Callback::exCB);
- p->begin_opShortIntD(di1, di2, callback);
- cb->check();
- }
-
- {
- Test::LongFloatD di1;
- di1[999999110] = Ice::Float(-1.1);
- di1[999999111] = Ice::Float(123123.2);
- Test::LongFloatD di2;
- di2[999999110] = Ice::Float(-1.1);
- di2[999999120] = Ice::Float(-100.4);
- di2[999999130] = Ice::Float(0.5);
-
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opLongFloatDPtr callback =
- Test::newCallback_MyClass_opLongFloatD(cb, &Callback::opLongFloatD, &Callback::exCB);
- p->begin_opLongFloatD(di1, di2, callback);
- cb->check();
- }
-
- {
- Test::StringStringD di1;
- di1["foo"] = "abc -1.1";
- di1["bar"] = "abc 123123.2";
- Test::StringStringD di2;
- di2["foo"] = "abc -1.1";
- di2["FOO"] = "abc -100.4";
- di2["BAR"] = "abc 0.5";
-
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opStringStringDPtr callback =
- Test::newCallback_MyClass_opStringStringD(cb, &Callback::opStringStringD, &Callback::exCB);
- p->begin_opStringStringD(di1, di2, callback);
- cb->check();
- }
-
- {
- Test::StringMyEnumD di1;
- di1["abc"] = Test::enum1;
- di1[""] = Test::enum2;
- Test::StringMyEnumD di2;
- di2["abc"] = Test::enum1;
- di2["qwerty"] = Test::enum3;
- di2["Hello!!"] = Test::enum2;
-
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opStringMyEnumDPtr callback =
- Test::newCallback_MyClass_opStringMyEnumD(cb, &Callback::opStringMyEnumD, &Callback::exCB);
- p->begin_opStringMyEnumD(di1, di2, callback);
- cb->check();
- }
-
- {
- Test::MyStruct s11 = { 1, 1 };
- Test::MyStruct s12 = { 1, 2 };
- Test::MyStructMyEnumD di1;
- di1[s11] = Test::enum1;
- di1[s12] = Test::enum2;
-
- Test::MyStruct s22 = { 2, 2 };
- Test::MyStruct s23 = { 2, 3 };
- Test::MyStructMyEnumD di2;
- di2[s11] = Test::enum1;
- di2[s22] = Test::enum3;
- di2[s23] = Test::enum2;
-
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opMyStructMyEnumDPtr callback =
- Test::newCallback_MyClass_opMyStructMyEnumD(cb, &Callback::opMyStructMyEnumD, &Callback::exCB);
- p->begin_opMyStructMyEnumD(di1, di2, callback);
- cb->check();
- }
-
- {
- const int lengths[] = { 0, 1, 2, 126, 127, 128, 129, 253, 254, 255, 256, 257, 1000 };
-
- for(unsigned int l = 0; l != sizeof(lengths) / sizeof(*lengths); ++l)
- {
- Test::IntS s;
- for(int i = 0; i < lengths[l]; ++i)
- {
- s.push_back(i);
- }
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opIntSPtr callback =
- Test::newCallback_MyClass_opIntS(cb, &Callback::opIntS, &Callback::exCB);
- p->begin_opIntS(s, callback);
- cb->check();
- }
- }
-
- {
- Test::StringStringD ctx;
- ctx["one"] = "ONE";
- ctx["two"] = "TWO";
- ctx["three"] = "THREE";
- {
- test(p->ice_getContext().empty());
- Ice::AsyncResultPtr r = p->begin_opContext();
- Ice::Context c = p->end_opContext(r);
- test(c != ctx);
- }
- {
- test(p->ice_getContext().empty());
- Ice::AsyncResultPtr r = p->begin_opContext(ctx);
- Ice::Context c = p->end_opContext(r);
- test(c == ctx);
- }
- Test::MyClassPrx p2 = Test::MyClassPrx::checkedCast(p->ice_context(ctx));
- test(p2->ice_getContext() == ctx);
- {
- Ice::AsyncResultPtr r = p2->begin_opContext();
- Ice::Context c = p2->end_opContext(r);
- test(c == ctx);
- }
- {
- Test::MyClassPrx p2 = Test::MyClassPrx::checkedCast(p->ice_context(ctx));
- Ice::AsyncResultPtr r = p2->begin_opContext(ctx);
- Ice::Context c = p2->end_opContext(r);
- test(c == ctx);
- }
-
-#ifndef ICE_OS_WINRT
- {
- //
- // Test implicit context propagation
- //
-
- string impls[] = {"Shared", "PerThread"};
- for(int i = 0; i < 2; i++)
- {
- Ice::InitializationData initData;
- initData.properties = communicator->getProperties()->clone();
- initData.properties->setProperty("Ice.ImplicitContext", impls[i]);
-
- Ice::CommunicatorPtr ic = Ice::initialize(initData);
-
- Ice::Context ctx;
- ctx["one"] = "ONE";
- ctx["two"] = "TWO";
- ctx["three"] = "THREE";
-
-
- Test::MyClassPrx p = Test::MyClassPrx::uncheckedCast(
- ic->stringToProxy("test:default -p 12010"));
-
-
- ic->getImplicitContext()->setContext(ctx);
- test(ic->getImplicitContext()->getContext() == ctx);
- {
- Ice::AsyncResultPtr r = p->begin_opContext();
- Ice::Context c = p->end_opContext(r);
- test(c == ctx);
- }
-
- ic->getImplicitContext()->put("zero", "ZERO");
-
- ctx = ic->getImplicitContext()->getContext();
- {
- Ice::AsyncResultPtr r = p->begin_opContext();
- Ice::Context c = p->end_opContext(r);
- test(c == ctx);
- }
-
- Ice::Context prxContext;
- prxContext["one"] = "UN";
- prxContext["four"] = "QUATRE";
-
- Ice::Context combined = prxContext;
- combined.insert(ctx.begin(), ctx.end());
- test(combined["one"] == "UN");
-
- p = Test::MyClassPrx::uncheckedCast(p->ice_context(prxContext));
-
- ic->getImplicitContext()->setContext(Ice::Context());
- {
- Ice::AsyncResultPtr r = p->begin_opContext();
- Ice::Context c = p->end_opContext(r);
- test(c == prxContext);
- }
-
- ic->getImplicitContext()->setContext(ctx);
- {
- Ice::AsyncResultPtr r = p->begin_opContext();
- Ice::Context c = p->end_opContext(r);
- test(c == combined);
- }
-
- ic->getImplicitContext()->setContext(Ice::Context());
- ic->destroy();
- }
- }
-#endif
- }
-
- {
- Ice::Double d = 1278312346.0 / 13.0;
- Test::DoubleS ds(5, d);
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opDoubleMarshalingPtr callback =
- Test::newCallback_MyClass_opDoubleMarshaling(cb, &Callback::opDoubleMarshaling, &Callback::exCB);
- p->begin_opDoubleMarshaling(d, ds, callback);
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opIdempotentPtr callback =
- Test::newCallback_MyClass_opIdempotent(cb, &Callback::opIdempotent, &Callback::exCB);
- p->begin_opIdempotent(callback);
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opNonmutatingPtr callback =
- Test::newCallback_MyClass_opNonmutating(cb, &Callback::opNonmutating, &Callback::exCB);
- p->begin_opNonmutating(callback);
- cb->check();
- }
-
- {
- Test::MyDerivedClassPrx derived = Test::MyDerivedClassPrx::checkedCast(p);
- test(derived);
- CallbackPtr cb = new Callback;
- Test::Callback_MyDerivedClass_opDerivedPtr callback =
- Test::newCallback_MyDerivedClass_opDerived(cb, &Callback::opDerived, &Callback::exCB);
- derived->begin_opDerived(callback);
- cb->check();
- }
-#ifdef ICE_CPP11
-
- {
- CallbackPtr cb = new Callback;
- p->begin_ice_ping([=](){ cb->ping(); }, [=](const Ice::Exception& ex){ cb->exCB(ex); });
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- p->begin_ice_isA(Test::MyClass::ice_staticId(), [=](bool isA){ cb->isA(isA); }, [=](const Ice::Exception& ex){ cb->exCB(ex); });
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- p->begin_ice_id([=](const string& id){ cb->id(id); }, [=](const Ice::Exception& ex){ cb->exCB(ex); });
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- p->begin_ice_ids([=](const Ice::StringSeq& ids){ cb->ids(ids); }, [=](const Ice::Exception& ex){ cb->exCB(ex); });
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- p->begin_opVoid([=](){ cb->opVoid(); }, [=](const Ice::Exception& ex){ cb->exCB(ex); });
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- p->begin_opByte(Ice::Byte(0xff), Ice::Byte(0x0f),
- [=](const Ice::Byte& p1, const Ice::Byte& p2){ cb->opByte(p1, p2); },
- [=](const Ice::Exception& ex){ cb->exCB(ex); });
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opBoolPtr callback = Test::newCallback_MyClass_opBool(cb,
- &Callback::opBool,
- &Callback::exCB);
- p->begin_opBool(true, false, [=](bool p1, bool p2){ cb->opBool(p1, p2); }, [=](const Ice::Exception& ex){ cb->exCB(ex); });
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- p->begin_opShortIntLong(10, 11, 12,
- [=](Ice::Long p1, Ice::Short p2, Ice::Int p3, Ice::Long p4){ cb->opShortIntLong(p1, p2, p3, p4); },
- [=](const Ice::Exception& ex){ cb->exCB(ex); });
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- p->begin_opFloatDouble(Ice::Float(3.14), Ice::Double(1.1E10),
- [=](Ice::Double p1, Ice::Float p2, Ice::Double p3){ cb->opFloatDouble(p1, p2, p3); },
- [=](const Ice::Exception& ex){ cb->exCB(ex); });
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- p->begin_opString("hello", "world",
- [=](const string& p1, const string& p2){ cb->opString(p1, p2); },
- [=](const Ice::Exception& ex){ cb->exCB(ex); });
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- p->begin_opMyEnum(Test::enum2,
- [=](Test::MyEnum p1, Test::MyEnum p2){ cb->opMyEnum(p1, p2); },
- [=](const Ice::Exception& ex){ cb->exCB(ex); });
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback(communicator);
- p->begin_opMyClass(p,
- [=](const Test::MyClassPrx& p1, const Test::MyClassPrx p2, const Test::MyClassPrx p3)
- {
- cb->opMyClass(p1, p2, p3);
- },
- [=](const Ice::Exception& ex){ cb->exCB(ex); });
- cb->check();
- }
-
- {
- Test::Structure si1;
- si1.p = p;
- si1.e = Test::enum3;
- si1.s.s = "abc";
- Test::Structure si2;
- si2.p = 0;
- si2.e = Test::enum2;
- si2.s.s = "def";
-
- CallbackPtr cb = new Callback(communicator);
- p->begin_opStruct(si1, si2,
- [=](const Test::Structure& p1, const Test::Structure& p2)
- {
- cb->opStruct(p1, p2);
- },
- [=](const Ice::Exception& ex){ cb->exCB(ex); });
- cb->check();
- }
-
- {
- Test::ByteS bsi1;
- Test::ByteS bsi2;
-
- bsi1.push_back(Ice::Byte(0x01));
- bsi1.push_back(Ice::Byte(0x11));
- bsi1.push_back(Ice::Byte(0x12));
- bsi1.push_back(Ice::Byte(0x22));
-
- bsi2.push_back(Ice::Byte(0xf1));
- bsi2.push_back(Ice::Byte(0xf2));
- bsi2.push_back(Ice::Byte(0xf3));
- bsi2.push_back(Ice::Byte(0xf4));
-
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opByteSPtr callback = Test::newCallback_MyClass_opByteS(cb,
- &Callback::opByteS,
- &Callback::exCB);
- p->begin_opByteS(bsi1, bsi2,
- [=](const Test::ByteS& p1, const Test::ByteS& p2)
- {
- cb->opByteS(p1, p2);
- },
- [=](const Ice::Exception& ex){ cb->exCB(ex); });
- cb->check();
- }
-
- {
- Test::BoolS bsi1;
- Test::BoolS bsi2;
-
- bsi1.push_back(true);
- bsi1.push_back(true);
- bsi1.push_back(false);
-
- bsi2.push_back(false);
-
- CallbackPtr cb = new Callback;
- p->begin_opBoolS(bsi1, bsi2,
- [=](const Test::BoolS& p1, const Test::BoolS& p2)
- {
- cb->opBoolS(p1, p2);
- },
- [=](const Ice::Exception& ex){ cb->exCB(ex); });
- cb->check();
- }
-
- {
- Test::ShortS ssi;
- Test::IntS isi;
- Test::LongS lsi;
-
- ssi.push_back(1);
- ssi.push_back(2);
- ssi.push_back(3);
-
- isi.push_back(5);
- isi.push_back(6);
- isi.push_back(7);
- isi.push_back(8);
-
- lsi.push_back(10);
- lsi.push_back(30);
- lsi.push_back(20);
-
- CallbackPtr cb = new Callback;
- p->begin_opShortIntLongS(ssi, isi, lsi,
- [=](const Test::LongS& p1, const Test::ShortS& p2, const Test::IntS& p3, const Test::LongS& p4)
- {
- cb->opShortIntLongS(p1, p2, p3, p4);
- },
- [=](const Ice::Exception& ex){ cb->exCB(ex); });
- cb->check();
- }
-
- {
- Test::FloatS fsi;
- Test::DoubleS dsi;
-
- fsi.push_back(Ice::Float(3.14));
- fsi.push_back(Ice::Float(1.11));
-
- dsi.push_back(Ice::Double(1.1E10));
- dsi.push_back(Ice::Double(1.2E10));
- dsi.push_back(Ice::Double(1.3E10));
-
- CallbackPtr cb = new Callback;
- p->begin_opFloatDoubleS(fsi, dsi,
- [=](const Test::DoubleS& p1, const Test::FloatS& p2, const Test::DoubleS& p3)
- {
- cb->opFloatDoubleS(p1, p2, p3);
- },
- [=](const Ice::Exception& ex){ cb->exCB(ex); });
- cb->check();
- }
-
- {
- Test::StringS ssi1;
- Test::StringS ssi2;
-
- ssi1.push_back("abc");
- ssi1.push_back("de");
- ssi1.push_back("fghi");
-
- ssi2.push_back("xyz");
-
- CallbackPtr cb = new Callback;
- p->begin_opStringS(ssi1, ssi2,
- [=](const Test::StringS& p1, const Test::StringS& p2)
- {
- cb->opStringS(p1, p2);
- },
- [=](const Ice::Exception& ex){ cb->exCB(ex); });
- cb->check();
- }
-
- {
- Test::ByteSS bsi1;
- bsi1.resize(2);
- Test::ByteSS bsi2;
- bsi2.resize(2);
-
- bsi1[0].push_back(Ice::Byte(0x01));
- bsi1[0].push_back(Ice::Byte(0x11));
- bsi1[0].push_back(Ice::Byte(0x12));
- bsi1[1].push_back(Ice::Byte(0xff));
-
- bsi2[0].push_back(Ice::Byte(0x0e));
- bsi2[1].push_back(Ice::Byte(0xf2));
- bsi2[1].push_back(Ice::Byte(0xf1));
-
- CallbackPtr cb = new Callback;
- p->begin_opByteSS(bsi1, bsi2,
- [=](const Test::ByteSS& p1, const Test::ByteSS& p2)
- {
- cb->opByteSS(p1, p2);
- },
- [=](const Ice::Exception& ex){ cb->exCB(ex); });
- cb->check();
- }
-
- {
- Test::FloatSS fsi;
- fsi.resize(3);
- Test::DoubleSS dsi;
- dsi.resize(1);
-
- fsi[0].push_back(Ice::Float(3.14));
- fsi[1].push_back(Ice::Float(1.11));
-
- dsi[0].push_back(Ice::Double(1.1E10));
- dsi[0].push_back(Ice::Double(1.2E10));
- dsi[0].push_back(Ice::Double(1.3E10));
-
- CallbackPtr cb = new Callback;
- p->begin_opFloatDoubleSS(fsi, dsi,
- [=](const Test::DoubleSS& p1, const Test::FloatSS& p2, const Test::DoubleSS& p3)
- {
- cb->opFloatDoubleSS(p1, p2, p3);
- },
- [=](const Ice::Exception& ex){ cb->exCB(ex); });
- cb->check();
- }
-
- {
- Test::StringSS ssi1;
- ssi1.resize(2);
- Test::StringSS ssi2;
- ssi2.resize(3);
-
- ssi1[0].push_back("abc");
- ssi1[1].push_back("de");
- ssi1[1].push_back("fghi");
-
- ssi2[2].push_back("xyz");
-
- CallbackPtr cb = new Callback;
- p->begin_opStringSS(ssi1, ssi2,
- [=](const Test::StringSS& p1, const Test::StringSS& p2)
- {
- cb->opStringSS(p1, p2);
- },
- [=](const Ice::Exception& ex){ cb->exCB(ex); });
- cb->check();
- }
-
- {
- Test::ByteBoolD di1;
- di1[10] = true;
- di1[100] = false;
- Test::ByteBoolD di2;
- di2[10] = true;
- di2[11] = false;
- di2[101] = true;
-
- CallbackPtr cb = new Callback;
- p->begin_opByteBoolD(di1, di2,
- [=](const Test::ByteBoolD& p1, const Test::ByteBoolD& p2)
- {
- cb->opByteBoolD(p1, p2);
- },
- [=](const Ice::Exception& ex)
- {
- cb->exCB(ex);
- });
- cb->check();
- }
-
- {
- Test::ShortIntD di1;
- di1[110] = -1;
- di1[1100] = 123123;
- Test::ShortIntD di2;
- di2[110] = -1;
- di2[111] = -100;
- di2[1101] = 0;
-
- CallbackPtr cb = new Callback;
- p->begin_opShortIntD(di1, di2,
- [=](const Test::ShortIntD& p1, const Test::ShortIntD& p2)
- {
- cb->opShortIntD(p1, p2);
- },
- [=](const Ice::Exception& ex)
- {
- cb->exCB(ex);
- });
- cb->check();
- }
-
- {
- Test::LongFloatD di1;
- di1[999999110] = Ice::Float(-1.1);
- di1[999999111] = Ice::Float(123123.2);
- Test::LongFloatD di2;
- di2[999999110] = Ice::Float(-1.1);
- di2[999999120] = Ice::Float(-100.4);
- di2[999999130] = Ice::Float(0.5);
-
- CallbackPtr cb = new Callback;
- p->begin_opLongFloatD(di1, di2,
- [=](const Test::LongFloatD& p1, const Test::LongFloatD& p2)
- {
- cb->opLongFloatD(p1, p2);
- },
- [=](const Ice::Exception& ex)
- {
- cb->exCB(ex);
- });
- cb->check();
- }
-
- {
- Test::StringStringD di1;
- di1["foo"] = "abc -1.1";
- di1["bar"] = "abc 123123.2";
- Test::StringStringD di2;
- di2["foo"] = "abc -1.1";
- di2["FOO"] = "abc -100.4";
- di2["BAR"] = "abc 0.5";
-
- CallbackPtr cb = new Callback;
- p->begin_opStringStringD(di1, di2,
- [=](const Test::StringStringD& p1, const Test::StringStringD& p2)
- {
- cb->opStringStringD(p1, p2);
- },
- [=](const Ice::Exception& ex)
- {
- cb->exCB(ex);
- });
- cb->check();
- }
-
- {
- Test::StringMyEnumD di1;
- di1["abc"] = Test::enum1;
- di1[""] = Test::enum2;
- Test::StringMyEnumD di2;
- di2["abc"] = Test::enum1;
- di2["qwerty"] = Test::enum3;
- di2["Hello!!"] = Test::enum2;
-
- CallbackPtr cb = new Callback;
- p->begin_opStringMyEnumD(di1, di2,
- [=](const Test::StringMyEnumD& p1, const Test::StringMyEnumD& p2)
- {
- cb->opStringMyEnumD(p1, p2);
- },
- [=](const Ice::Exception& ex)
- {
- cb->exCB(ex);
- });
- cb->check();
- }
-
- {
- Test::MyStruct s11 = { 1, 1 };
- Test::MyStruct s12 = { 1, 2 };
- Test::MyStructMyEnumD di1;
- di1[s11] = Test::enum1;
- di1[s12] = Test::enum2;
-
- Test::MyStruct s22 = { 2, 2 };
- Test::MyStruct s23 = { 2, 3 };
- Test::MyStructMyEnumD di2;
- di2[s11] = Test::enum1;
- di2[s22] = Test::enum3;
- di2[s23] = Test::enum2;
-
- CallbackPtr cb = new Callback;
- p->begin_opMyStructMyEnumD(di1, di2,
- [=](const Test::MyStructMyEnumD& p1, const Test::MyStructMyEnumD& p2)
- {
- cb->opMyStructMyEnumD(p1, p2);
- },
- [=](const Ice::Exception& ex)
- {
- cb->exCB(ex);
- });
- cb->check();
- }
-
- {
- const int lengths[] = { 0, 1, 2, 126, 127, 128, 129, 253, 254, 255, 256, 257, 1000 };
-
- for(unsigned int l = 0; l != sizeof(lengths) / sizeof(*lengths); ++l)
- {
- Test::IntS s;
- for(int i = 0; i < lengths[l]; ++i)
- {
- s.push_back(i);
- }
- CallbackPtr cb = new Callback;
- p->begin_opIntS(s,
- [=](const Test::IntS& p1)
- {
- cb->opIntS(p1);
- },
- [=](const Ice::Exception& ex)
- {
- cb->exCB(ex);
- });
- cb->check();
- }
- }
-
- {
- Ice::Double d = 1278312346.0 / 13.0;
- Test::DoubleS ds(5, d);
- CallbackPtr cb = new Callback;
- p->begin_opDoubleMarshaling(d, ds,
- [=](){ cb->opDoubleMarshaling(); },
- [=](const Ice::Exception& ex){ cb->exCB(ex); });
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- Test::Callback_MyClass_opIdempotentPtr callback =
- Test::newCallback_MyClass_opIdempotent(cb, &Callback::opIdempotent, &Callback::exCB);
- p->begin_opIdempotent([=](){ cb->opIdempotent(); },
- [=](const Ice::Exception& ex){ cb->exCB(ex); });
- cb->check();
- }
-
- {
- CallbackPtr cb = new Callback;
- p->begin_opNonmutating([=](){ cb->opNonmutating(); },
- [=](const Ice::Exception& ex){ cb->exCB(ex); });
- cb->check();
- }
-
- {
- Test::MyDerivedClassPrx derived = Test::MyDerivedClassPrx::checkedCast(p);
- test(derived);
- CallbackPtr cb = new Callback;
- derived->begin_opDerived([=](){ cb->opDerived(); },
- [=](const Ice::Exception& ex){ cb->exCB(ex); });
- cb->check();
- }
-#endif
-}
diff --git a/cpp/test/Slice/keyword/Client.cpp b/cpp/test/Slice/keyword/Client.cpp
index 2a862474362..d1e2d100cdd 100644
--- a/cpp/test/Slice/keyword/Client.cpp
+++ b/cpp/test/Slice/keyword/Client.cpp
@@ -70,14 +70,6 @@ public:
return _cpp_and::_cpp_auto();
}
};
-
-class fooI : public _cpp_and::AMI_switch_foo
-{
-public:
-
- virtual void ice_response(Ice::Int) {}
- virtual void ice_exception(const ::Ice::Exception&) {}
-};
//
// This section of the test is present to ensure that the C++ types
@@ -106,8 +98,6 @@ testtypes()
e->_cpp_explicit();
_cpp_and::charPtr e1 = new charI();
- _cpp_and::switchPrx f;
- f->foo_async(new fooI(), e);
_cpp_and::switchPtr f1 = new switchI();
_cpp_and::doPrx g;
diff --git a/cpp/test/Slice/keyword/Key.ice b/cpp/test/Slice/keyword/Key.ice
index 98ae7dd147f..bbf95c9bb66 100644
--- a/cpp/test/Slice/keyword/Key.ice
+++ b/cpp/test/Slice/keyword/Key.ice
@@ -38,7 +38,7 @@ interface char
class switch
{
int if;
- ["ami"] void foo(char* export, out int volatile);
+ void foo(char* export, out int volatile);
};
class do extends switch implements char, break
diff --git a/cs/demo/Glacier2/sl/chat/Chat.ice b/cs/demo/Glacier2/sl/chat/Chat.ice
index ce81797e363..907f1f1b50e 100644
--- a/cs/demo/Glacier2/sl/chat/Chat.ice
+++ b/cs/demo/Glacier2/sl/chat/Chat.ice
@@ -21,8 +21,8 @@ interface ChatCallback
interface ChatSession extends Glacier2::Session
{
- ["ami"] void setCallback(ChatCallback* callback);
- ["ami"] void say(string data);
+ void setCallback(ChatCallback* callback);
+ void say(string data);
};
};
diff --git a/cs/test/Ice/dictMapping/AllTests.cs b/cs/test/Ice/dictMapping/AllTests.cs
index f06953e4bd1..d5b95040a80 100644
--- a/cs/test/Ice/dictMapping/AllTests.cs
+++ b/cs/test/Ice/dictMapping/AllTests.cs
@@ -49,11 +49,6 @@ public class AllTests : TestCommon.TestApp
Flush();
TwowaysAMI.twowaysAMI(communicator, cl);
WriteLine("ok");
-
- Write("testing twoway operations with new AMI mapping... ");
- Flush();
- TwowaysNewAMI.twowaysAMI(communicator, cl);
- WriteLine("ok");
}
#if SILVERLIGHT
cl.shutdown();
diff --git a/cs/test/Ice/dictMapping/Makefile b/cs/test/Ice/dictMapping/Makefile
index 7327d335c7e..167531046ed 100644
--- a/cs/test/Ice/dictMapping/Makefile
+++ b/cs/test/Ice/dictMapping/Makefile
@@ -11,9 +11,9 @@ top_srcdir = ../../..
TARGETS = client.exe server.exe collocated.exe serveramd.exe
-C_SRCS = AllTests.cs Client.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs ../../TestCommon/TestApp.cs
+C_SRCS = AllTests.cs Client.cs Twoways.cs TwowaysAMI.cs ../../TestCommon/TestApp.cs
S_SRCS = MyClassI.cs Server.cs
-COL_SRCS = AllTests.cs Collocated.cs MyClassI.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs \
+COL_SRCS = AllTests.cs Collocated.cs MyClassI.cs Twoways.cs TwowaysAMI.cs \
../../TestCommon/TestApp.cs
SAMD_SRCS = MyClassAMDI.cs Server.cs
diff --git a/cs/test/Ice/dictMapping/Makefile.mak b/cs/test/Ice/dictMapping/Makefile.mak
index 12eff379fcb..e4588477c5a 100644
--- a/cs/test/Ice/dictMapping/Makefile.mak
+++ b/cs/test/Ice/dictMapping/Makefile.mak
@@ -11,9 +11,9 @@ top_srcdir = ..\..\..
TARGETS = client.exe server.exe collocated.exe serveramd.exe
-C_SRCS = AllTests.cs Client.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs ..\..\TestCommon\TestApp.cs
+C_SRCS = AllTests.cs Client.cs Twoways.cs TwowaysAMI.cs ..\..\TestCommon\TestApp.cs
S_SRCS = MyClassI.cs Server.cs
-COL_SRCS = AllTests.cs Collocated.cs MyClassI.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs ..\..\TestCommon\TestApp.cs
+COL_SRCS = AllTests.cs Collocated.cs MyClassI.cs Twoways.cs TwowaysAMI.cs ..\..\TestCommon\TestApp.cs
SAMD_SRCS = MyClassAMDI.cs Server.cs
GEN_SRCS = $(GDIR)\Test.cs
diff --git a/cs/test/Ice/dictMapping/Test.ice b/cs/test/Ice/dictMapping/Test.ice
index 09338505850..059390a63f4 100644
--- a/cs/test/Ice/dictMapping/Test.ice
+++ b/cs/test/Ice/dictMapping/Test.ice
@@ -52,7 +52,7 @@ dictionary<string, GSS> NDGSS;
["clr:collection"] dictionary<string, CSS> ODCSS;
["clr:collection"] dictionary<string, GSS> ODGSS;
-["ami"] class MyClass
+class MyClass
{
void shutdown();
diff --git a/cs/test/Ice/dictMapping/TestAMD.ice b/cs/test/Ice/dictMapping/TestAMD.ice
index 97948937889..550a7dc7546 100644
--- a/cs/test/Ice/dictMapping/TestAMD.ice
+++ b/cs/test/Ice/dictMapping/TestAMD.ice
@@ -52,7 +52,7 @@ dictionary<string, GSS> NDGSS;
["clr:collection"] dictionary<string, CSS> ODCSS;
["clr:collection"] dictionary<string, GSS> ODGSS;
-["ami", "amd"] class MyClass
+["amd"] class MyClass
{
void shutdown();
diff --git a/cs/test/Ice/dictMapping/TwowaysAMI.cs b/cs/test/Ice/dictMapping/TwowaysAMI.cs
index 412650eff0b..0fb2cbdf812 100644
--- a/cs/test/Ice/dictMapping/TwowaysAMI.cs
+++ b/cs/test/Ice/dictMapping/TwowaysAMI.cs
@@ -23,9 +23,9 @@ public class TwowaysAMI
}
}
- private class Callback
+ private class CallbackBase
{
- internal Callback()
+ internal CallbackBase()
{
_called = false;
}
@@ -56,732 +56,314 @@ public class TwowaysAMI
private bool _called;
}
- private class AMI_MyClass_opNVI : Test.AMI_MyClass_opNV
+ private class Callback
{
- public AMI_MyClass_opNVI(Dictionary<int, int> i)
- {
- _i = i;
- }
-
- public override void ice_response(Dictionary<int, int> r, Dictionary<int, int> o)
+ public void opNVI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Dictionary<int, int> i = (Dictionary<int, int>)result.AsyncState;
+ Dictionary<int, int> o;
+ Dictionary<int, int> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNV(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opNRI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Dictionary<int, int> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opNRI : Test.AMI_MyClass_opNR
- {
- public AMI_MyClass_opNRI(Dictionary<string, string> i)
- {
- _i = i;
- }
-
- public override void ice_response(Dictionary<string, string> r, Dictionary<string, string> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Dictionary<string, string> i = (Dictionary<string, string>)result.AsyncState;
+ Dictionary<string, string> o;
+ Dictionary<string, string> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNR(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
+ public void opNDVI(Ice.AsyncResult result)
{
- callback.check();
- }
-
- private Dictionary<string, string> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opNDVI : Test.AMI_MyClass_opNDV
- {
- public AMI_MyClass_opNDVI(Dictionary<string, Dictionary<int, int>> i)
- {
- _i = i;
- }
-
- public override void ice_response(Dictionary<string, Dictionary<int, int>> r,
- Dictionary<string, Dictionary<int, int>> o)
- {
- foreach(string key in _i.Keys)
+ Dictionary<string, Dictionary<int, int>> i = (Dictionary<string, Dictionary<int, int>>)result.AsyncState;
+ Dictionary<string, Dictionary<int, int>> o;
+ Dictionary<string, Dictionary<int, int>> r =
+ MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNDV(out o, result);
+ foreach(string key in i.Keys)
{
- test(Ice.CollectionComparer.Equals(_i[key], o[key]));
- test(Ice.CollectionComparer.Equals(_i[key], r[key]));
+ test(Ice.CollectionComparer.Equals(i[key], o[key]));
+ test(Ice.CollectionComparer.Equals(i[key], r[key]));
}
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
+ public void opNDRI(Ice.AsyncResult result)
{
- callback.check();
- }
-
- private Dictionary<string, Dictionary<int, int>> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opNDRI : Test.AMI_MyClass_opNDR
- {
- public AMI_MyClass_opNDRI(Dictionary<string, Dictionary<string, string>> i)
- {
- _i = i;
- }
-
- public override void ice_response(Dictionary<string, Dictionary<string, string>> r,
- Dictionary<string, Dictionary<string, string>> o)
- {
- foreach(string key in _i.Keys)
+ Dictionary<string, Dictionary<string, string>> i =
+ (Dictionary<string, Dictionary<string, string>>)result.AsyncState;
+ Dictionary<string, Dictionary<string, string>> o;
+ Dictionary<string, Dictionary<string, string>> r =
+ MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNDR(out o, result);
+ foreach(string key in i.Keys)
{
- test(Ice.CollectionComparer.Equals(_i[key], o[key]));
- test(Ice.CollectionComparer.Equals(_i[key], r[key]));
+ test(Ice.CollectionComparer.Equals(i[key], o[key]));
+ test(Ice.CollectionComparer.Equals(i[key], r[key]));
}
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opOVI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Dictionary<string, Dictionary<string, string>> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opOVI : Test.AMI_MyClass_opOV
- {
- public AMI_MyClass_opOVI(OV i)
- {
- _i = i;
- }
-
- public override void ice_response(OV r, OV o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ OV i = (OV)result.AsyncState;
+ OV o;
+ OV r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opOV(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opORI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private OV _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opORI : Test.AMI_MyClass_opOR
- {
- public AMI_MyClass_opORI(OR i)
- {
- _i = i;
- }
-
- public override void ice_response(OR r, OR o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ OR i = (OR)result.AsyncState;
+ OR o;
+ OR r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opOR(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
+ public void opODVI(Ice.AsyncResult result)
{
- callback.check();
- }
-
- private OR _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opODVI : Test.AMI_MyClass_opODV
- {
- public AMI_MyClass_opODVI(ODV i)
- {
- _i = i;
- }
-
- public override void ice_response(ODV r, ODV o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ ODV i = (ODV)result.AsyncState;
+ ODV o;
+ ODV r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opODV(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opODRI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private ODV _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opODRI : Test.AMI_MyClass_opODR
- {
- public AMI_MyClass_opODRI(ODR i)
- {
- _i = i;
- }
-
- public override void ice_response(ODR r, ODR o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ ODR i = (ODR)result.AsyncState;
+ ODR o;
+ ODR r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opODR(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opNODVI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private ODR _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opNODVI : Test.AMI_MyClass_opNODV
- {
- public AMI_MyClass_opNODVI(Dictionary<string, ODV> i)
- {
- _i = i;
- }
-
- public override void ice_response(Dictionary<string, ODV> r, Dictionary<string, ODV> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Dictionary<string, ODV> i = (Dictionary<string, ODV>)result.AsyncState;
+ Dictionary<string, ODV> o;
+ Dictionary<string, ODV> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNODV(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Dictionary<string, ODV> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opNODRI : Test.AMI_MyClass_opNODR
- {
- public AMI_MyClass_opNODRI(Dictionary<string, ODR> i)
+ public void opNODRI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(Dictionary<string, ODR> r, Dictionary<string, ODR> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Dictionary<string, ODR> i = (Dictionary<string, ODR>)result.AsyncState;
+ Dictionary<string, ODR> o;
+ Dictionary<string, ODR> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNODR(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Dictionary<string, ODR> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opONDVI : Test.AMI_MyClass_opONDV
- {
- public AMI_MyClass_opONDVI(ONDV i)
- {
- _i = i;
- }
-
- public override void ice_response(ONDV r, ONDV o)
+ public void opONDVI(Ice.AsyncResult result)
{
- foreach(string key in _i.Keys)
+ ONDV i = (ONDV)result.AsyncState;
+ ONDV o;
+ ONDV r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opONDV(out o, result);
+ foreach(string key in i.Keys)
{
- foreach(string s in _i[key].Keys)
+ foreach(string s in i[key].Keys)
{
- test(Ice.CollectionComparer.Equals(_i[key][s], o[key][s]));
- test(Ice.CollectionComparer.Equals(_i[key][s], r[key][s]));
+ test(Ice.CollectionComparer.Equals(i[key][s], o[key][s]));
+ test(Ice.CollectionComparer.Equals(i[key][s], r[key][s]));
}
}
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opONDRI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private ONDV _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opONDRI : Test.AMI_MyClass_opONDR
- {
- public AMI_MyClass_opONDRI(ONDR i)
- {
- _i = i;
- }
-
- public override void ice_response(ONDR r, ONDR o)
- {
- foreach(string key in _i.Keys)
+ ONDR i = (ONDR)result.AsyncState;
+ ONDR o;
+ ONDR r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opONDR(out o, result);
+ foreach(string key in i.Keys)
{
- foreach(string s in _i[key].Keys)
+ foreach(string s in i[key].Keys)
{
- test(Ice.CollectionComparer.Equals(_i[key][s], o[key][s]));
- test(Ice.CollectionComparer.Equals(_i[key][s], r[key][s]));
+ test(Ice.CollectionComparer.Equals(i[key][s], o[key][s]));
+ test(Ice.CollectionComparer.Equals(i[key][s], r[key][s]));
}
}
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private ONDR _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opNDAISI : Test.AMI_MyClass_opNDAIS
- {
- public AMI_MyClass_opNDAISI(Dictionary<string, int[]> i)
+ public void opNDAISI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(Dictionary<string, int[]> r, Dictionary<string, int[]> o)
- {
- foreach(string key in _i.Keys)
+ Dictionary<string, int[]> i = (Dictionary<string, int[]>)result.AsyncState;
+ Dictionary<string, int[]> o;
+ Dictionary<string, int[]> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNDAIS(out o, result);
+ foreach(string key in i.Keys)
{
- test(Ice.CollectionComparer.Equals(_i[key], o[key]));
- test(Ice.CollectionComparer.Equals(_i[key], r[key]));
+ test(Ice.CollectionComparer.Equals(i[key], o[key]));
+ test(Ice.CollectionComparer.Equals(i[key], r[key]));
}
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Dictionary<string, int[]> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opNDCISI : Test.AMI_MyClass_opNDCIS
- {
- public AMI_MyClass_opNDCISI(Dictionary<string, CIS> i)
- {
- _i = i;
- }
-
- public override void ice_response(Dictionary<string, CIS> r, Dictionary<string, CIS> o)
+ public void opNDCISI(Ice.AsyncResult result)
{
- foreach(string key in _i.Keys)
+ Dictionary<string, CIS> i = (Dictionary<string, CIS>)result.AsyncState;
+ Dictionary<string, CIS> o;
+ Dictionary<string, CIS> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNDCIS(out o, result);
+ foreach(string key in i.Keys)
{
- test(Ice.CollectionComparer.Equals(_i[key], o[key]));
- test(Ice.CollectionComparer.Equals(_i[key], r[key]));
+ test(Ice.CollectionComparer.Equals(i[key], o[key]));
+ test(Ice.CollectionComparer.Equals(i[key], r[key]));
}
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
+ public void opNDGISI(Ice.AsyncResult result)
{
- callback.check();
- }
-
- private Dictionary<string, CIS> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opNDGISI : Test.AMI_MyClass_opNDGIS
- {
- public AMI_MyClass_opNDGISI(Dictionary<string, List<int>> i)
- {
- _i = i;
- }
-
- public override void ice_response(Dictionary<string, List<int>> r, Dictionary<string, List<int>> o)
- {
- foreach(string key in _i.Keys)
+ Dictionary<string, List<int>> i = (Dictionary<string, List<int>>)result.AsyncState;
+ Dictionary<string, List<int>> o;
+ Dictionary<string, List<int>> r =
+ MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNDGIS(out o, result);
+ foreach(string key in i.Keys)
{
- test(Ice.CollectionComparer.Equals(_i[key], o[key]));
- test(Ice.CollectionComparer.Equals(_i[key], r[key]));
+ test(Ice.CollectionComparer.Equals(i[key], o[key]));
+ test(Ice.CollectionComparer.Equals(i[key], r[key]));
}
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
+ public void opNDASSI(Ice.AsyncResult result)
{
- callback.check();
- }
-
- private Dictionary<string, List<int>> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opNDASSI : Test.AMI_MyClass_opNDASS
- {
- public AMI_MyClass_opNDASSI(Dictionary<string, string[]> i)
- {
- _i = i;
- }
-
- public override void ice_response(Dictionary<string, string[]> r, Dictionary<string, string[]> o)
- {
- foreach(string key in _i.Keys)
+ Dictionary<string, string[]> i = (Dictionary<string,string[]>)result.AsyncState;
+ Dictionary<string, string[]> o;
+ Dictionary<string, string[]> r =
+ MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNDASS(out o, result);
+ foreach(string key in i.Keys)
{
- test(Ice.CollectionComparer.Equals(_i[key], o[key]));
- test(Ice.CollectionComparer.Equals(_i[key], r[key]));
+ test(Ice.CollectionComparer.Equals(i[key], o[key]));
+ test(Ice.CollectionComparer.Equals(i[key], r[key]));
}
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opNDCSSI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Dictionary<string, string[]> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opNDCSSI : Test.AMI_MyClass_opNDCSS
- {
- public AMI_MyClass_opNDCSSI(Dictionary<string, CSS> i)
- {
- _i = i;
- }
-
- public override void ice_response(Dictionary<string, CSS> r, Dictionary<string, CSS> o)
- {
- foreach(string key in _i.Keys)
+ Dictionary<string, CSS> i = (Dictionary<string,CSS>)result.AsyncState;
+ Dictionary<string, CSS> o;
+ Dictionary<string, CSS> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNDCSS(out o, result);
+ foreach(string key in i.Keys)
{
- test(Ice.CollectionComparer.Equals(_i[key], o[key]));
- test(Ice.CollectionComparer.Equals(_i[key], r[key]));
+ test(Ice.CollectionComparer.Equals(i[key], o[key]));
+ test(Ice.CollectionComparer.Equals(i[key], r[key]));
}
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Dictionary<string, CSS> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opNDGSSI : Test.AMI_MyClass_opNDGSS
- {
- public AMI_MyClass_opNDGSSI(Dictionary<string, List<string>> i)
- {
- _i = i;
- }
-
- public override void ice_response(Dictionary<string, List<string>> r, Dictionary<string, List<string>> o)
+ public void opNDGSSI(Ice.AsyncResult result)
{
- foreach(string key in _i.Keys)
+ Dictionary<string, List<string>> i = (Dictionary<string,List<string>>)result.AsyncState;
+ Dictionary<string, List<string>> o;
+ Dictionary<string, List<string>> r =
+ MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNDGSS(out o, result);
+ foreach(string key in i.Keys)
{
- test(Ice.CollectionComparer.Equals(_i[key], o[key]));
- test(Ice.CollectionComparer.Equals(_i[key], r[key]));
+ test(Ice.CollectionComparer.Equals(i[key], o[key]));
+ test(Ice.CollectionComparer.Equals(i[key], r[key]));
}
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opODAISI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Dictionary<string, List<string>> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opODAISI : Test.AMI_MyClass_opODAIS
- {
- public AMI_MyClass_opODAISI(ODAIS i)
- {
- _i = i;
- }
-
- public override void ice_response(ODAIS r, ODAIS o)
- {
- foreach(string key in _i.Keys)
+ ODAIS i = (ODAIS)result.AsyncState;
+ ODAIS o;
+ ODAIS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opODAIS(out o, result);
+ foreach(string key in i.Keys)
{
- test(Ice.CollectionComparer.Equals(_i[key], o[key]));
- test(Ice.CollectionComparer.Equals(_i[key], r[key]));
+ test(Ice.CollectionComparer.Equals(i[key], o[key]));
+ test(Ice.CollectionComparer.Equals(i[key], r[key]));
}
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opODCISI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private ODAIS _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opODCISI : Test.AMI_MyClass_opODCIS
- {
- public AMI_MyClass_opODCISI(ODCIS i)
- {
- _i = i;
- }
-
- public override void ice_response(ODCIS r, ODCIS o)
- {
- foreach(string key in _i.Keys)
+ ODCIS i = (ODCIS)result.AsyncState;
+ ODCIS o;
+ ODCIS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opODCIS(out o, result);
+ foreach(string key in i.Keys)
{
- test(Ice.CollectionComparer.Equals(_i[key], o[key]));
- test(Ice.CollectionComparer.Equals(_i[key], r[key]));
+ test(Ice.CollectionComparer.Equals(i[key], o[key]));
+ test(Ice.CollectionComparer.Equals(i[key], r[key]));
}
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private ODCIS _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opODGISI : Test.AMI_MyClass_opODGIS
- {
- public AMI_MyClass_opODGISI(ODGIS i)
- {
- _i = i;
- }
-
- public override void ice_response(ODGIS r, ODGIS o)
+ public void opODGISI(Ice.AsyncResult result)
{
- foreach(string key in _i.Keys)
+ ODGIS i = (ODGIS)result.AsyncState;
+ ODGIS o;
+ ODGIS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opODGIS(out o, result);
+ foreach(string key in i.Keys)
{
- test(Ice.CollectionComparer.Equals(_i[key], o[key]));
- test(Ice.CollectionComparer.Equals(_i[key], r[key]));
+ test(Ice.CollectionComparer.Equals(i[key], o[key]));
+ test(Ice.CollectionComparer.Equals(i[key], r[key]));
}
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private ODGIS _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opODASSI : Test.AMI_MyClass_opODASS
- {
- public AMI_MyClass_opODASSI(ODASS i)
+ public void opODASSI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(ODASS r, ODASS o)
- {
- foreach(string key in _i.Keys)
+ ODASS i = (ODASS)result.AsyncState;
+ ODASS o;
+ ODASS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opODASS(out o, result);
+ foreach(string key in i.Keys)
{
- test(Ice.CollectionComparer.Equals(_i[key], o[key]));
- test(Ice.CollectionComparer.Equals(_i[key], r[key]));
+ test(Ice.CollectionComparer.Equals(i[key], o[key]));
+ test(Ice.CollectionComparer.Equals(i[key], r[key]));
}
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private ODASS _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opODCSSI : Test.AMI_MyClass_opODCSS
- {
- public AMI_MyClass_opODCSSI(ODCSS i)
+ public void opODCSSI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(ODCSS r, ODCSS o)
- {
- foreach(string key in _i.Keys)
+ ODCSS i = (ODCSS)result.AsyncState;
+ ODCSS o;
+ ODCSS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opODCSS(out o, result);
+ foreach(string key in i.Keys)
{
- test(Ice.CollectionComparer.Equals(_i[key], o[key]));
- test(Ice.CollectionComparer.Equals(_i[key], r[key]));
+ test(Ice.CollectionComparer.Equals(i[key], o[key]));
+ test(Ice.CollectionComparer.Equals(i[key], r[key]));
}
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private ODCSS _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opODGSSI : Test.AMI_MyClass_opODGSS
- {
- public AMI_MyClass_opODGSSI(ODGSS i)
- {
- _i = i;
- }
-
- public override void ice_response(ODGSS r, ODGSS o)
+ public void opODGSSI(Ice.AsyncResult result)
{
- foreach(string key in _i.Keys)
+ ODGSS i = (ODGSS)result.AsyncState;
+ ODGSS o;
+ ODGSS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opODGSS(out o, result);
+ foreach(string key in i.Keys)
{
- test(Ice.CollectionComparer.Equals(_i[key], o[key]));
- test(Ice.CollectionComparer.Equals(_i[key], r[key]));
+ test(Ice.CollectionComparer.Equals(i[key], o[key]));
+ test(Ice.CollectionComparer.Equals(i[key], r[key]));
}
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
public virtual void check()
{
callback.check();
}
- private ODGSS _i;
- private Callback callback = new Callback();
+ private CallbackBase callback = new CallbackBase();
}
internal static void twowaysAMI(Ice.Communicator communicator, Test.MyClassPrx p)
@@ -791,8 +373,8 @@ public class TwowaysAMI
i[0] = 1;
i[1] = 0;
- AMI_MyClass_opNVI cb = new AMI_MyClass_opNVI(i);
- p.opNV_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opNV(i, null, cb.opNVI, i);
cb.check();
}
@@ -801,8 +383,8 @@ public class TwowaysAMI
i["a"] = "b";
i["b"] = "a";
- AMI_MyClass_opNRI cb = new AMI_MyClass_opNRI(i);
- p.opNR_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opNR(i, null, cb.opNRI, i);
cb.check();
}
@@ -814,8 +396,8 @@ public class TwowaysAMI
i["a"] = id;
i["b"] = id;
- AMI_MyClass_opNDVI cb = new AMI_MyClass_opNDVI(i);
- p.opNDV_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opNDV(i, null, cb.opNDVI, i);
cb.check();
}
@@ -827,8 +409,8 @@ public class TwowaysAMI
i["a"] = id;
i["b"] = id;
- AMI_MyClass_opNDRI cb = new AMI_MyClass_opNDRI(i);
- p.opNDR_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opNDR(i, null, cb.opNDRI, i);
cb.check();
}
@@ -837,8 +419,8 @@ public class TwowaysAMI
i[0] = 1;
i[1] = 0;
- AMI_MyClass_opOVI cb = new AMI_MyClass_opOVI(i);
- p.opOV_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opOV(i, null, cb.opOVI, i);
cb.check();
}
@@ -847,8 +429,8 @@ public class TwowaysAMI
i["a"] = "b";
i["b"] = "a";
- AMI_MyClass_opORI cb = new AMI_MyClass_opORI(i);
- p.opOR_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opOR(i, null, cb.opORI, i);
cb.check();
}
@@ -860,8 +442,8 @@ public class TwowaysAMI
i["a"] = id;
i["b"] = id;
- AMI_MyClass_opODVI cb = new AMI_MyClass_opODVI(i);
- p.opODV_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opODV(i, null, cb.opODVI, i);
cb.check();
}
@@ -873,8 +455,8 @@ public class TwowaysAMI
i["a"] = id;
i["b"] = id;
- AMI_MyClass_opODRI cb = new AMI_MyClass_opODRI(i);
- p.opODR_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opODR(i, null, cb.opODRI, i);
cb.check();
}
@@ -889,8 +471,8 @@ public class TwowaysAMI
i["a"] = id;
i["b"] = id;
- AMI_MyClass_opNODVI cb = new AMI_MyClass_opNODVI(i);
- p.opNODV_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opNODV(i, null, cb.opNODVI, i);
cb.check();
}
@@ -905,8 +487,8 @@ public class TwowaysAMI
i["a"] = id;
i["b"] = id;
- AMI_MyClass_opNODRI cb = new AMI_MyClass_opNODRI(i);
- p.opNODR_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opNODR(i, null, cb.opNODRI, i);
cb.check();
}
@@ -922,8 +504,8 @@ public class TwowaysAMI
i["a"] = id;
i["b"] = id;
- AMI_MyClass_opONDVI cb = new AMI_MyClass_opONDVI(i);
- p.opONDV_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opONDV(i, null, cb.opONDVI, i);
cb.check();
}
@@ -939,8 +521,8 @@ public class TwowaysAMI
i["a"] = id;
i["b"] = id;
- AMI_MyClass_opONDRI cb = new AMI_MyClass_opONDRI(i);
- p.opONDR_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opONDR(i, null, cb.opONDRI, i);
cb.check();
}
@@ -950,8 +532,8 @@ public class TwowaysAMI
i["a"] = ii;
i["b"] = ii;
- AMI_MyClass_opNDAISI cb = new AMI_MyClass_opNDAISI(i);
- p.opNDAIS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opNDAIS(i, null, cb.opNDAISI, i);
cb.check();
}
@@ -963,8 +545,8 @@ public class TwowaysAMI
i["a"] = ii;
i["b"] = ii;
- AMI_MyClass_opNDCISI cb = new AMI_MyClass_opNDCISI(i);
- p.opNDCIS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opNDCIS(i, null, cb.opNDCISI, i);
cb.check();
}
@@ -976,8 +558,8 @@ public class TwowaysAMI
i["a"] = ii;
i["b"] = ii;
- AMI_MyClass_opNDGISI cb = new AMI_MyClass_opNDGISI(i);
- p.opNDGIS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opNDGIS(i, null, cb.opNDGISI, i);
cb.check();
}
@@ -987,8 +569,8 @@ public class TwowaysAMI
i["a"] = ii;
i["b"] = ii;
- AMI_MyClass_opNDASSI cb = new AMI_MyClass_opNDASSI(i);
- p.opNDASS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opNDASS(i, null, cb.opNDASSI, i);
cb.check();
}
@@ -1000,8 +582,8 @@ public class TwowaysAMI
i["a"] = ii;
i["b"] = ii;
- AMI_MyClass_opNDCSSI cb = new AMI_MyClass_opNDCSSI(i);
- p.opNDCSS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opNDCSS(i, null, cb.opNDCSSI, i);
cb.check();
}
@@ -1013,8 +595,8 @@ public class TwowaysAMI
i["a"] = ii;
i["b"] = ii;
- AMI_MyClass_opNDGSSI cb = new AMI_MyClass_opNDGSSI(i);
- p.opNDGSS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opNDGSS(i, null, cb.opNDGSSI, i);
cb.check();
}
@@ -1024,8 +606,8 @@ public class TwowaysAMI
i["a"] = ii;
i["b"] = ii;
- AMI_MyClass_opODAISI cb = new AMI_MyClass_opODAISI(i);
- p.opODAIS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opODAIS(i, null, cb.opODAISI, i);
cb.check();
}
@@ -1037,8 +619,8 @@ public class TwowaysAMI
i["a"] = ii;
i["b"] = ii;
- AMI_MyClass_opODCISI cb = new AMI_MyClass_opODCISI(i);
- p.opODCIS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opODCIS(i, null, cb.opODCISI, i);
cb.check();
}
@@ -1050,8 +632,8 @@ public class TwowaysAMI
i["a"] = ii;
i["b"] = ii;
- AMI_MyClass_opODGISI cb = new AMI_MyClass_opODGISI(i);
- p.opODGIS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opODGIS(i, null, cb.opODGISI, i);
cb.check();
}
@@ -1061,8 +643,8 @@ public class TwowaysAMI
i["a"] = ii;
i["b"] = ii;
- AMI_MyClass_opODASSI cb = new AMI_MyClass_opODASSI(i);
- p.opODASS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opODASS(i, null, cb.opODASSI, i);
cb.check();
}
@@ -1074,8 +656,8 @@ public class TwowaysAMI
i["a"] = ii;
i["b"] = ii;
- AMI_MyClass_opODCSSI cb = new AMI_MyClass_opODCSSI(i);
- p.opODCSS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opODCSS(i, null, cb.opODCSSI, i);
cb.check();
}
@@ -1087,8 +669,8 @@ public class TwowaysAMI
i["a"] = ii;
i["b"] = ii;
- AMI_MyClass_opODGSSI cb = new AMI_MyClass_opODGSSI(i);
- p.opODGSS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opODGSS(i, null, cb.opODGSSI, i);
cb.check();
}
}
diff --git a/cs/test/Ice/dictMapping/TwowaysNewAMI.cs b/cs/test/Ice/dictMapping/TwowaysNewAMI.cs
deleted file mode 100644
index 820b24c0904..00000000000
--- a/cs/test/Ice/dictMapping/TwowaysNewAMI.cs
+++ /dev/null
@@ -1,677 +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.
-//
-// **********************************************************************
-
-using System;
-using System.Diagnostics;
-using System.Threading;
-using System.Collections.Generic;
-using Test;
-
-public class TwowaysNewAMI
-{
- private static void test(bool b)
- {
- if(!b)
- {
- throw new System.SystemException();
- }
- }
-
- private class CallbackBase
- {
- internal CallbackBase()
- {
- _called = false;
- }
-
- public virtual void check()
- {
- lock(this)
- {
- while(!_called)
- {
- System.Threading.Monitor.Wait(this);
- }
-
- _called = false;
- }
- }
-
- public virtual void called()
- {
- lock(this)
- {
- Debug.Assert(!_called);
- _called = true;
- System.Threading.Monitor.Pulse(this);
- }
- }
-
- private bool _called;
- }
-
- private class Callback
- {
- public void opNVI(Ice.AsyncResult result)
- {
- Dictionary<int, int> i = (Dictionary<int, int>)result.AsyncState;
- Dictionary<int, int> o;
- Dictionary<int, int> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNV(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opNRI(Ice.AsyncResult result)
- {
- Dictionary<string, string> i = (Dictionary<string, string>)result.AsyncState;
- Dictionary<string, string> o;
- Dictionary<string, string> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNR(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opNDVI(Ice.AsyncResult result)
- {
- Dictionary<string, Dictionary<int, int>> i = (Dictionary<string, Dictionary<int, int>>)result.AsyncState;
- Dictionary<string, Dictionary<int, int>> o;
- Dictionary<string, Dictionary<int, int>> r =
- MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNDV(out o, result);
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- callback.called();
- }
-
- public void opNDRI(Ice.AsyncResult result)
- {
- Dictionary<string, Dictionary<string, string>> i =
- (Dictionary<string, Dictionary<string, string>>)result.AsyncState;
- Dictionary<string, Dictionary<string, string>> o;
- Dictionary<string, Dictionary<string, string>> r =
- MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNDR(out o, result);
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- callback.called();
- }
-
- public void opOVI(Ice.AsyncResult result)
- {
- OV i = (OV)result.AsyncState;
- OV o;
- OV r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opOV(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opORI(Ice.AsyncResult result)
- {
- OR i = (OR)result.AsyncState;
- OR o;
- OR r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opOR(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opODVI(Ice.AsyncResult result)
- {
- ODV i = (ODV)result.AsyncState;
- ODV o;
- ODV r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opODV(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opODRI(Ice.AsyncResult result)
- {
- ODR i = (ODR)result.AsyncState;
- ODR o;
- ODR r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opODR(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opNODVI(Ice.AsyncResult result)
- {
- Dictionary<string, ODV> i = (Dictionary<string, ODV>)result.AsyncState;
- Dictionary<string, ODV> o;
- Dictionary<string, ODV> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNODV(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opNODRI(Ice.AsyncResult result)
- {
- Dictionary<string, ODR> i = (Dictionary<string, ODR>)result.AsyncState;
- Dictionary<string, ODR> o;
- Dictionary<string, ODR> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNODR(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opONDVI(Ice.AsyncResult result)
- {
- ONDV i = (ONDV)result.AsyncState;
- ONDV o;
- ONDV r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opONDV(out o, result);
- foreach(string key in i.Keys)
- {
- foreach(string s in i[key].Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key][s], o[key][s]));
- test(Ice.CollectionComparer.Equals(i[key][s], r[key][s]));
- }
- }
- callback.called();
- }
-
- public void opONDRI(Ice.AsyncResult result)
- {
- ONDR i = (ONDR)result.AsyncState;
- ONDR o;
- ONDR r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opONDR(out o, result);
- foreach(string key in i.Keys)
- {
- foreach(string s in i[key].Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key][s], o[key][s]));
- test(Ice.CollectionComparer.Equals(i[key][s], r[key][s]));
- }
- }
- callback.called();
- }
-
- public void opNDAISI(Ice.AsyncResult result)
- {
- Dictionary<string, int[]> i = (Dictionary<string, int[]>)result.AsyncState;
- Dictionary<string, int[]> o;
- Dictionary<string, int[]> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNDAIS(out o, result);
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- callback.called();
- }
-
- public void opNDCISI(Ice.AsyncResult result)
- {
- Dictionary<string, CIS> i = (Dictionary<string, CIS>)result.AsyncState;
- Dictionary<string, CIS> o;
- Dictionary<string, CIS> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNDCIS(out o, result);
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- callback.called();
- }
-
- public void opNDGISI(Ice.AsyncResult result)
- {
- Dictionary<string, List<int>> i = (Dictionary<string, List<int>>)result.AsyncState;
- Dictionary<string, List<int>> o;
- Dictionary<string, List<int>> r =
- MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNDGIS(out o, result);
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- callback.called();
- }
-
- public void opNDASSI(Ice.AsyncResult result)
- {
- Dictionary<string, string[]> i = (Dictionary<string,string[]>)result.AsyncState;
- Dictionary<string, string[]> o;
- Dictionary<string, string[]> r =
- MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNDASS(out o, result);
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- callback.called();
- }
-
- public void opNDCSSI(Ice.AsyncResult result)
- {
- Dictionary<string, CSS> i = (Dictionary<string,CSS>)result.AsyncState;
- Dictionary<string, CSS> o;
- Dictionary<string, CSS> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNDCSS(out o, result);
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- callback.called();
- }
-
- public void opNDGSSI(Ice.AsyncResult result)
- {
- Dictionary<string, List<string>> i = (Dictionary<string,List<string>>)result.AsyncState;
- Dictionary<string, List<string>> o;
- Dictionary<string, List<string>> r =
- MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNDGSS(out o, result);
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- callback.called();
- }
-
- public void opODAISI(Ice.AsyncResult result)
- {
- ODAIS i = (ODAIS)result.AsyncState;
- ODAIS o;
- ODAIS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opODAIS(out o, result);
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- callback.called();
- }
-
- public void opODCISI(Ice.AsyncResult result)
- {
- ODCIS i = (ODCIS)result.AsyncState;
- ODCIS o;
- ODCIS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opODCIS(out o, result);
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- callback.called();
- }
-
- public void opODGISI(Ice.AsyncResult result)
- {
- ODGIS i = (ODGIS)result.AsyncState;
- ODGIS o;
- ODGIS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opODGIS(out o, result);
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- callback.called();
- }
-
- public void opODASSI(Ice.AsyncResult result)
- {
- ODASS i = (ODASS)result.AsyncState;
- ODASS o;
- ODASS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opODASS(out o, result);
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- callback.called();
- }
-
- public void opODCSSI(Ice.AsyncResult result)
- {
- ODCSS i = (ODCSS)result.AsyncState;
- ODCSS o;
- ODCSS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opODCSS(out o, result);
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- callback.called();
- }
-
- public void opODGSSI(Ice.AsyncResult result)
- {
- ODGSS i = (ODGSS)result.AsyncState;
- ODGSS o;
- ODGSS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opODGSS(out o, result);
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- callback.called();
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private CallbackBase callback = new CallbackBase();
- }
-
- internal static void twowaysAMI(Ice.Communicator communicator, Test.MyClassPrx p)
- {
- {
- Dictionary<int, int> i = new Dictionary<int, int>();
- i[0] = 1;
- i[1] = 0;
-
- Callback cb = new Callback();
- p.begin_opNV(i, null, cb.opNVI, i);
- cb.check();
- }
-
- {
- Dictionary<string, string> i = new Dictionary<string, string>();
- i["a"] = "b";
- i["b"] = "a";
-
- Callback cb = new Callback();
- p.begin_opNR(i, null, cb.opNRI, i);
- cb.check();
- }
-
- {
- Dictionary<string, Dictionary<int, int>> i = new Dictionary<string, Dictionary<int, int>>();
- Dictionary<int, int> id = new Dictionary<int, int>();
- id[0] = 1;
- id[1] = 0;
- i["a"] = id;
- i["b"] = id;
-
- Callback cb = new Callback();
- p.begin_opNDV(i, null, cb.opNDVI, i);
- cb.check();
- }
-
- {
- Dictionary<string, Dictionary<string, string>> i = new Dictionary<string, Dictionary<string, string>>();
- Dictionary<string, string> id = new Dictionary<string, string>();
- id["a"] = "b";
- id["b"] = "a";
- i["a"] = id;
- i["b"] = id;
-
- Callback cb = new Callback();
- p.begin_opNDR(i, null, cb.opNDRI, i);
- cb.check();
- }
-
- {
- OV i = new OV();
- i[0] = 1;
- i[1] = 0;
-
- Callback cb = new Callback();
- p.begin_opOV(i, null, cb.opOVI, i);
- cb.check();
- }
-
- {
- OR i = new OR();
- i["a"] = "b";
- i["b"] = "a";
-
- Callback cb = new Callback();
- p.begin_opOR(i, null, cb.opORI, i);
- cb.check();
- }
-
- {
- ODV i = new ODV();
- OV id = new OV();
- id[0] = 1;
- id[1] = 0;
- i["a"] = id;
- i["b"] = id;
-
- Callback cb = new Callback();
- p.begin_opODV(i, null, cb.opODVI, i);
- cb.check();
- }
-
- {
- ODR i = new ODR();
- OR id = new OR();
- id["a"] = "b";
- id["b"] = "a";
- i["a"] = id;
- i["b"] = id;
-
- Callback cb = new Callback();
- p.begin_opODR(i, null, cb.opODRI, i);
- cb.check();
- }
-
- {
- Dictionary<string, ODV> i = new Dictionary<string, ODV>();
- OV iid = new OV();
- iid[0] = 1;
- iid[1] = 0;
- ODV id = new ODV();
- id["a"] = iid;
- id["b"] = iid;
- i["a"] = id;
- i["b"] = id;
-
- Callback cb = new Callback();
- p.begin_opNODV(i, null, cb.opNODVI, i);
- cb.check();
- }
-
- {
- Dictionary<string, ODR> i = new Dictionary<string, ODR>();
- OR iid = new OR();
- iid["a"] = "b";
- iid["b"] = "a";
- ODR id = new ODR();
- id["a"] = iid;
- id["b"] = iid;
- i["a"] = id;
- i["b"] = id;
-
- Callback cb = new Callback();
- p.begin_opNODR(i, null, cb.opNODRI, i);
- cb.check();
- }
-
- {
- ONDV i = new ONDV();
- Dictionary<int, int> iid = new Dictionary<int, int>();
- iid[0] = 1;
- iid[1] = 0;
- Dictionary<string, Dictionary<int, int>> id
- = new Dictionary<string, Dictionary<int, int>>();
- id["a"] = iid;
- id["b"] = iid;
- i["a"] = id;
- i["b"] = id;
-
- Callback cb = new Callback();
- p.begin_opONDV(i, null, cb.opONDVI, i);
- cb.check();
- }
-
- {
- ONDR i = new ONDR();
- Dictionary<string, string> iid = new Dictionary<string, string>();
- iid["a"] = "b";
- iid["b"] = "a";
- Dictionary<string, Dictionary<string, string>> id
- = new Dictionary<string, Dictionary<string, string>>();
- id["a"] = iid;
- id["b"] = iid;
- i["a"] = id;
- i["b"] = id;
-
- Callback cb = new Callback();
- p.begin_opONDR(i, null, cb.opONDRI, i);
- cb.check();
- }
-
- {
- int[] ii = new int[] { 1, 2 };
- Dictionary<string, int[]> i = new Dictionary<string, int[]>();
- i["a"] = ii;
- i["b"] = ii;
-
- Callback cb = new Callback();
- p.begin_opNDAIS(i, null, cb.opNDAISI, i);
- cb.check();
- }
-
- {
- CIS ii = new CIS();
- ii.Add(1);
- ii.Add(2);
- Dictionary<string, CIS> i = new Dictionary<string, CIS>();
- i["a"] = ii;
- i["b"] = ii;
-
- Callback cb = new Callback();
- p.begin_opNDCIS(i, null, cb.opNDCISI, i);
- cb.check();
- }
-
- {
- List<int> ii = new List<int>();
- ii.Add(1);
- ii.Add(2);
- Dictionary<string, List<int>> i = new Dictionary<string, List<int>>();
- i["a"] = ii;
- i["b"] = ii;
-
- Callback cb = new Callback();
- p.begin_opNDGIS(i, null, cb.opNDGISI, i);
- cb.check();
- }
-
- {
- string[] ii = new string[] { "a", "b" };
- Dictionary<string, string[]> i = new Dictionary<string, string[]>();
- i["a"] = ii;
- i["b"] = ii;
-
- Callback cb = new Callback();
- p.begin_opNDASS(i, null, cb.opNDASSI, i);
- cb.check();
- }
-
- {
- CSS ii = new CSS();
- ii.Add("a");
- ii.Add("b");
- Dictionary<string, CSS> i = new Dictionary<string, CSS>();
- i["a"] = ii;
- i["b"] = ii;
-
- Callback cb = new Callback();
- p.begin_opNDCSS(i, null, cb.opNDCSSI, i);
- cb.check();
- }
-
- {
- List<string> ii = new List<string>();
- ii.Add("a");
- ii.Add("b");
- Dictionary<string, List<string>> i = new Dictionary<string, List<string>>();
- i["a"] = ii;
- i["b"] = ii;
-
- Callback cb = new Callback();
- p.begin_opNDGSS(i, null, cb.opNDGSSI, i);
- cb.check();
- }
-
- {
- int[] ii = new int[] { 1, 2 };
- ODAIS i = new ODAIS();
- i["a"] = ii;
- i["b"] = ii;
-
- Callback cb = new Callback();
- p.begin_opODAIS(i, null, cb.opODAISI, i);
- cb.check();
- }
-
- {
- CIS ii = new CIS();
- ii.Add(1);
- ii.Add(2);
- ODCIS i = new ODCIS();
- i["a"] = ii;
- i["b"] = ii;
-
- Callback cb = new Callback();
- p.begin_opODCIS(i, null, cb.opODCISI, i);
- cb.check();
- }
-
- {
- List<int> ii = new List<int>();
- ii.Add(1);
- ii.Add(2);
- ODGIS i = new ODGIS();
- i["a"] = ii;
- i["b"] = ii;
-
- Callback cb = new Callback();
- p.begin_opODGIS(i, null, cb.opODGISI, i);
- cb.check();
- }
-
- {
- string[] ii = new string[] { "a", "b" };
- ODASS i = new ODASS();
- i["a"] = ii;
- i["b"] = ii;
-
- Callback cb = new Callback();
- p.begin_opODASS(i, null, cb.opODASSI, i);
- cb.check();
- }
-
- {
- CSS ii = new CSS();
- ii.Add("a");
- ii.Add("b");
- ODCSS i = new ODCSS();
- i["a"] = ii;
- i["b"] = ii;
-
- Callback cb = new Callback();
- p.begin_opODCSS(i, null, cb.opODCSSI, i);
- cb.check();
- }
-
- {
- List<string> ii = new List<string>();
- ii.Add("a");
- ii.Add("b");
- ODGSS i = new ODGSS();
- i["a"] = ii;
- i["b"] = ii;
-
- Callback cb = new Callback();
- p.begin_opODGSS(i, null, cb.opODGSSI, i);
- cb.check();
- }
- }
-}
diff --git a/cs/test/Ice/exceptions/AllTests.cs b/cs/test/Ice/exceptions/AllTests.cs
index d0c543d7cbc..b14cdae66a7 100644
--- a/cs/test/Ice/exceptions/AllTests.cs
+++ b/cs/test/Ice/exceptions/AllTests.cs
@@ -59,608 +59,6 @@ public class AllTests : TestCommon.TestApp
private bool _called;
}
- private class AMI_Thrower_throwAasAI : AMI_Thrower_throwAasA
- {
- public AMI_Thrower_throwAasAI()
- {
- InitBlock();
- }
- private void InitBlock()
- {
- callback = new Callback();
- }
- public override void ice_response()
- {
- test(false);
- }
-
- public override void ice_exception(Ice.Exception exc)
- {
- try
- {
- throw exc;
- }
- catch(A ex)
- {
- test(ex.aMem == 1);
- }
- catch(Exception)
- {
- test(false);
- }
- callback.called();
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback;
- }
-
- private class AMI_Thrower_throwAasAObjectNotExistI : AMI_Thrower_throwAasA
- {
- public AMI_Thrower_throwAasAObjectNotExistI(Ice.Communicator comm)
- {
- InitBlock(comm);
- }
- private void InitBlock(Ice.Communicator comm)
- {
- callback = new Callback();
- communicator = comm;
- }
- public override void ice_response()
- {
- test(false);
- }
-
- public override void ice_exception(Ice.Exception exc)
- {
- try
- {
- throw exc;
- }
- catch(Ice.ObjectNotExistException ex)
- {
- Ice.Identity id = communicator.stringToIdentity("does not exist");
- test(ex.id.Equals(id));
- }
- catch(Exception)
- {
- test(false);
- }
- callback.called();
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Ice.Communicator communicator;
- private Callback callback;
- }
-
- private class AMI_Thrower_throwAasAFacetNotExistI : AMI_Thrower_throwAasA
- {
- public override void ice_response()
- {
- test(false);
- }
-
- public override void ice_exception(Ice.Exception exc)
- {
- try
- {
- throw exc;
- }
- catch(Ice.FacetNotExistException ex)
- {
- test(ex.facet.Equals("no such facet"));
- }
- catch(Exception)
- {
- test(false);
- }
- callback.called();
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback = new Callback();
- }
-
- private class AMI_Thrower_throwAorDasAorDI : AMI_Thrower_throwAorDasAorD
- {
- public AMI_Thrower_throwAorDasAorDI()
- {
- InitBlock();
- }
- private void InitBlock()
- {
- callback = new Callback();
- }
- public override void ice_response()
- {
- test(false);
- }
-
- public override void ice_exception(Ice.Exception exc)
- {
- try
- {
- throw exc;
- }
- catch(A ex)
- {
- test(ex.aMem == 1);
- }
- catch(D ex)
- {
- test(ex.dMem == - 1);
- }
- catch(Exception)
- {
- test(false);
- }
- callback.called();
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback;
- }
-
- private class AMI_Thrower_throwBasAI : AMI_Thrower_throwBasA
- {
- public AMI_Thrower_throwBasAI()
- {
- InitBlock();
- }
- private void InitBlock()
- {
- callback = new Callback();
- }
- public override void ice_response()
- {
- test(false);
- }
-
- public override void ice_exception(Ice.Exception exc)
- {
- try
- {
- throw exc;
- }
- catch(B ex)
- {
- test(ex.aMem == 1);
- test(ex.bMem == 2);
- }
- catch(Exception)
- {
- test(false);
- }
- callback.called();
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback;
- }
-
- private class AMI_Thrower_throwCasAI : AMI_Thrower_throwCasA
- {
- public AMI_Thrower_throwCasAI()
- {
- InitBlock();
- }
- private void InitBlock()
- {
- callback = new Callback();
- }
- public override void ice_response()
- {
- test(false);
- }
-
- public override void ice_exception(Ice.Exception exc)
- {
- try
- {
- throw exc;
- }
- catch(C ex)
- {
- test(ex.aMem == 1);
- test(ex.bMem == 2);
- test(ex.cMem == 3);
- }
- catch(Exception)
- {
- test(false);
- }
- callback.called();
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback;
- }
-
- private class AMI_Thrower_throwBasBI : AMI_Thrower_throwBasB
- {
- public AMI_Thrower_throwBasBI()
- {
- InitBlock();
- }
- private void InitBlock()
- {
- callback = new Callback();
- }
- public override void ice_response()
- {
- test(false);
- }
-
- public override void ice_exception(Ice.Exception exc)
- {
- try
- {
- throw exc;
- }
- catch(B ex)
- {
- test(ex.aMem == 1);
- test(ex.bMem == 2);
- }
- catch(Exception)
- {
- test(false);
- }
- callback.called();
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback;
- }
-
- private class AMI_Thrower_throwCasBI : AMI_Thrower_throwCasB
- {
- public AMI_Thrower_throwCasBI()
- {
- InitBlock();
- }
- private void InitBlock()
- {
- callback = new Callback();
- }
- public override void ice_response()
- {
- test(false);
- }
-
- public override void ice_exception(Ice.Exception exc)
- {
- try
- {
- throw exc;
- }
- catch(C ex)
- {
- test(ex.aMem == 1);
- test(ex.bMem == 2);
- test(ex.cMem == 3);
- }
- catch(Exception)
- {
- test(false);
- }
- callback.called();
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback;
- }
-
- private class AMI_Thrower_throwCasCI : AMI_Thrower_throwCasC
- {
- public AMI_Thrower_throwCasCI()
- {
- InitBlock();
- }
- private void InitBlock()
- {
- callback = new Callback();
- }
- public override void ice_response()
- {
- test(false);
- }
-
- public override void ice_exception(Ice.Exception exc)
- {
- try
- {
- throw exc;
- }
- catch(C ex)
- {
- test(ex.aMem == 1);
- test(ex.bMem == 2);
- test(ex.cMem == 3);
- }
- catch(Exception)
- {
- test(false);
- }
- callback.called();
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback;
- }
-
- private class AMI_Thrower_throwUndeclaredAI : AMI_Thrower_throwUndeclaredA
- {
- public AMI_Thrower_throwUndeclaredAI()
- {
- InitBlock();
- }
- private void InitBlock()
- {
- callback = new Callback();
- }
- public override void ice_response()
- {
- test(false);
- }
-
- public override void ice_exception(Ice.Exception exc)
- {
- try
- {
- throw exc;
- }
- catch(Ice.UnknownUserException)
- {
- }
- catch(Exception)
- {
- test(false);
- }
- callback.called();
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback;
- }
-
- private class AMI_Thrower_throwUndeclaredBI : AMI_Thrower_throwUndeclaredB
- {
- public AMI_Thrower_throwUndeclaredBI()
- {
- InitBlock();
- }
- private void InitBlock()
- {
- callback = new Callback();
- }
- public override void ice_response()
- {
- test(false);
- }
-
- public override void ice_exception(Ice.Exception exc)
- {
- try
- {
- throw exc;
- }
- catch(Ice.UnknownUserException)
- {
- }
- catch(Exception)
- {
- test(false);
- }
- callback.called();
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback;
- }
-
- private class AMI_Thrower_throwUndeclaredCI : AMI_Thrower_throwUndeclaredC
- {
- public AMI_Thrower_throwUndeclaredCI()
- {
- InitBlock();
- }
- private void InitBlock()
- {
- callback = new Callback();
- }
- public override void ice_response()
- {
- test(false);
- }
-
- public override void ice_exception(Ice.Exception exc)
- {
- try
- {
- throw exc;
- }
- catch(Ice.UnknownUserException)
- {
- }
- catch(Exception)
- {
- test(false);
- }
- callback.called();
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback;
- }
-
- private class AMI_Thrower_throwLocalExceptionI : AMI_Thrower_throwLocalException
- {
- public AMI_Thrower_throwLocalExceptionI()
- {
- InitBlock();
- }
- private void InitBlock()
- {
- callback = new Callback();
- }
- public override void ice_response()
- {
- test(false);
- }
-
- public override void ice_exception(Ice.Exception exc)
- {
- try
- {
- throw exc;
- }
- catch(Ice.UnknownLocalException)
- {
- }
- catch(Exception)
- {
- test(false);
- }
- callback.called();
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback;
- }
-
- private class AMI_Thrower_throwNonIceExceptionI : AMI_Thrower_throwNonIceException
- {
- public AMI_Thrower_throwNonIceExceptionI()
- {
- InitBlock();
- }
- private void InitBlock()
- {
- callback = new Callback();
- }
- public override void ice_response()
- {
- test(false);
- }
-
- public override void ice_exception(Ice.Exception exc)
- {
- try
- {
- throw exc;
- }
- catch(Ice.UnknownException)
- {
- }
- catch(Exception)
- {
- test(false);
- }
- callback.called();
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback;
- }
-
- private class AMI_WrongOperation_noSuchOperationI : AMI_WrongOperation_noSuchOperation
- {
- public AMI_WrongOperation_noSuchOperationI()
- {
- InitBlock();
- }
- private void InitBlock()
- {
- callback = new Callback();
- }
- public override void ice_response()
- {
- test(false);
- }
-
- public override void ice_exception(Ice.Exception exc)
- {
- try
- {
- throw exc;
- }
- catch(Ice.OperationNotExistException ex)
- {
- test(ex.operation.Equals("noSuchOperation"));
- }
- catch(Exception)
- {
- test(false);
- }
- callback.called();
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback;
- }
-
#if SILVERLIGHT
public override Ice.InitializationData initData()
{
@@ -1222,155 +620,7 @@ public class AllTests : TestCommon.TestApp
WriteLine("ok");
- Write("catching exact types with AMI... ");
- Flush();
-
- {
- AMI_Thrower_throwAasAI cb = new AMI_Thrower_throwAasAI();
- 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();
- }
-
- WriteLine("ok");
-
- Write("catching derived types... ");
- 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();
- }
-
- WriteLine("ok");
-
- if(thrower.supportsUndeclaredExceptions())
- {
- Write("catching unknown user exception with AMI... ");
- 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();
- }
-
- WriteLine("ok");
- }
-
- Write("catching object not exist exception with AMI... ");
- 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();
- }
-
- WriteLine("ok");
-
- Write("catching facet not exist exception with AMI... ");
- 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(Exception)
- {
- test(false);
- }
-
- WriteLine("ok");
-
- Write("catching operation not exist exception with AMI... ");
- Flush();
-
- {
- AMI_WrongOperation_noSuchOperationI cb = new AMI_WrongOperation_noSuchOperationI();
- WrongOperationPrx thrower2 = WrongOperationPrxHelper.uncheckedCast(thrower);
- thrower2.noSuchOperation_async(cb);
- cb.check();
- }
-
- WriteLine("ok");
-
- Write("catching unknown local exception with AMI... ");
- Flush();
-
- {
- AMI_Thrower_throwLocalExceptionI cb = new AMI_Thrower_throwLocalExceptionI();
- thrower.throwLocalException_async(cb);
- cb.check();
- }
-
- WriteLine("ok");
-
- Write("catching unknown non-Ice exception with AMI... ");
- Flush();
-
- AMI_Thrower_throwNonIceExceptionI cb2 = new AMI_Thrower_throwNonIceExceptionI();
- thrower.throwNonIceException_async(cb2);
- cb2.check();
-
- WriteLine("ok");
-
- Write("catching exact types with new AMI mapping... ");
+ Write("catching exact types with AMI mapping... ");
Flush();
{
diff --git a/cs/test/Ice/exceptions/Test.ice b/cs/test/Ice/exceptions/Test.ice
index 15e53f9e9b9..c3aa3ef9bd8 100644
--- a/cs/test/Ice/exceptions/Test.ice
+++ b/cs/test/Ice/exceptions/Test.ice
@@ -40,7 +40,7 @@ exception D
int dMem;
};
-["ami"] interface Thrower
+interface Thrower
{
void shutdown();
bool supportsUndeclaredExceptions();
@@ -67,7 +67,7 @@ exception D
void throwAfterException() throws A;
};
-["ami"] interface WrongOperation
+interface WrongOperation
{
void noSuchOperation();
};
diff --git a/cs/test/Ice/exceptions/TestAMD.ice b/cs/test/Ice/exceptions/TestAMD.ice
index 6266445f2f3..2602963183d 100644
--- a/cs/test/Ice/exceptions/TestAMD.ice
+++ b/cs/test/Ice/exceptions/TestAMD.ice
@@ -40,7 +40,7 @@ exception D
int dMem;
};
-["ami", "amd"] interface Thrower
+["amd"] interface Thrower
{
void shutdown();
bool supportsUndeclaredExceptions();
@@ -67,7 +67,7 @@ exception D
void throwAfterException() throws A;
};
-["ami", "amd"] interface WrongOperation
+["amd"] interface WrongOperation
{
void noSuchOperation();
};
diff --git a/cs/test/Ice/operations/AllTests.cs b/cs/test/Ice/operations/AllTests.cs
index d2e67fda342..45956e10508 100644
--- a/cs/test/Ice/operations/AllTests.cs
+++ b/cs/test/Ice/operations/AllTests.cs
@@ -66,22 +66,11 @@ public class AllTests : TestCommon.TestApp
TwowaysAMI.twowaysAMI(communicator, derivedProxy);
WriteLine("ok");
- Write("testing twoway operations with new AMI mapping... ");
- Flush();
- TwowaysNewAMI.twowaysNewAMI(communicator, cl);
- TwowaysNewAMI.twowaysNewAMI(communicator, derivedProxy);
- WriteLine("ok");
-
Write("testing oneway operations with AMI... ");
Flush();
OnewaysAMI.onewaysAMI(communicator, cl);
WriteLine("ok");
- Write("testing oneway operations with new AMI mapping... ");
- Flush();
- OnewaysNewAMI.onewaysNewAMI(communicator, cl);
- WriteLine("ok");
-
Write("testing batch oneway operations... ");
Flush();
BatchOneways.batchOneways(cl);
diff --git a/cs/test/Ice/operations/Makefile b/cs/test/Ice/operations/Makefile
index 1a0745f26da..3550bd2339d 100644
--- a/cs/test/Ice/operations/Makefile
+++ b/cs/test/Ice/operations/Makefile
@@ -11,14 +11,14 @@ top_srcdir = ../../..
TARGETS = client.exe server.exe collocated.exe serveramd.exe servertie.exe serveramdtie.exe
-C_SRCS = AllTests.cs Client.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs BatchOneways.cs \
+C_SRCS = AllTests.cs Client.cs Twoways.cs TwowaysAMI.cs BatchOneways.cs \
BatchOnewaysAMI.cs ../../TestCommon/TestApp.cs \
- Oneways.cs OnewaysAMI.cs OnewaysNewAMI.cs
+ Oneways.cs OnewaysAMI.cs
S_SRCS = MyDerivedClassI.cs Server.cs
-COL_SRCS = AllTests.cs Collocated.cs MyDerivedClassI.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs \
+COL_SRCS = AllTests.cs Collocated.cs MyDerivedClassI.cs Twoways.cs TwowaysAMI.cs \
../../TestCommon/TestApp.cs \
BatchOneways.cs BatchOnewaysAMI.cs Oneways.cs \
- OnewaysAMI.cs OnewaysNewAMI.cs
+ OnewaysAMI.cs
SAMD_SRCS = MyDerivedClassAMDI.cs Server.cs
STIE_SRCS = MyDerivedClassTieI.cs Server.cs
SAMD_TIE_SRCS = MyDerivedClassAMDTieI.cs Server.cs
diff --git a/cs/test/Ice/operations/Makefile.mak b/cs/test/Ice/operations/Makefile.mak
index 496e66fe5c9..ad698c87930 100644
--- a/cs/test/Ice/operations/Makefile.mak
+++ b/cs/test/Ice/operations/Makefile.mak
@@ -11,11 +11,11 @@ top_srcdir = ..\..\..
TARGETS = client.exe server.exe collocated.exe serveramd.exe servertie.exe serveramdtie.exe
-C_SRCS = AllTests.cs Client.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs BatchOneways.cs Oneways.cs \
- BatchOnewaysAMI.cs OnewaysAMI.cs OnewaysNewAMI.cs ..\..\TestCommon\TestApp.cs
+C_SRCS = AllTests.cs Client.cs Twoways.cs TwowaysAMI.cs BatchOneways.cs Oneways.cs \
+ BatchOnewaysAMI.cs OnewaysAMI.cs ..\..\TestCommon\TestApp.cs
S_SRCS = MyDerivedClassI.cs Server.cs
-COL_SRCS = AllTests.cs Collocated.cs MyDerivedClassI.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs \
- BatchOneways.cs BatchOnewaysAMI.cs Oneways.cs OnewaysAMI.cs OnewaysNewAMI.cs \
+COL_SRCS = AllTests.cs Collocated.cs MyDerivedClassI.cs Twoways.cs TwowaysAMI.cs \
+ BatchOneways.cs BatchOnewaysAMI.cs Oneways.cs OnewaysAMI.cs \
..\..\TestCommon\TestApp.cs
SAMD_SRCS = MyDerivedClassAMDI.cs Server.cs
STIE_SRCS = MyDerivedClassTieI.cs Server.cs
diff --git a/cs/test/Ice/operations/OnewaysAMI.cs b/cs/test/Ice/operations/OnewaysAMI.cs
index 0e75bcf79fb..0002114afb1 100644
--- a/cs/test/Ice/operations/OnewaysAMI.cs
+++ b/cs/test/Ice/operations/OnewaysAMI.cs
@@ -10,8 +10,9 @@
using System;
using System.Diagnostics;
using System.Threading;
+using System.Collections.Generic;
-class OnewaysAMI
+public class OnewaysAMI
{
private static void test(bool b)
{
@@ -21,14 +22,14 @@ class OnewaysAMI
}
}
- private class Callback
+ private class CallbackBase
{
- internal Callback()
+ internal CallbackBase()
{
_called = false;
}
- public void check()
+ public virtual void check()
{
lock(this)
{
@@ -36,12 +37,11 @@ class OnewaysAMI
{
System.Threading.Monitor.Wait(this);
}
-
_called = false;
}
}
- public void called()
+ public virtual void called()
{
lock(this)
{
@@ -54,128 +54,154 @@ class OnewaysAMI
private bool _called;
}
- private class AMI_MyClass_opVoidI : Test.AMI_MyClass_opVoid
+ private class Callback : CallbackBase
{
- public override void ice_response()
+ public Callback()
{
- test(false);
}
- public override void ice_exception(Ice.Exception ex)
+ public void
+ sent(bool sentSynchronously)
{
- test(false);
- }
- }
-
- private class AMI_MyClass_opIdempotentI : Test.AMI_MyClass_opIdempotent
- {
- public override void ice_response()
- {
- test(false);
+ called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void noException(Ice.Exception ex)
{
test(false);
}
}
- private class AMI_MyClass_opNonmutatingI : Test.AMI_MyClass_opNonmutating
+ internal static void onewaysAMI(Ice.Communicator communicator, Test.MyClassPrx proxy)
{
- public override void ice_response()
+ Test.MyClassPrx p = Test.MyClassPrxHelper.uncheckedCast(proxy.ice_oneway());
+
{
- test(false);
+ Callback cb = new Callback();
+ p.begin_ice_ping().whenCompleted(cb.noException).whenSent(cb.sent);
+ cb.check();
}
- public override void ice_exception(Ice.Exception ex)
{
- test(false);
+ Callback cb = new Callback();
+ p.begin_ice_ping().whenCompleted(
+ (Ice.Exception ex) =>
+ {
+ cb.noException(ex);
+ }
+ ).whenSent(
+ (bool sentSynchronously) =>
+ {
+ cb.sent(sentSynchronously);
+ });
+ cb.check();
}
- }
- private class AMI_MyClass_opVoidExI : Test.AMI_MyClass_opVoid
- {
- public override void ice_response()
{
- test(false);
+ try
+ {
+ p.begin_ice_isA("::Test::MyClass");
+ test(false);
+ }
+ catch(System.ArgumentException)
+ {
+ }
}
-
- public override void ice_exception(Ice.Exception ex)
+
{
- test(ex is Ice.NoEndpointException);
- callback.called();
+ try
+ {
+ p.begin_ice_id();
+ test(false);
+ }
+ catch(System.ArgumentException)
+ {
+ }
}
-
- public void check()
+
{
- callback.check();
+ try
+ {
+ p.begin_ice_ids();
+ test(false);
+ }
+ catch(System.ArgumentException)
+ {
+ }
}
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opByteExI : Test.AMI_MyClass_opByte
- {
- public override void ice_response(byte r, byte b)
{
- test(false);
+ Callback cb = new Callback();
+ p.begin_opVoid().whenCompleted(cb.noException).whenSent(cb.sent);
+ cb.check();
}
- public override void ice_exception(Ice.Exception ex)
{
- test(ex is Ice.TwowayOnlyException);
- callback.called();
+ Callback cb = new Callback();
+ p.begin_opVoid().whenCompleted(
+ (Ice.Exception ex) =>
+ {
+ cb.noException(ex);
+ }
+ ).whenSent(
+ (bool sentSynchronously) =>
+ {
+ cb.sent(sentSynchronously);
+ });
+ cb.check();
}
- public void check()
{
- callback.check();
+ Callback cb = new Callback();
+ p.begin_opIdempotent().whenCompleted(cb.noException).whenSent(cb.sent);
+ cb.check();
}
- private Callback callback = new Callback();
- }
-
- internal static void onewaysAMI(Ice.Communicator communicator, Test.MyClassPrx p)
- {
- p = Test.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);
+ Callback cb = new Callback();
+ p.begin_opIdempotent().whenCompleted(
+ (Ice.Exception ex) =>
+ {
+ cb.noException(ex);
+ }
+ ).whenSent(
+ (bool sentSynchronously) =>
+ {
+ cb.sent(sentSynchronously);
+ });
+ cb.check();
}
{
- AMI_MyClass_opIdempotentI cb = new AMI_MyClass_opIdempotentI();
- p.opIdempotent_async(cb);
+ Callback cb = new Callback();
+ p.begin_opNonmutating().whenCompleted(cb.noException).whenSent(cb.sent);
+ cb.check();
}
{
- AMI_MyClass_opNonmutatingI cb = new AMI_MyClass_opNonmutatingI();
- p.opNonmutating_async(cb);
+ Callback cb = new Callback();
+ p.begin_opNonmutating().whenCompleted(
+ (Ice.Exception ex) =>
+ {
+ cb.noException(ex);
+ }
+ ).whenSent(
+ (bool sentSynchronously) =>
+ {
+ cb.sent(sentSynchronously);
+ });
+ cb.check();
}
{
- // Check that a call to a void operation raises NoEndpointException
- // in the ice_exception() callback instead of at the point of call.
- Test.MyClassPrx indirect = Test.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(System.Exception)
+ catch(System.ArgumentException)
{
- 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/cs/test/Ice/operations/OnewaysNewAMI.cs b/cs/test/Ice/operations/OnewaysNewAMI.cs
deleted file mode 100644
index 7c08523e318..00000000000
--- a/cs/test/Ice/operations/OnewaysNewAMI.cs
+++ /dev/null
@@ -1,207 +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.
-//
-// **********************************************************************
-
-using System;
-using System.Diagnostics;
-using System.Threading;
-using System.Collections.Generic;
-
-public class OnewaysNewAMI
-{
- private static void test(bool b)
- {
- if(!b)
- {
- throw new System.SystemException();
- }
- }
-
- private class CallbackBase
- {
- internal CallbackBase()
- {
- _called = false;
- }
-
- public virtual void check()
- {
- lock(this)
- {
- while(!_called)
- {
- System.Threading.Monitor.Wait(this);
- }
- _called = false;
- }
- }
-
- public virtual void called()
- {
- lock(this)
- {
- Debug.Assert(!_called);
- _called = true;
- System.Threading.Monitor.Pulse(this);
- }
- }
-
- private bool _called;
- }
-
- private class Callback : CallbackBase
- {
- public Callback()
- {
- }
-
- public void
- sent(bool sentSynchronously)
- {
- called();
- }
-
- public void noException(Ice.Exception ex)
- {
- test(false);
- }
- }
-
- internal static void onewaysNewAMI(Ice.Communicator communicator, Test.MyClassPrx proxy)
- {
- Test.MyClassPrx p = Test.MyClassPrxHelper.uncheckedCast(proxy.ice_oneway());
-
- {
- Callback cb = new Callback();
- p.begin_ice_ping().whenCompleted(cb.noException).whenSent(cb.sent);
- cb.check();
- }
-
- {
- Callback cb = new Callback();
- p.begin_ice_ping().whenCompleted(
- (Ice.Exception ex) =>
- {
- cb.noException(ex);
- }
- ).whenSent(
- (bool sentSynchronously) =>
- {
- cb.sent(sentSynchronously);
- });
- cb.check();
- }
-
- {
- try
- {
- p.begin_ice_isA("::Test::MyClass");
- test(false);
- }
- catch(System.ArgumentException)
- {
- }
- }
-
- {
- try
- {
- p.begin_ice_id();
- test(false);
- }
- catch(System.ArgumentException)
- {
- }
- }
-
- {
- try
- {
- p.begin_ice_ids();
- test(false);
- }
- catch(System.ArgumentException)
- {
- }
- }
-
- {
- Callback cb = new Callback();
- p.begin_opVoid().whenCompleted(cb.noException).whenSent(cb.sent);
- cb.check();
- }
-
- {
- Callback cb = new Callback();
- p.begin_opVoid().whenCompleted(
- (Ice.Exception ex) =>
- {
- cb.noException(ex);
- }
- ).whenSent(
- (bool sentSynchronously) =>
- {
- cb.sent(sentSynchronously);
- });
- cb.check();
- }
-
- {
- Callback cb = new Callback();
- p.begin_opIdempotent().whenCompleted(cb.noException).whenSent(cb.sent);
- cb.check();
- }
-
- {
- Callback cb = new Callback();
- p.begin_opIdempotent().whenCompleted(
- (Ice.Exception ex) =>
- {
- cb.noException(ex);
- }
- ).whenSent(
- (bool sentSynchronously) =>
- {
- cb.sent(sentSynchronously);
- });
- cb.check();
- }
-
- {
- Callback cb = new Callback();
- p.begin_opNonmutating().whenCompleted(cb.noException).whenSent(cb.sent);
- cb.check();
- }
-
- {
- Callback cb = new Callback();
- p.begin_opNonmutating().whenCompleted(
- (Ice.Exception ex) =>
- {
- cb.noException(ex);
- }
- ).whenSent(
- (bool sentSynchronously) =>
- {
- cb.sent(sentSynchronously);
- });
- cb.check();
- }
-
- {
- try
- {
- p.begin_opByte((byte)0xff, (byte)0x0f);
- test(false);
- }
- catch(System.ArgumentException)
- {
- }
- }
- }
-}
diff --git a/cs/test/Ice/operations/Test.ice b/cs/test/Ice/operations/Test.ice
index 2516d9fda33..e5104afa461 100644
--- a/cs/test/Ice/operations/Test.ice
+++ b/cs/test/Ice/operations/Test.ice
@@ -75,7 +75,7 @@ dictionary<MyStruct, MyEnum> MyStructMyEnumD;
exception SomeException {};
-["ami"] class MyClass
+class MyClass
{
void shutdown();
@@ -173,7 +173,7 @@ exception SomeException {};
["nonmutating"] idempotent void opNonmutating();
};
-["ami"] class MyDerivedClass extends MyClass
+class MyDerivedClass extends MyClass
{
void opDerived();
};
diff --git a/cs/test/Ice/operations/TestAMD.ice b/cs/test/Ice/operations/TestAMD.ice
index 728b68fc886..89fa6c6b299 100644
--- a/cs/test/Ice/operations/TestAMD.ice
+++ b/cs/test/Ice/operations/TestAMD.ice
@@ -73,7 +73,7 @@ dictionary<string, MyEnum> StringMyEnumD;
dictionary<MyEnum, string> MyEnumStringD;
dictionary<MyStruct, MyEnum> MyStructMyEnumD;
-["ami", "amd"] class MyClass
+["amd"] class MyClass
{
void shutdown();
@@ -171,12 +171,12 @@ dictionary<MyStruct, MyEnum> MyStructMyEnumD;
["nonmutating"] idempotent void opNonmutating();
};
-["ami", "amd"] class MyDerivedClass extends MyClass
+["amd"] class MyDerivedClass extends MyClass
{
void opDerived();
};
-["ami", "amd"] interface TestCheckedCast
+["amd"] interface TestCheckedCast
{
Ice::Context getContext();
};
diff --git a/cs/test/Ice/operations/TwowaysAMI.cs b/cs/test/Ice/operations/TwowaysAMI.cs
index ac1ad7a626f..cc4f5fe2aaa 100644
--- a/cs/test/Ice/operations/TwowaysAMI.cs
+++ b/cs/test/Ice/operations/TwowaysAMI.cs
@@ -22,9 +22,9 @@ public class TwowaysAMI
}
}
- private class Callback
+ private class CallbackBase
{
- internal Callback()
+ internal CallbackBase()
{
_called = false;
}
@@ -37,7 +37,6 @@ public class TwowaysAMI
{
System.Threading.Monitor.Wait(this);
}
-
_called = false;
}
}
@@ -55,257 +54,114 @@ public class TwowaysAMI
private bool _called;
}
- private class AMI_MyClass_opVoidI : Test.AMI_MyClass_opVoid
+ private class Callback : CallbackBase
{
- public override void ice_response()
- {
- callback.called();
- }
-
- public override void ice_exception(Ice.Exception ex)
+ public Callback()
{
- Console.WriteLine(ex.ToString());
- test(false);
}
- public virtual void check()
+ public Callback(Ice.Communicator c)
{
- callback.check();
+ _communicator = c;
}
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opIdempotentI : Test.AMI_MyClass_opIdempotent
- {
- public override void ice_response()
+ public Callback(int l)
{
- callback.called();
+ _l = l;
}
- public override void ice_exception(Ice.Exception ex)
+ public Callback(Dictionary<string, string> d)
{
- test(false);
+ _d = d;
}
- public virtual void check()
+ public void ice_ping()
{
- callback.check();
+ called();
}
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opNonmutatingI : Test.AMI_MyClass_opNonmutating
- {
- public override void ice_response()
+ public void ice_isA(bool r)
{
- callback.called();
+ test(r);
+ called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void ice_ids(string[] ids)
{
- test(false);
+ test(ids.Length == 3);
+ called();
}
- public virtual void check()
+ public void ice_id(string id)
{
- callback.check();
+ test(id.Equals(Test.MyDerivedClass.ice_staticId()));
+ called();
}
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opVoidExI : Test.AMI_MyClass_opVoid
- {
- public override void ice_response()
+ public void opVoid()
{
- test(false);
+ called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opContext()
{
- test(ex is Ice.NoEndpointException);
- callback.called();
+ called();
}
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opByteI : Test.AMI_MyClass_opByte
- {
- public override void ice_response(byte r, byte b)
+ public void opByte(byte r, byte b)
{
test(b == 0xf0);
test(r == 0xff);
- callback.called();
- }
-
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opByteExI : Test.AMI_MyClass_opByte
- {
- public override void ice_response(byte r, byte b)
- {
- test(false);
- }
-
- public override void ice_exception(Ice.Exception ex)
- {
- test(ex is Ice.NoEndpointException);
- callback.called();
+ called();
}
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opBoolI : Test.AMI_MyClass_opBool
- {
- public override void ice_response(bool r, bool b)
+ public void opBool(bool r, bool b)
{
test(b);
test(!r);
- callback.called();
- }
-
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
+ called();
}
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opShortIntLongI : Test.AMI_MyClass_opShortIntLong
- {
- public override void ice_response(long r, short s, int i, long l)
+ public void opShortIntLong(long r, short s, int i, long l)
{
test(s == 10);
test(i == 11);
test(l == 12);
test(r == 12);
- callback.called();
+ called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opFloatDoubleI : Test.AMI_MyClass_opFloatDouble
- {
- public override void ice_response(double r, float f, double d)
+ public void opFloatDouble(double r, float f, double d)
{
test(f == 3.14f);
test(d == 1.1e10);
test(r == 1.1e10);
- callback.called();
- }
-
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
+ called();
}
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opStringI : Test.AMI_MyClass_opString
- {
- public override void ice_response(string r, string s)
+ public void opString(string r, string s)
{
test(s.Equals("world hello"));
test(r.Equals("hello world"));
- callback.called();
+ called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opMyEnumI : Test.AMI_MyClass_opMyEnum
- {
- public override void ice_response(Test.MyEnum r, Test.MyEnum e)
+ public void opMyEnum(Test.MyEnum r, Test.MyEnum e)
{
test(e == Test.MyEnum.enum2);
test(r == Test.MyEnum.enum3);
- callback.called();
- }
-
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
+ called();
}
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opMyClassI : Test.AMI_MyClass_opMyClass
- {
- public AMI_MyClass_opMyClassI(Ice.Communicator comunicator)
- {
- _communicator = comunicator;
- }
-
- public override void ice_response(Test.MyClassPrx r, Test.MyClassPrx c1, Test.MyClassPrx c2)
+ public void opMyClass(Test.MyClassPrx r, Test.MyClassPrx c1, Test.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 thread per connection mode.
+
+ //
+ // We can't do the callbacks below in connection serialization mode.
+ //
if(_communicator.getProperties().getPropertyAsInt("Ice.ThreadPool.Client.Serialize") == 0)
{
r.opVoid();
@@ -319,62 +175,28 @@ public class TwowaysAMI
{
}
}
- callback.called();
+ called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback = new Callback();
- private Ice.Communicator _communicator;
- }
-
- private class AMI_MyClass_opStructI : Test.AMI_MyClass_opStruct
- {
- public AMI_MyClass_opStructI(Ice.Communicator comunicator)
- {
- _communicator = comunicator;
- }
-
- public override void ice_response(Test.Structure rso, Test.Structure so)
+ public void opStruct(Test.Structure rso, Test.Structure so)
{
test(rso.p == null);
test(rso.e == Test.MyEnum.enum2);
test(rso.s.s.Equals("def"));
test(so.e == Test.MyEnum.enum3);
test(so.s.s.Equals("a new string"));
- // We can't do the callbacks below in thread per connection mode.
+
+ //
+ // 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();
+ called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback = new Callback();
- private Ice.Communicator _communicator;
- }
-
- private class AMI_MyClass_opByteSI : Test.AMI_MyClass_opByteS
- {
- public override void ice_response(Test.ByteS rso, Test.ByteS bso)
+ public void opByteS(Test.ByteS rso, Test.ByteS bso)
{
test(bso.Count == 4);
test(bso[0] == 0x22);
@@ -390,25 +212,10 @@ public class TwowaysAMI
test(rso[5] == 0xf2);
test(rso[6] == 0xf3);
test(rso[7] == 0xf4);
- callback.called();
- }
-
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
+ called();
}
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opBoolSI : Test.AMI_MyClass_opBoolS
- {
- public override void ice_response(Test.BoolS rso, Test.BoolS bso)
+ public void opBoolS(Test.BoolS rso, Test.BoolS bso)
{
test(bso.Count == 4);
test(bso[0]);
@@ -419,25 +226,10 @@ public class TwowaysAMI
test(!rso[0]);
test(rso[1]);
test(rso[2]);
- callback.called();
- }
-
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
+ called();
}
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opShortIntLongSI : Test.AMI_MyClass_opShortIntLongS
- {
- public override void ice_response(Test.LongS rso, Test.ShortS sso, Test.IntS iso, Test.LongS lso)
+ public void opShortIntLongS(Test.LongS rso, Test.ShortS sso, Test.IntS iso, Test.LongS lso)
{
test(sso.Count == 3);
test(sso[0] == 1);
@@ -459,25 +251,10 @@ public class TwowaysAMI
test(rso[0] == 10);
test(rso[1] == 30);
test(rso[2] == 20);
- callback.called();
- }
-
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
+ called();
}
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opFloatDoubleSI : Test.AMI_MyClass_opFloatDoubleS
- {
- public override void ice_response(Test.DoubleS rso, Test.FloatS fso, Test.DoubleS dso)
+ public void opFloatDoubleS(Test.DoubleS rso, Test.FloatS fso, Test.DoubleS dso)
{
test(fso.Count == 2);
test(fso[0] == 3.14f);
@@ -492,25 +269,10 @@ public class TwowaysAMI
test(rso[2] == 1.3e10);
test((float) rso[3] == 3.14f);
test((float) rso[4] == 1.11f);
- callback.called();
- }
-
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
+ called();
}
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opStringSI : Test.AMI_MyClass_opStringS
- {
- public override void ice_response(Test.StringS rso, Test.StringS sso)
+ public void opStringS(Test.StringS rso, Test.StringS sso)
{
test(sso.Count == 4);
test(sso[0].Equals("abc"));
@@ -521,25 +283,10 @@ public class TwowaysAMI
test(rso[0].Equals("fghi"));
test(rso[1].Equals("de"));
test(rso[2].Equals("abc"));
- callback.called();
- }
-
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
+ called();
}
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opByteSSI : Test.AMI_MyClass_opByteSS
- {
- public override void ice_response(Test.ByteSS rso, Test.ByteSS bso)
+ public void opByteSS(Test.ByteSS rso, Test.ByteSS bso)
{
test(bso.Count == 2);
test(bso[0].Count == 1);
@@ -560,25 +307,10 @@ public class TwowaysAMI
test(rso[3].Count == 2);
test(rso[3][0] == 0xf2);
test(rso[3][1] == 0xf1);
- callback.called();
- }
-
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
+ called();
}
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opBoolSSI : Test.AMI_MyClass_opBoolSS
- {
- public override void ice_response(Test.BoolSS rso, Test.BoolSS bso)
+ public void opBoolSS(Test.BoolSS rso, Test.BoolSS bso)
{
test(bso.Count == 4);
test(bso[0].Count == 1);
@@ -600,25 +332,10 @@ public class TwowaysAMI
test(!rso[1][0]);
test(rso[2].Count == 1);
test(rso[2][0]);
- callback.called();
+ called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opShortIntLongSSI : Test.AMI_MyClass_opShortIntLongSS
- {
- public override void ice_response(Test.LongSS rso, Test.ShortSS sso, Test.IntSS iso, Test.LongSS lso)
+ public void opShortIntLongSS(Test.LongSS rso, Test.ShortSS sso, Test.IntSS iso, Test.LongSS lso)
{
test(rso.Count == 1);
test(rso[0].Count == 2);
@@ -645,25 +362,10 @@ public class TwowaysAMI
test(lso[1].Count == 2);
test(lso[1][0] == 496);
test(lso[1][1] == 1729);
- callback.called();
+ called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opFloatDoubleSSI : Test.AMI_MyClass_opFloatDoubleSS
- {
- public override void ice_response(Test.DoubleSS rso, Test.FloatSS fso, Test.DoubleSS dso)
+ public void opFloatDoubleSS(Test.DoubleSS rso, Test.FloatSS fso, Test.DoubleSS dso)
{
test(fso.Count == 3);
test(fso[0].Count == 1);
@@ -685,25 +387,10 @@ public class TwowaysAMI
test(rso[1][0] == 1.1e10);
test(rso[1][1] == 1.2e10);
test(rso[1][2] == 1.3e10);
- callback.called();
- }
-
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
+ called();
}
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opStringSSI : Test.AMI_MyClass_opStringSS
- {
- public override void ice_response(Test.StringSS rso, Test.StringSS sso)
+ public void opStringSS(Test.StringSS rso, Test.StringSS sso)
{
test(sso.Count == 5);
test(sso[0].Count == 1);
@@ -720,25 +407,10 @@ public class TwowaysAMI
test(rso[0][0].Equals("xyz"));
test(rso[1].Count == 0);
test(rso[2].Count == 0);
- callback.called();
- }
-
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
+ called();
}
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opStringSSSI : Test.AMI_MyClass_opStringSSS
- {
- public override void ice_response(Test.StringSS[] rsso, Test.StringSS[] ssso)
+ public void opStringSSS(Test.StringSS[] rsso, Test.StringSS[] ssso)
{
test(ssso.Length == 5);
test(ssso[0].Count == 2);
@@ -772,25 +444,10 @@ public class TwowaysAMI
test(rsso[2][0][0].Equals(""));
test(rsso[2][0][1].Equals(""));
test(rsso[2][1][0].Equals("abcd"));
- callback.called();
+ called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opByteBoolDI : Test.AMI_MyClass_opByteBoolD
- {
- public override void ice_response(Dictionary<byte, bool> ro, Dictionary<byte, bool> _do)
+ public void opByteBoolD(Dictionary<byte, bool> ro, Dictionary<byte, bool> _do)
{
Dictionary<byte, bool> di1 = new Dictionary<byte, bool>();
di1[10] = true;
@@ -801,25 +458,10 @@ public class TwowaysAMI
test(ro[11] == false);
test(ro[100] == false);
test(ro[101] == true);
- callback.called();
+ called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opShortIntDI : Test.AMI_MyClass_opShortIntD
- {
- public override void ice_response(Dictionary<short, int> ro, Dictionary<short, int> _do)
+ public void opShortIntD(Dictionary<short, int> ro, Dictionary<short, int> _do)
{
Dictionary<short, int> di1 = new Dictionary<short, int>();
di1[110] = -1;
@@ -830,25 +472,10 @@ public class TwowaysAMI
test(ro[111] == -100);
test(ro[1100] == 123123);
test(ro[1101] == 0);
- callback.called();
+ called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opLongFloatDI : Test.AMI_MyClass_opLongFloatD
- {
- public override void ice_response(Dictionary<long, float> ro, Dictionary<long, float> _do)
+ public void opLongFloatD(Dictionary<long, float> ro, Dictionary<long, float> _do)
{
Dictionary<long, float> di1 = new Dictionary<long, float>();
di1[999999110L] = -1.1f;
@@ -859,25 +486,10 @@ public class TwowaysAMI
test(ro[999999120L] == -100.4f);
test(ro[999999111L] == 123123.2f);
test(ro[999999130L] == 0.5f);
- callback.called();
- }
-
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
+ called();
}
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opStringStringDI : Test.AMI_MyClass_opStringStringD
- {
- public override void ice_response(Dictionary<string, string> ro, Dictionary<string, string> _do)
+ public void opStringStringD(Dictionary<string, string> ro, Dictionary<string, string> _do)
{
Dictionary<string, string> di1 = new Dictionary<string, string>();
di1["foo"] = "abc -1.1";
@@ -888,25 +500,10 @@ public class TwowaysAMI
test(ro["FOO"].Equals("abc -100.4"));
test(ro["bar"].Equals("abc 123123.2"));
test(ro["BAR"].Equals("abc 0.5"));
- callback.called();
+ called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opStringMyEnumDI : Test.AMI_MyClass_opStringMyEnumD
- {
- public override void ice_response(Dictionary<string, Test.MyEnum> ro, Dictionary<string, Test.MyEnum> _do)
+ public void opStringMyEnumD(Dictionary<string, Test.MyEnum> ro, Dictionary<string, Test.MyEnum> _do)
{
Dictionary<string, Test.MyEnum> di1 = new Dictionary<string, Test.MyEnum>();
di1["abc"] = Test.MyEnum.enum1;
@@ -917,25 +514,10 @@ public class TwowaysAMI
test(ro["qwerty"] == Test.MyEnum.enum3);
test(ro[""] == Test.MyEnum.enum2);
test(ro["Hello!!"] == Test.MyEnum.enum2);
- callback.called();
- }
-
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
+ called();
}
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opMyEnumStringDI : Test.AMI_MyClass_opMyEnumStringD
- {
- public override void ice_response(Dictionary<Test.MyEnum, string> ro, Dictionary<Test.MyEnum, string> _do)
+ public void opMyEnumStringD(Dictionary<Test.MyEnum, string> ro, Dictionary<Test.MyEnum, string> _do)
{
Dictionary<Test.MyEnum, string> di1 = new Dictionary<Test.MyEnum, string>();
di1[Test.MyEnum.enum1] = "abc";
@@ -944,26 +526,11 @@ public class TwowaysAMI
test(ro[Test.MyEnum.enum1].Equals("abc"));
test(ro[Test.MyEnum.enum2].Equals("Hello!!"));
test(ro[Test.MyEnum.enum3].Equals("qwerty"));
- callback.called();
+ called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opMyStructMyEnumDI : Test.AMI_MyClass_opMyStructMyEnumD
- {
- public override void ice_response(Dictionary<Test.MyStruct, Test.MyEnum> ro,
- Dictionary<Test.MyStruct, Test.MyEnum> _do)
+ public void opMyStructMyEnumD(Dictionary<Test.MyStruct, Test.MyEnum> ro,
+ Dictionary<Test.MyStruct, Test.MyEnum> _do)
{
Test.MyStruct s11 = new Test.MyStruct(1, 1);
Test.MyStruct s12 = new Test.MyStruct(1, 2);
@@ -978,234 +545,345 @@ public class TwowaysAMI
test(ro[s12] == Test.MyEnum.enum2);
test(ro[s22] == Test.MyEnum.enum3);
test(ro[s23] == Test.MyEnum.enum2);
- callback.called();
+ called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opIntS(Test.IntS r)
{
- test(false);
+ test(r.Count == _l);
+ for(int j = 0; j < r.Count; ++j)
+ {
+ test(r[j] == -j);
+ }
+ called();
}
- public virtual void check()
+ public void opContextNotEqual(Dictionary<string, string> r)
{
- callback.check();
+ test(!Ice.CollectionComparer.Equals(r, _d));
+ called();
}
- private Callback callback = new Callback();
- }
+ public void opContextEqual(Dictionary<string, string> r)
+ {
+ test(Ice.CollectionComparer.Equals(r, _d));
+ called();
+ }
- private class AMI_MyClass_opIntSI : Test.AMI_MyClass_opIntS
- {
- internal AMI_MyClass_opIntSI(int l)
+ public void opIdempotent()
{
- _l = l;
- callback = new Callback();
+ called();
}
- public override void ice_response(Test.IntS r)
+ public void opNonmutating()
{
- test(r.Count == _l);
- for(int j = 0; j < r.Count; ++j)
- {
- test(r[j] == -j);
- }
- callback.called();
+ called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opDerived()
{
- test(false);
+ called();
}
- public virtual void check()
+ public void exCB(Ice.Exception ex)
{
- callback.check();
+ test(false);
}
+ private Ice.Communicator _communicator;
private int _l;
- private Callback callback;
+ private Dictionary<string, string> _d;
}
- private class AMI_MyClass_opContextEqualI : Test.AMI_MyClass_opContext
+ internal static void twowaysAMI(Ice.Communicator communicator, Test.MyClassPrx p)
{
- internal AMI_MyClass_opContextEqualI(Dictionary<string, string> d)
{
- _d = d;
- callback = new Callback();
+ Ice.AsyncResult r = p.begin_ice_ping();
+ p.end_ice_ping(r);
}
- public override void ice_response(Dictionary<string, string> r)
{
- test(Ice.CollectionComparer.Equals(r, _d));
- callback.called();
+ Callback cb = new Callback();
+ p.begin_ice_ping().whenCompleted(cb.ice_ping, cb.exCB);
+ cb.check();
}
- public override void ice_exception(Ice.Exception ex)
{
- test(false);
+ Callback cb = new Callback();
+ p.begin_ice_ping().whenCompleted(
+ () =>
+ {
+ cb.ice_ping();
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
+ cb.check();
}
- public virtual void check()
{
- callback.check();
+ Ice.AsyncResult r = p.begin_ice_isA(Test.MyClass.ice_staticId());
+ test(p.end_ice_isA(r));
}
- private Dictionary<string, string> _d;
- private Callback callback;
- }
+ {
+ Callback cb = new Callback();
+ p.begin_ice_isA(Test.MyClass.ice_staticId()).whenCompleted(cb.ice_isA, cb.exCB);
+ cb.check();
+ }
- private class AMI_MyClass_opContextNotEqualI : Test.AMI_MyClass_opContext
- {
- internal AMI_MyClass_opContextNotEqualI(Dictionary<string, string> d)
{
- _d = d;
- callback = new Callback();
+ Callback cb = new Callback();
+ p.begin_ice_isA(Test.MyClass.ice_staticId()).whenCompleted(
+ (bool v) =>
+ {
+ cb.ice_isA(v);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
+ cb.check();
}
- public override void ice_response(Dictionary<string, string> r)
{
- test(!Ice.CollectionComparer.Equals(r, _d));
- callback.called();
+ Ice.AsyncResult r = p.begin_ice_ids();
+ test(p.end_ice_ids(r).Length == 3);
}
- public override void ice_exception(Ice.Exception ex)
{
- test(false);
+ Callback cb = new Callback();
+ p.begin_ice_ids().whenCompleted(cb.ice_ids, cb.exCB);
+ cb.check();
}
- public virtual void check()
{
- callback.check();
+ Callback cb = new Callback();
+ p.begin_ice_ids().whenCompleted(
+ (string[] ids) =>
+ {
+ cb.ice_ids(ids);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
+ cb.check();
}
- private Dictionary<string, string> _d;
- private Callback callback;
- }
+ {
+ Ice.AsyncResult r = p.begin_ice_id();
+ test(p.end_ice_id(r).Equals(Test.MyDerivedClass.ice_staticId()));
+ }
- private class AMI_MyDerivedClass_opDerivedI : Test.AMI_MyDerivedClass_opDerived
- {
- public override void ice_response()
{
- callback.called();
+ Callback cb = new Callback();
+ p.begin_ice_id().whenCompleted(cb.ice_id, cb.exCB);
+ cb.check();
}
- public override void ice_exception(Ice.Exception ex)
{
- test(false);
+ Callback cb = new Callback();
+ p.begin_ice_id().whenCompleted(
+ (string id) =>
+ {
+ cb.ice_id(id);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
+ cb.check();
}
- public virtual void check()
{
- callback.check();
+ Ice.AsyncResult r = p.begin_opVoid();
+ p.end_opVoid(r);
}
- private Callback callback = new Callback();
- }
+ {
+ Callback cb = new Callback();
+ p.begin_opVoid().whenCompleted(cb.opVoid, cb.exCB);
+ cb.check();
+ }
- internal static void twowaysAMI(Ice.Communicator communicator, Test.MyClassPrx p)
- {
{
- // Check that a call to a void operation raises NoEndpointException
- // in the ice_exception() callback instead of at the point of call.
- Test.MyClassPrx indirect = Test.MyClassPrxHelper.uncheckedCast(p.ice_adapterId("dummy"));
- AMI_MyClass_opVoidExI cb = new AMI_MyClass_opVoidExI();
- try
- {
- test(!indirect.opVoid_async(cb));
- }
- catch(Ice.Exception)
- {
- test(false);
- }
+ Callback cb = new Callback();
+ p.begin_opVoid().whenCompleted(
+ () =>
+ {
+ cb.opVoid();
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
cb.check();
}
{
- // Check that a call to a twoway operation raises NoEndpointException
- // in the ice_exception() callback instead of at the point of call.
- Test.MyClassPrx indirect = Test.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(Ice.Exception)
- {
- test(false);
- }
+ Ice.AsyncResult r = p.begin_opByte(0xff, 0x0f);
+ byte p3;
+ byte ret = p.end_opByte(out p3, r);
+ test(p3 == 0xf0);
+ test(ret == 0xff);
+ }
+
+ {
+ Callback cb = new Callback();
+ p.begin_opByte(0xff, 0x0f).whenCompleted(cb.opByte, cb.exCB);
cb.check();
}
{
- AMI_MyClass_opVoidI cb = new AMI_MyClass_opVoidI();
- p.opVoid_async(cb);
+ Callback cb = new Callback();
+ p.begin_opByte(0xff, 0x0f).whenCompleted(
+ (byte r, byte b) =>
+ {
+ cb.opByte(r, b);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
cb.check();
- // Let's check if we can reuse the callback object for another call.
- p.opVoid_async(cb);
+ }
+
+ {
+ Callback cb = new Callback();
+ p.begin_opBool(true, false).whenCompleted(cb.opBool, cb.exCB);
+ cb.check();
+ }
+
+ {
+ Callback cb = new Callback();
+ p.begin_opBool(true, false).whenCompleted(
+ (bool r, bool b) =>
+ {
+ cb.opBool(r, b);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
cb.check();
}
{
- Ice.InitializationData initData = new Ice.InitializationData();
- initData.properties = communicator.getProperties().ice_clone_();
- Ice.Communicator ic = Ice.Util.initialize(initData);
+ Callback cb = new Callback();
+ p.begin_opShortIntLong(10, 11, 12).whenCompleted(cb.opShortIntLong, cb.exCB);
+ cb.check();
+ }
- Ice.ObjectPrx obj = ic.stringToProxy(p.ToString());
- Test.MyClassPrx p2 = Test.MyClassPrxHelper.checkedCast(obj);
+ {
+ Callback cb = new Callback();
+ p.begin_opShortIntLong(10, 11, 12).whenCompleted(
+ (long r, short s, int i, long l) =>
+ {
+ cb.opShortIntLong(r, s, i, l);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
+ cb.check();
+ }
- ic.destroy();
+ {
+ Callback cb = new Callback();
+ p.begin_opFloatDouble(3.14f, 1.1E10).whenCompleted(cb.opFloatDouble, cb.exCB);
+ cb.check();
+ }
- AMI_MyClass_opVoidI cb = new AMI_MyClass_opVoidI();
- try
- {
- test(!p2.opVoid_async(cb));
- test(false);
- }
- catch(Ice.CommunicatorDestroyedException)
- {
- // Expected.
- }
+ {
+ Callback cb = new Callback();
+ p.begin_opFloatDouble(3.14f, 1.1E10).whenCompleted(
+ (double r, float f, double d) =>
+ {
+ cb.opFloatDouble(r, f, d);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
+ cb.check();
}
{
- AMI_MyClass_opByteI cb = new AMI_MyClass_opByteI();
- p.opByte_async(cb, 0xff, 0x0f);
+ Callback cb = new Callback();
+ p.begin_opString("hello", "world").whenCompleted(cb.opString, cb.exCB);
cb.check();
}
{
- AMI_MyClass_opBoolI cb = new AMI_MyClass_opBoolI();
- p.opBool_async(cb, true, false);
+ Callback cb = new Callback();
+ p.begin_opString("hello", "world").whenCompleted(
+ (string r, string s) =>
+ {
+ cb.opString(r, s);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
cb.check();
}
{
- AMI_MyClass_opShortIntLongI cb = new AMI_MyClass_opShortIntLongI();
- p.opShortIntLong_async(cb, (short) 10, 11, 12L);
+ Callback cb = new Callback();
+ p.begin_opMyEnum(Test.MyEnum.enum2).whenCompleted(cb.opMyEnum, cb.exCB);
cb.check();
}
{
- AMI_MyClass_opFloatDoubleI cb = new AMI_MyClass_opFloatDoubleI();
- p.opFloatDouble_async(cb, 3.14f, 1.1e10);
+ Callback cb = new Callback();
+ p.begin_opMyEnum(Test.MyEnum.enum2).whenCompleted(
+ (Test.MyEnum r, Test.MyEnum e) =>
+ {
+ cb.opMyEnum(r, e);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
cb.check();
}
{
- AMI_MyClass_opStringI cb = new AMI_MyClass_opStringI();
- p.opString_async(cb, "hello", "world");
+ Callback cb = new Callback(communicator);
+ p.begin_opMyClass(p).whenCompleted(cb.opMyClass, cb.exCB);
cb.check();
}
{
- AMI_MyClass_opMyEnumI cb = new AMI_MyClass_opMyEnumI();
- p.opMyEnum_async(cb, Test.MyEnum.enum2);
+ Callback cb = new Callback(communicator);
+ p.begin_opMyClass(p).whenCompleted(
+ (Test.MyClassPrx r, Test.MyClassPrx c1, Test.MyClassPrx c2) =>
+ {
+ cb.opMyClass(r, c1, c2);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
cb.check();
}
{
- AMI_MyClass_opMyClassI cb = new AMI_MyClass_opMyClassI(communicator);
- p.opMyClass_async(cb, p);
+ Test.Structure si1 = new Test.Structure();
+ si1.p = p;
+ si1.e = Test.MyEnum.enum3;
+ si1.s = new Test.AnotherStruct();
+ si1.s.s = "abc";
+ Test.Structure si2 = new Test.Structure();
+ si2.p = null;
+ si2.e = Test.MyEnum.enum2;
+ si2.s = new Test.AnotherStruct();
+ si2.s.s = "def";
+
+ Callback cb = new Callback(communicator);
+ p.begin_opStruct(si1, si2).whenCompleted(cb.opStruct, cb.exCB);
cb.check();
}
@@ -1221,74 +899,206 @@ public class TwowaysAMI
si2.s = new Test.AnotherStruct();
si2.s.s = "def";
- AMI_MyClass_opStructI cb = new AMI_MyClass_opStructI(communicator);
- p.opStruct_async(cb, si1, si2);
+ Callback cb = new Callback(communicator);
+ p.begin_opStruct(si1, si2).whenCompleted(
+ (Test.Structure rso, Test.Structure so) =>
+ {
+ cb.opStruct(rso, so);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
cb.check();
}
{
- Test.ByteS bsi1 = new Test.ByteS(new byte[] { 0x01, 0x11, 0x12, 0x22 });
- Test.ByteS bsi2 = new Test.ByteS(new byte[] { 0xf1, 0xf2, 0xf3, 0xf4 });
+ byte[] tbsi1 = new byte[] { 0x01, 0x11, 0x12, 0x22 };
+ Test.ByteS bsi1 = new Test.ByteS(tbsi1);
+ byte[] tbsi2 = new byte[] { 0xf1, 0xf2, 0xf3, 0xf4 };
+ Test.ByteS bsi2 = new Test.ByteS(tbsi2);
- AMI_MyClass_opByteSI cb = new AMI_MyClass_opByteSI();
- p.opByteS_async(cb, bsi1, bsi2);
+ Callback cb = new Callback();
+ p.begin_opByteS(bsi1, bsi2).whenCompleted(cb.opByteS, cb.exCB);
cb.check();
}
{
- Test.BoolS bsi1 = new Test.BoolS(new bool[] { true, true, false });
- Test.BoolS bsi2 = new Test.BoolS(new bool[] { false });
+ byte[] tbsi1 = new byte[] { 0x01, 0x11, 0x12, 0x22 };
+ Test.ByteS bsi1 = new Test.ByteS(tbsi1);
+ byte[] tbsi2 = new byte[] { 0xf1, 0xf2, 0xf3, 0xf4 };
+ Test.ByteS bsi2 = new Test.ByteS(tbsi2);
- AMI_MyClass_opBoolSI cb = new AMI_MyClass_opBoolSI();
- p.opBoolS_async(cb, bsi1, bsi2);
+ Callback cb = new Callback();
+ p.begin_opByteS(bsi1, bsi2).whenCompleted(
+ (Test.ByteS rso, Test.ByteS bso) =>
+ {
+ cb.opByteS(rso, bso);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
cb.check();
}
{
- Test.ShortS ssi = new Test.ShortS(new short[] { 1, 2, 3 });
- Test.IntS isi = new Test.IntS(new int[] { 5, 6, 7, 8 });
- Test.LongS lsi = new Test.LongS(new long[] { 10, 30, 20 });
+ bool[] tbsi1 = new bool[] { true, true, false };
+ Test.BoolS bsi1 = new Test.BoolS(tbsi1);
+ bool[] tbsi2 = new bool[] { false };
+ Test.BoolS bsi2 = new Test.BoolS(tbsi2);
- AMI_MyClass_opShortIntLongSI cb = new AMI_MyClass_opShortIntLongSI();
- p.opShortIntLongS_async(cb, ssi, isi, lsi);
+ Callback cb = new Callback();
+ p.begin_opBoolS(bsi1, bsi2).whenCompleted(cb.opBoolS, cb.exCB);
cb.check();
}
{
- Test.FloatS fsi = new Test.FloatS(new float[] { 3.14f, 1.11f });
- Test.DoubleS dsi = new Test.DoubleS(new double[] { 1.1e10, 1.2e10, 1.3e10 });
+ bool[] tbsi1 = new bool[] { true, true, false };
+ Test.BoolS bsi1 = new Test.BoolS(tbsi1);
+ bool[] tbsi2 = new bool[] { false };
+ Test.BoolS bsi2 = new Test.BoolS(tbsi2);
- AMI_MyClass_opFloatDoubleSI cb = new AMI_MyClass_opFloatDoubleSI();
- p.opFloatDoubleS_async(cb, fsi, dsi);
+ Callback cb = new Callback();
+ p.begin_opBoolS(bsi1, bsi2).whenCompleted(
+ (Test.BoolS rso, Test.BoolS bso) =>
+ {
+ cb.opBoolS(rso, bso);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
cb.check();
}
{
- Test.StringS ssi1 = new Test.StringS(new string[] { "abc", "de", "fghi" });
- Test.StringS ssi2 = new Test.StringS(new string[] { "xyz" });
+ short[] tssi = new short[] { 1, 2, 3 };
+ Test.ShortS ssi = new Test.ShortS(tssi);
+ int[] tisi = new int[] { 5, 6, 7, 8 };
+ Test.IntS isi = new Test.IntS(tisi);
+ long[] tlsi = new long[] { 10, 30, 20 };
+ Test.LongS lsi = new Test.LongS(tlsi);
- AMI_MyClass_opStringSI cb = new AMI_MyClass_opStringSI();
- p.opStringS_async(cb, ssi1, ssi2);
+ Callback cb = new Callback();
+ p.begin_opShortIntLongS(ssi, isi, lsi).whenCompleted(cb.opShortIntLongS, cb.exCB);
cb.check();
}
{
- Test.ByteSS bsi1 = new Test.ByteSS();
- bsi1.Add(new Test.ByteS());
- bsi1.Add(new Test.ByteS());
- bsi1[0].Add(0x01);
- bsi1[0].Add(0x11);
- bsi1[0].Add(0x12);
- bsi1[1].Add(0xff);
- Test.ByteSS bsi2 = new Test.ByteSS();
- bsi2.Add(new Test.ByteS());
- bsi2.Add(new Test.ByteS());
- bsi2[0].Add(0x0e);
- bsi2[1].Add(0xf2);
- bsi2[1].Add(0xf1);
+ short[] tssi = new short[] { 1, 2, 3 };
+ Test.ShortS ssi = new Test.ShortS(tssi);
+ int[] tisi = new int[] { 5, 6, 7, 8 };
+ Test.IntS isi = new Test.IntS(tisi);
+ long[] tlsi = new long[] { 10, 30, 20 };
+ Test.LongS lsi = new Test.LongS(tlsi);
- AMI_MyClass_opByteSSI cb = new AMI_MyClass_opByteSSI();
- p.opByteSS_async(cb, bsi1, bsi2);
+ Callback cb = new Callback();
+ p.begin_opShortIntLongS(ssi, isi, lsi).whenCompleted(
+ (Test.LongS rso, Test.ShortS sso, Test.IntS iso, Test.LongS lso) =>
+ {
+ cb.opShortIntLongS(rso, sso, iso, lso);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
+ cb.check();
+ }
+
+ {
+ float[] tfsi = new float[] { 3.14f, 1.11f };
+ Test.FloatS fsi = new Test.FloatS(tfsi);
+ double[] tdsi = new double[] { 1.1e10, 1.2e10, 1.3e10 };
+ Test.DoubleS dsi = new Test.DoubleS(tdsi);
+
+ Callback cb = new Callback();
+ p.begin_opFloatDoubleS(fsi, dsi).whenCompleted(cb.opFloatDoubleS, cb.exCB);
+ cb.check();
+ }
+
+ {
+ float[] tfsi = new float[] { 3.14f, 1.11f };
+ Test.FloatS fsi = new Test.FloatS(tfsi);
+ double[] tdsi = new double[] { 1.1e10, 1.2e10, 1.3e10 };
+ Test.DoubleS dsi = new Test.DoubleS(tdsi);
+
+ Callback cb = new Callback();
+ p.begin_opFloatDoubleS(fsi, dsi).whenCompleted(
+ (Test.DoubleS rso, Test.FloatS fso, Test.DoubleS dso) =>
+ {
+ cb.opFloatDoubleS(rso, fso, dso);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
+ cb.check();
+ }
+
+ {
+ string[] tssi1 = new string[] { "abc", "de", "fghi" };
+ Test.StringS ssi1 = new Test.StringS(tssi1);
+ string[] tssi2 = new string[] { "xyz" };
+ Test.StringS ssi2 = new Test.StringS(tssi2);
+
+ Callback cb = new Callback();
+ p.begin_opStringS(ssi1, ssi2).whenCompleted(cb.opStringS, cb.exCB);
+ cb.check();
+ }
+
+ {
+ string[] tssi1 = new string[] { "abc", "de", "fghi" };
+ Test.StringS ssi1 = new Test.StringS(tssi1);
+ string[] tssi2 = new string[] { "xyz" };
+ Test.StringS ssi2 = new Test.StringS(tssi2);
+
+ Callback cb = new Callback();
+ p.begin_opStringS(ssi1, ssi2).whenCompleted(
+ (Test.StringS rso, Test.StringS sso) =>
+ {
+ cb.opStringS(rso, sso);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
+ cb.check();
+ }
+
+ {
+ Test.ByteS s11 = new Test.ByteS(new byte[] { 0x01, 0x11, 0x12 });
+ Test.ByteS s12 = new Test.ByteS(new byte[] { 0xff });
+ Test.ByteSS bsi1 = new Test.ByteSS(new Test.ByteS[] { s11, s12 });
+
+ Test.ByteS s21 = new Test.ByteS(new byte[] { 0x0e });
+ Test.ByteS s22 = new Test.ByteS(new byte[] { 0xf2, 0xf1 });
+ Test.ByteSS bsi2 = new Test.ByteSS(new Test.ByteS[] { s21, s22 });
+
+ Callback cb = new Callback();
+ p.begin_opByteSS(bsi1, bsi2).whenCompleted(cb.opByteSS, cb.exCB);
+ cb.check();
+ }
+
+ {
+ Test.ByteS s11 = new Test.ByteS(new byte[] { 0x01, 0x11, 0x12 });
+ Test.ByteS s12 = new Test.ByteS(new byte[] { 0xff });
+ Test.ByteSS bsi1 = new Test.ByteSS(new Test.ByteS[] { s11, s12 });
+
+ Test.ByteS s21 = new Test.ByteS(new byte[] { 0x0e });
+ Test.ByteS s22 = new Test.ByteS(new byte[] { 0xf2, 0xf1 });
+ Test.ByteSS bsi2 = new Test.ByteSS(new Test.ByteS[] { s21, s22 });
+
+ Callback cb = new Callback();
+ p.begin_opByteSS(bsi1, bsi2).whenCompleted(
+ (Test.ByteSS rso, Test.ByteSS bso) =>
+ {
+ cb.opByteSS(rso, bso);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
cb.check();
}
@@ -1301,8 +1111,30 @@ public class TwowaysAMI
Test.BoolS s21 = new Test.BoolS(new bool[] {false, false, true});
Test.BoolSS bsi2 = new Test.BoolSS(new Test.BoolS[] {s21});
- AMI_MyClass_opBoolSSI cb = new AMI_MyClass_opBoolSSI();
- p.opBoolSS_async(cb, bsi1, bsi2);
+ Callback cb = new Callback();
+ p.begin_opBoolSS(bsi1, bsi2).whenCompleted(cb.opBoolSS, cb.exCB);
+ cb.check();
+ }
+
+ {
+ Test.BoolS s11 = new Test.BoolS(new bool[] {true});
+ Test.BoolS s12 = new Test.BoolS(new bool[] {false});
+ Test.BoolS s13 = new Test.BoolS(new bool[] {true, true});
+ Test.BoolSS bsi1 = new Test.BoolSS(new Test.BoolS[] {s11, s12, s13});
+
+ Test.BoolS s21 = new Test.BoolS(new bool[] {false, false, true});
+ Test.BoolSS bsi2 = new Test.BoolSS(new Test.BoolS[] {s21});
+
+ Callback cb = new Callback();
+ p.begin_opBoolSS(bsi1, bsi2).whenCompleted(
+ (Test.BoolSS rso, Test.BoolSS bso) =>
+ {
+ cb.opBoolSS(rso, bso);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
cb.check();
}
@@ -1319,39 +1151,149 @@ public class TwowaysAMI
Test.LongS l11 = new Test.LongS(new long[] {496, 1729});
Test.LongSS lsi = new Test.LongSS(new Test.LongS[] {l11});
- AMI_MyClass_opShortIntLongSSI cb = new AMI_MyClass_opShortIntLongSSI();
- p.opShortIntLongSS_async(cb, ssi, isi, lsi);
+ Callback cb = new Callback();
+ p.begin_opShortIntLongSS(ssi, isi, lsi).whenCompleted(cb.opShortIntLongSS, cb.exCB);
+ cb.check();
+ }
+
+ {
+ Test.ShortS s11 = new Test.ShortS(new short[] {1, 2, 5});
+ Test.ShortS s12 = new Test.ShortS(new short[] {13});
+ Test.ShortS s13 = new Test.ShortS(new short[] {});
+ Test.ShortSS ssi = new Test.ShortSS(new Test.ShortS[] {s11, s12, s13});
+
+ Test.IntS i11 = new Test.IntS(new int[] {24, 98});
+ Test.IntS i12 = new Test.IntS(new int[] {42});
+ Test.IntSS isi = new Test.IntSS(new Test.IntS[] {i11, i12});
+
+ Test.LongS l11 = new Test.LongS(new long[] {496, 1729});
+ Test.LongSS lsi = new Test.LongSS(new Test.LongS[] {l11});
+
+ Callback cb = new Callback();
+ p.begin_opShortIntLongSS(ssi, isi, lsi).whenCompleted(
+ (Test.LongSS rso, Test.ShortSS sso, Test.IntSS iso, Test.LongSS lso) =>
+ {
+ cb.opShortIntLongSS(rso, sso, iso, lso);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
+ cb.check();
+ }
+
+ {
+ Test.FloatS f11 = new Test.FloatS(new float[] { 3.14f });
+ Test.FloatS f12 = new Test.FloatS(new float[] { 1.11f });
+ Test.FloatS f13 = new Test.FloatS(new float[] { });
+ Test.FloatSS fsi = new Test.FloatSS(new Test.FloatS[] { f11, f12, f13 });
+
+ Test.DoubleS d11 = new Test.DoubleS(new double[] { 1.1e10, 1.2e10, 1.3e10 });
+ Test.DoubleSS dsi = new Test.DoubleSS(new Test.DoubleS[] { d11 });
+
+ Callback cb = new Callback();
+ p.begin_opFloatDoubleSS(fsi, dsi).whenCompleted(cb.opFloatDoubleSS, cb.exCB);
+ cb.check();
}
{
- Test.FloatSS fsi = new Test.FloatSS();
- fsi.Add(new Test.FloatS(new float[] { 3.14f }));
- fsi.Add(new Test.FloatS(new float[] { 1.11f }));
- fsi.Add(new Test.FloatS(new float[] { }));
+ Test.FloatS f11 = new Test.FloatS(new float[] { 3.14f });
+ Test.FloatS f12 = new Test.FloatS(new float[] { 1.11f });
+ Test.FloatS f13 = new Test.FloatS(new float[] { });
+ Test.FloatSS fsi = new Test.FloatSS(new Test.FloatS[] { f11, f12, f13 });
- Test.DoubleSS dsi = new Test.DoubleSS();
- dsi.Add(new Test.DoubleS(new double[] { 1.1E10, 1.2E10, 1.3E10 }));
+ Test.DoubleS d11 = new Test.DoubleS(new double[] { 1.1e10, 1.2e10, 1.3e10 });
+ Test.DoubleSS dsi = new Test.DoubleSS(new Test.DoubleS[] { d11 });
- AMI_MyClass_opFloatDoubleSSI cb = new AMI_MyClass_opFloatDoubleSSI();
- p.opFloatDoubleSS_async(cb, fsi, dsi);
+ Callback cb = new Callback();
+ p.begin_opFloatDoubleSS(fsi, dsi).whenCompleted(
+ (Test.DoubleSS rso, Test.FloatSS fso, Test.DoubleSS dso) =>
+ {
+ cb.opFloatDoubleSS(rso, fso, dso);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
cb.check();
}
{
+ Test.StringS s11 = new Test.StringS();
+ s11.Add("abc");
+ Test.StringS s12 = new Test.StringS();
+ s12.Add("de");
+ s12.Add("fghi");
Test.StringSS ssi1 = new Test.StringSS();
- ssi1.Add(new Test.StringS());
- ssi1.Add(new Test.StringS());
- ssi1[0].Add("abc");
- ssi1[1].Add("de");
- ssi1[1].Add("fghi");
+ ssi1.Add(s11);
+ ssi1.Add(s12);
+
+ Test.StringS s21 = new Test.StringS();
+ Test.StringS s22 = new Test.StringS();
+ Test.StringS s23 = new Test.StringS();
+ s23.Add("xyz");
Test.StringSS ssi2 = new Test.StringSS();
- ssi2.Add(new Test.StringS());
- ssi2.Add(new Test.StringS());
- ssi2.Add(new Test.StringS());
- ssi2[2].Add("xyz");
+ ssi2.Add(s21);
+ ssi2.Add(s22);
+ ssi2.Add(s23);
+
+ Callback cb = new Callback();
+ p.begin_opStringSS(ssi1, ssi2).whenCompleted(cb.opStringSS, cb.exCB);
+ cb.check();
+ }
+
+ {
+ Test.StringS s11 = new Test.StringS();
+ s11.Add("abc");
+ Test.StringS s12 = new Test.StringS();
+ s12.Add("de");
+ s12.Add("fghi");
+ Test.StringSS ssi1 = new Test.StringSS();
+ ssi1.Add(s11);
+ ssi1.Add(s12);
+
+ Test.StringS s21 = new Test.StringS();
+ Test.StringS s22 = new Test.StringS();
+ Test.StringS s23 = new Test.StringS();
+ s23.Add("xyz");
+ Test.StringSS ssi2 = new Test.StringSS();
+ ssi2.Add(s21);
+ ssi2.Add(s22);
+ ssi2.Add(s23);
+
+ Callback cb = new Callback();
+ p.begin_opStringSS(ssi1, ssi2).whenCompleted(
+ (Test.StringSS rso, Test.StringSS sso) =>
+ {
+ cb.opStringSS(rso, sso);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
+ cb.check();
+ }
+
+ {
+ Test.StringSS[] sssi1 = { new Test.StringSS(), new Test.StringSS() };
+ sssi1[0].Add(new Test.StringS());
+ sssi1[0].Add(new Test.StringS());
+ sssi1[0][0].Add("abc");
+ sssi1[0][0].Add("de");
+ sssi1[0][1].Add("xyz");
+ sssi1[1].Add(new Test.StringS());
+ sssi1[1][0].Add("hello");
+ Test.StringSS[] sssi2 = { new Test.StringSS(), new Test.StringSS(), new Test.StringSS() };
+ sssi2[0].Add(new Test.StringS());
+ sssi2[0].Add(new Test.StringS());
+ sssi2[0][0].Add("");
+ sssi2[0][0].Add("");
+ sssi2[0][1].Add("abcd");
+ sssi2[1].Add(new Test.StringS());
+ sssi2[1][0].Add("");
- AMI_MyClass_opStringSSI cb = new AMI_MyClass_opStringSSI();
- p.opStringSS_async(cb, ssi1, ssi2);
+ Callback cb = new Callback();
+ p.begin_opStringSSS(sssi1, sssi2).whenCompleted(cb.opStringSSS, cb.exCB);
cb.check();
}
@@ -1373,8 +1315,16 @@ public class TwowaysAMI
sssi2[1].Add(new Test.StringS());
sssi2[1][0].Add("");
- AMI_MyClass_opStringSSSI cb = new AMI_MyClass_opStringSSSI();
- p.opStringSSS_async(cb, sssi1, sssi2);
+ Callback cb = new Callback();
+ p.begin_opStringSSS(sssi1, sssi2).whenCompleted(
+ (Test.StringSS[] rsso, Test.StringSS[] ssso) =>
+ {
+ cb.opStringSSS(rsso, ssso);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
cb.check();
}
@@ -1383,12 +1333,34 @@ public class TwowaysAMI
di1[10] = true;
di1[100] = false;
Dictionary<byte, bool> di2 = new Dictionary<byte, bool>();
- // di2[10] = true; // Disabled since new dictionary mapping.
+ di2[10] = true;
di2[11] = false;
di2[101] = true;
- AMI_MyClass_opByteBoolDI cb = new AMI_MyClass_opByteBoolDI();
- p.opByteBoolD_async(cb, di1, di2);
+ Callback cb = new Callback();
+ p.begin_opByteBoolD(di1, di2).whenCompleted(cb.opByteBoolD, cb.exCB);
+ cb.check();
+ }
+
+ {
+ Dictionary<byte, bool> di1 = new Dictionary<byte, bool>();
+ di1[10] = true;
+ di1[100] = false;
+ Dictionary<byte, bool> di2 = new Dictionary<byte, bool>();
+ di2[10] = true;
+ di2[11] = false;
+ di2[101] = true;
+
+ Callback cb = new Callback();
+ p.begin_opByteBoolD(di1, di2).whenCompleted(
+ (Dictionary<byte, bool> ro, Dictionary<byte, bool> _do) =>
+ {
+ cb.opByteBoolD(ro, _do);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
cb.check();
}
@@ -1397,12 +1369,48 @@ public class TwowaysAMI
di1[110] = -1;
di1[1100] = 123123;
Dictionary<short, int> di2 = new Dictionary<short, int>();
- // di2[110] = -1; // Disabled since new dictionary mapping.
+ di2[110] = -1;
di2[111] = -100;
di2[1101] = 0;
- AMI_MyClass_opShortIntDI cb = new AMI_MyClass_opShortIntDI();
- p.opShortIntD_async(cb, di1, di2);
+ Callback cb = new Callback();
+ p.begin_opShortIntD(di1, di2).whenCompleted(cb.opShortIntD, cb.exCB);
+ cb.check();
+ }
+
+ {
+ Dictionary<short, int> di1 = new Dictionary<short, int>();
+ di1[110] = -1;
+ di1[1100] = 123123;
+ Dictionary<short, int> di2 = new Dictionary<short, int>();
+ di2[110] = -1;
+ di2[111] = -100;
+ di2[1101] = 0;
+
+ Callback cb = new Callback();
+ p.begin_opShortIntD(di1, di2).whenCompleted(
+ (Dictionary<short, int> ro, Dictionary<short, int> _do) =>
+ {
+ cb.opShortIntD(ro, _do);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
+ cb.check();
+ }
+
+ {
+ Dictionary<long, float> di1 = new Dictionary<long, float>();
+ di1[999999110L] = -1.1f;
+ di1[999999111L] = 123123.2f;
+ Dictionary<long, float> di2 = new Dictionary<long, float>();
+ di2[999999110L] = -1.1f;
+ di2[999999120L] = -100.4f;
+ di2[999999130L] = 0.5f;
+
+ Callback cb = new Callback();
+ p.begin_opLongFloatD(di1, di2).whenCompleted(cb.opLongFloatD, cb.exCB);
cb.check();
}
@@ -1411,12 +1419,34 @@ public class TwowaysAMI
di1[999999110L] = -1.1f;
di1[999999111L] = 123123.2f;
Dictionary<long, float> di2 = new Dictionary<long, float>();
- // di2[999999110L] = -1.1f; // Disabled since new dictionary mapping.
+ di2[999999110L] = -1.1f;
di2[999999120L] = -100.4f;
di2[999999130L] = 0.5f;
- AMI_MyClass_opLongFloatDI cb = new AMI_MyClass_opLongFloatDI();
- p.opLongFloatD_async(cb, di1, di2);
+ Callback cb = new Callback();
+ p.begin_opLongFloatD(di1, di2).whenCompleted(
+ (Dictionary<long, float> ro, Dictionary<long, float> _do) =>
+ {
+ cb.opLongFloatD(ro, _do);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
+ cb.check();
+ }
+
+ {
+ Dictionary<string, string> di1 = new Dictionary<string, string>();
+ di1["foo"] = "abc -1.1";
+ di1["bar"] = "abc 123123.2";
+ Dictionary<string, string> di2 = new Dictionary<string, string>();
+ di2["foo"] = "abc -1.1";
+ di2["FOO"] = "abc -100.4";
+ di2["BAR"] = "abc 0.5";
+
+ Callback cb = new Callback();
+ p.begin_opStringStringD(di1, di2).whenCompleted(cb.opStringStringD, cb.exCB);
cb.check();
}
@@ -1425,12 +1455,20 @@ public class TwowaysAMI
di1["foo"] = "abc -1.1";
di1["bar"] = "abc 123123.2";
Dictionary<string, string> di2 = new Dictionary<string, string>();
- // di2["foo"] = "abc -1.1"; // Disabled since new dictionary mapping
+ di2["foo"] = "abc -1.1";
di2["FOO"] = "abc -100.4";
di2["BAR"] = "abc 0.5";
- AMI_MyClass_opStringStringDI cb = new AMI_MyClass_opStringStringDI();
- p.opStringStringD_async(cb, di1, di2);
+ Callback cb = new Callback();
+ p.begin_opStringStringD(di1, di2).whenCompleted(
+ (Dictionary<string, string> ro, Dictionary<string, string> _do) =>
+ {
+ cb.opStringStringD(ro, _do);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
cb.check();
}
@@ -1439,12 +1477,34 @@ public class TwowaysAMI
di1["abc"] = Test.MyEnum.enum1;
di1[""] = Test.MyEnum.enum2;
Dictionary<string, Test.MyEnum> di2 = new Dictionary<string, Test.MyEnum>();
- // di2["abc"] = Test.MyEnum.enum1; // Disabled since new dictionary mapping
+ di2["abc"] = Test.MyEnum.enum1;
di2["qwerty"] = Test.MyEnum.enum3;
di2["Hello!!"] = Test.MyEnum.enum2;
- AMI_MyClass_opStringMyEnumDI cb = new AMI_MyClass_opStringMyEnumDI();
- p.opStringMyEnumD_async(cb, di1, di2);
+ Callback cb = new Callback();
+ p.begin_opStringMyEnumD(di1, di2).whenCompleted(cb.opStringMyEnumD, cb.exCB);
+ cb.check();
+ }
+
+ {
+ Dictionary<string, Test.MyEnum> di1 = new Dictionary<string, Test.MyEnum>();
+ di1["abc"] = Test.MyEnum.enum1;
+ di1[""] = Test.MyEnum.enum2;
+ Dictionary<string, Test.MyEnum> di2 = new Dictionary<string, Test.MyEnum>();
+ di2["abc"] = Test.MyEnum.enum1;
+ di2["qwerty"] = Test.MyEnum.enum3;
+ di2["Hello!!"] = Test.MyEnum.enum2;
+
+ Callback cb = new Callback();
+ p.begin_opStringMyEnumD(di1, di2).whenCompleted(
+ (Dictionary<string, Test.MyEnum> ro, Dictionary<string, Test.MyEnum> _do) =>
+ {
+ cb.opStringMyEnumD(ro, _do);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
cb.check();
}
@@ -1455,8 +1515,47 @@ public class TwowaysAMI
di2[Test.MyEnum.enum2] = "Hello!!";
di2[Test.MyEnum.enum3] = "qwerty";
- AMI_MyClass_opMyEnumStringDI cb = new AMI_MyClass_opMyEnumStringDI();
- p.opMyEnumStringD_async(cb, di1, di2);
+ Callback cb = new Callback();
+ p.begin_opMyEnumStringD(di1, di2).whenCompleted(cb.opMyEnumStringD, cb.exCB);
+ cb.check();
+ }
+
+ {
+ Dictionary<Test.MyEnum, string> di1 = new Dictionary<Test.MyEnum, string>();
+ di1[Test.MyEnum.enum1] = "abc";
+ Dictionary<Test.MyEnum, string> di2 = new Dictionary<Test.MyEnum, string>();
+ di2[Test.MyEnum.enum2] = "Hello!!";
+ di2[Test.MyEnum.enum3] = "qwerty";
+
+ Callback cb = new Callback();
+ p.begin_opMyEnumStringD(di1, di2).whenCompleted(
+ (Dictionary<Test.MyEnum, string> ro, Dictionary<Test.MyEnum, string> _do) =>
+ {
+ cb.opMyEnumStringD(ro, _do);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
+ cb.check();
+ }
+
+ {
+ Test.MyStruct s11 = new Test.MyStruct(1, 1);
+ Test.MyStruct s12 = new Test.MyStruct(1, 2);
+ Dictionary<Test.MyStruct, Test.MyEnum> di1 = new Dictionary<Test.MyStruct, Test.MyEnum>();
+ di1[s11] = Test.MyEnum.enum1;
+ di1[s12] = Test.MyEnum.enum2;
+
+ Test.MyStruct s22 = new Test.MyStruct(2, 2);
+ Test.MyStruct s23 = new Test.MyStruct(2, 3);
+ Dictionary<Test.MyStruct, Test.MyEnum> di2 = new Dictionary<Test.MyStruct, Test.MyEnum>();
+ di2[s11] = Test.MyEnum.enum1;
+ di2[s22] = Test.MyEnum.enum3;
+ di2[s23] = Test.MyEnum.enum2;
+
+ Callback cb = new Callback();
+ p.begin_opMyStructMyEnumD(di1, di2).whenCompleted(cb.opMyStructMyEnumD, cb.exCB);
cb.check();
}
@@ -1466,19 +1565,30 @@ public class TwowaysAMI
Dictionary<Test.MyStruct, Test.MyEnum> di1 = new Dictionary<Test.MyStruct, Test.MyEnum>();
di1[s11] = Test.MyEnum.enum1;
di1[s12] = Test.MyEnum.enum2;
+
Test.MyStruct s22 = new Test.MyStruct(2, 2);
Test.MyStruct s23 = new Test.MyStruct(2, 3);
Dictionary<Test.MyStruct, Test.MyEnum> di2 = new Dictionary<Test.MyStruct, Test.MyEnum>();
+ di2[s11] = Test.MyEnum.enum1;
di2[s22] = Test.MyEnum.enum3;
di2[s23] = Test.MyEnum.enum2;
- AMI_MyClass_opMyStructMyEnumDI cb = new AMI_MyClass_opMyStructMyEnumDI();
- p.opMyStructMyEnumD_async(cb, di1, di2);
+ Callback cb = new Callback();
+ p.begin_opMyStructMyEnumD(di1, di2).whenCompleted(
+ (Dictionary<Test.MyStruct, Test.MyEnum> ro,
+ Dictionary<Test.MyStruct, Test.MyEnum> _do) =>
+ {
+ cb.opMyStructMyEnumD(ro, _do);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
cb.check();
}
{
- int[] lengths = new int[] {0, 1, 2, 126, 127, 128, 129, 253, 254, 255, 256, 257, 1000};
+ int[] lengths = new int[] { 0, 1, 2, 126, 127, 128, 129, 253, 254, 255, 256, 257, 1000 };
for(int l = 0; l < lengths.Length; ++l)
{
@@ -1487,8 +1597,34 @@ public class TwowaysAMI
{
s.Add(i);
}
- AMI_MyClass_opIntSI cb = new AMI_MyClass_opIntSI(lengths[l]);
- p.opIntS_async(cb, s);
+
+ Callback cb = new Callback(lengths[l]);
+ p.begin_opIntS(s).whenCompleted(cb.opIntS, cb.exCB);
+ cb.check();
+ }
+ }
+
+ {
+ int[] lengths = new int[] { 0, 1, 2, 126, 127, 128, 129, 253, 254, 255, 256, 257, 1000 };
+
+ for(int l = 0; l < lengths.Length; ++l)
+ {
+ Test.IntS s = new Test.IntS();
+ for(int i = 0; i < lengths[l]; ++i)
+ {
+ s.Add(i);
+ }
+
+ Callback cb = new Callback(lengths[l]);
+ p.begin_opIntS(s).whenCompleted(
+ (Test.IntS r) =>
+ {
+ cb.opIntS(r);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
cb.check();
}
}
@@ -1500,26 +1636,91 @@ public class TwowaysAMI
ctx["three"] = "THREE";
{
test(p.ice_getContext().Count == 0);
- AMI_MyClass_opContextNotEqualI cb = new AMI_MyClass_opContextNotEqualI(ctx);
- p.opContext_async(cb);
+ Callback cb = new Callback(ctx);
+ p.begin_opContext().whenCompleted(cb.opContextNotEqual, cb.exCB);
cb.check();
}
{
test(p.ice_getContext().Count == 0);
- AMI_MyClass_opContextEqualI cb = new AMI_MyClass_opContextEqualI(ctx);
- p.opContext_async(cb, ctx);
+ Callback cb = new Callback(ctx);
+ p.begin_opContext(ctx).whenCompleted(cb.opContextEqual, cb.exCB);
cb.check();
}
- Test.MyClassPrx p2 = Test.MyClassPrxHelper.checkedCast(p.ice_context(ctx));
- test(Ice.CollectionComparer.Equals(p2.ice_getContext(), ctx));
{
- AMI_MyClass_opContextEqualI cb = new AMI_MyClass_opContextEqualI(ctx);
- p2.opContext_async(cb);
+ Test.MyClassPrx p2 = Test.MyClassPrxHelper.checkedCast(p.ice_context(ctx));
+ test(Ice.CollectionComparer.Equals(p2.ice_getContext(), ctx));
+ Callback cb = new Callback(ctx);
+ p2.begin_opContext().whenCompleted(cb.opContextEqual, cb.exCB);
cb.check();
}
{
- AMI_MyClass_opContextEqualI cb = new AMI_MyClass_opContextEqualI(ctx);
- p2.opContext_async(cb, ctx);
+ Test.MyClassPrx p2 = Test.MyClassPrxHelper.checkedCast(p.ice_context(ctx));
+ Callback cb = new Callback(ctx);
+ p2.begin_opContext(ctx).whenCompleted(cb.opContextEqual, cb.exCB);
+ cb.check();
+ }
+ }
+
+ {
+ Dictionary<string, string> ctx = new Dictionary<string, string>();
+ ctx["one"] = "ONE";
+ ctx["two"] = "TWO";
+ ctx["three"] = "THREE";
+ {
+ test(p.ice_getContext().Count == 0);
+ Callback cb = new Callback(ctx);
+ p.begin_opContext().whenCompleted(
+ (Dictionary<string, string> r) =>
+ {
+ cb.opContextNotEqual(r);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
+ cb.check();
+ }
+ {
+ test(p.ice_getContext().Count == 0);
+ Callback cb = new Callback(ctx);
+ p.begin_opContext(ctx).whenCompleted(
+ (Dictionary<string, string> r) =>
+ {
+ cb.opContextEqual(r);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
+ cb.check();
+ }
+ {
+ Test.MyClassPrx p2 = Test.MyClassPrxHelper.checkedCast(p.ice_context(ctx));
+ test(Ice.CollectionComparer.Equals(p2.ice_getContext(), ctx));
+ Callback cb = new Callback(ctx);
+ p2.begin_opContext().whenCompleted(
+ (Dictionary<string, string> r) =>
+ {
+ cb.opContextEqual(r);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
+ cb.check();
+ }
+ {
+ Test.MyClassPrx p2 = Test.MyClassPrxHelper.checkedCast(p.ice_context(ctx));
+ Callback cb = new Callback(ctx);
+ p2.begin_opContext(ctx).whenCompleted(
+ (Dictionary<string, string> r) =>
+ {
+ cb.opContextEqual(r);
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
cb.check();
}
}
@@ -1544,30 +1745,30 @@ public class TwowaysAMI
ctx["three"] = "THREE";
Test.MyClassPrx p3 = Test.MyClassPrxHelper.uncheckedCast(
- ic.stringToProxy("test:default -p 12010"));
+ ic.stringToProxy("test:default -p 12010"));
ic.getImplicitContext().setContext(ctx);
test(Ice.CollectionComparer.Equals(ic.getImplicitContext().getContext(), ctx));
{
- AMI_MyClass_opContextEqualI cb = new AMI_MyClass_opContextEqualI(ctx);
- p3.opContext_async(cb);
- cb.check();
+ Ice.AsyncResult r = p3.begin_opContext();
+ Dictionary<string, string> c = p3.end_opContext(r);
+ test(Ice.CollectionComparer.Equals(c, 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();
+ Dictionary<string, string> c = p3.end_opContext(r);
+ test(Ice.CollectionComparer.Equals(c, ctx));
}
Dictionary<string, string> prxContext = new Dictionary<string, string>();
prxContext["one"] = "UN";
prxContext["four"] = "QUATRE";
- Dictionary<string, string> combined = new Dictionary<string, string>(prxContext);
+ Dictionary<string, string> combined = prxContext;
foreach(KeyValuePair<string, string> e in ctx)
{
try
@@ -1581,44 +1782,98 @@ public class TwowaysAMI
}
test(combined["one"].Equals("UN"));
- p3 = Test.MyClassPrxHelper.uncheckedCast(p3.ice_context(prxContext));
+ p3 = Test.MyClassPrxHelper.uncheckedCast(p.ice_context(prxContext));
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();
+ Dictionary<string, string> c = p3.end_opContext(r);
+ test(Ice.CollectionComparer.Equals(c, 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();
+ Dictionary<string, string> c = p3.end_opContext(r);
+ test(Ice.CollectionComparer.Equals(c, combined));
}
- ic.getImplicitContext().setContext(null);
+ //ic.getImplicitContext().setContext(null);
ic.destroy();
}
}
{
- AMI_MyClass_opIdempotentI cb = new AMI_MyClass_opIdempotentI();
- p.opIdempotent_async(cb);
+ Ice.AsyncResult r = p.begin_opIdempotent();
+ p.end_opIdempotent(r);
+ }
+
+ {
+ Callback cb = new Callback();
+ p.begin_opIdempotent().whenCompleted(cb.opIdempotent, cb.exCB);
cb.check();
}
{
- AMI_MyClass_opNonmutatingI cb = new AMI_MyClass_opNonmutatingI();
- p.opNonmutating_async(cb);
+ Callback cb = new Callback();
+ p.begin_opIdempotent().whenCompleted(
+ () =>
+ {
+ cb.opIdempotent();
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
+ cb.check();
+ }
+
+ {
+ Ice.AsyncResult r = p.begin_opNonmutating();
+ p.end_opNonmutating(r);
+ }
+
+ {
+ Callback cb = new Callback();
+ p.begin_opNonmutating().whenCompleted(cb.opNonmutating, cb.exCB);
+ cb.check();
+ }
+
+ {
+ Callback cb = new Callback();
+ p.begin_opNonmutating().whenCompleted(
+ () =>
+ {
+ cb.opNonmutating();
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
cb.check();
}
{
Test.MyDerivedClassPrx derived = Test.MyDerivedClassPrxHelper.checkedCast(p);
test(derived != null);
- AMI_MyDerivedClass_opDerivedI cb = new AMI_MyDerivedClass_opDerivedI();
- derived.opDerived_async(cb);
+ Callback cb = new Callback();
+ derived.begin_opDerived().whenCompleted(cb.opDerived, cb.exCB);
+ cb.check();
+ }
+
+ {
+ Test.MyDerivedClassPrx derived = Test.MyDerivedClassPrxHelper.checkedCast(p);
+ test(derived != null);
+ Callback cb = new Callback();
+ derived.begin_opDerived().whenCompleted(
+ () =>
+ {
+ cb.opDerived();
+ },
+ (Ice.Exception ex) =>
+ {
+ cb.exCB(ex);
+ });
cb.check();
}
}
diff --git a/cs/test/Ice/operations/TwowaysNewAMI.cs b/cs/test/Ice/operations/TwowaysNewAMI.cs
deleted file mode 100644
index ac06f5f199e..00000000000
--- a/cs/test/Ice/operations/TwowaysNewAMI.cs
+++ /dev/null
@@ -1,1880 +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.
-//
-// **********************************************************************
-
-using System;
-using System.Diagnostics;
-using System.Threading;
-using System.Collections.Generic;
-
-public class TwowaysNewAMI
-{
- private static void test(bool b)
- {
- if(!b)
- {
- throw new System.SystemException();
- }
- }
-
- private class CallbackBase
- {
- internal CallbackBase()
- {
- _called = false;
- }
-
- public virtual void check()
- {
- lock(this)
- {
- while(!_called)
- {
- System.Threading.Monitor.Wait(this);
- }
- _called = false;
- }
- }
-
- public virtual void called()
- {
- lock(this)
- {
- Debug.Assert(!_called);
- _called = true;
- System.Threading.Monitor.Pulse(this);
- }
- }
-
- private bool _called;
- }
-
- private class Callback : CallbackBase
- {
- public Callback()
- {
- }
-
- public Callback(Ice.Communicator c)
- {
- _communicator = c;
- }
-
- public Callback(int l)
- {
- _l = l;
- }
-
- public Callback(Dictionary<string, string> d)
- {
- _d = d;
- }
-
- public void ice_ping()
- {
- called();
- }
-
- public void ice_isA(bool r)
- {
- test(r);
- called();
- }
-
- public void ice_ids(string[] ids)
- {
- test(ids.Length == 3);
- called();
- }
-
- public void ice_id(string id)
- {
- test(id.Equals(Test.MyDerivedClass.ice_staticId()));
- called();
- }
-
- public void opVoid()
- {
- called();
- }
-
- public void opContext()
- {
- called();
- }
-
- public void opByte(byte r, byte b)
- {
- test(b == 0xf0);
- test(r == 0xff);
- called();
- }
-
- public void opBool(bool r, bool b)
- {
- test(b);
- test(!r);
- called();
- }
-
- public void opShortIntLong(long r, short s, int i, long l)
- {
- test(s == 10);
- test(i == 11);
- test(l == 12);
- test(r == 12);
- called();
- }
-
- public void opFloatDouble(double r, float f, double d)
- {
- test(f == 3.14f);
- test(d == 1.1e10);
- test(r == 1.1e10);
- called();
- }
-
- public void opString(string r, string s)
- {
- test(s.Equals("world hello"));
- test(r.Equals("hello world"));
- called();
- }
-
- public void opMyEnum(Test.MyEnum r, Test.MyEnum e)
- {
- test(e == Test.MyEnum.enum2);
- test(r == Test.MyEnum.enum3);
- called();
- }
-
- public void opMyClass(Test.MyClassPrx r, Test.MyClassPrx c1, Test.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)
- {
- }
- }
- called();
- }
-
- public void opStruct(Test.Structure rso, Test.Structure so)
- {
- test(rso.p == null);
- test(rso.e == Test.MyEnum.enum2);
- test(rso.s.s.Equals("def"));
- test(so.e == Test.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();
- }
- called();
- }
-
- public void opByteS(Test.ByteS rso, Test.ByteS bso)
- {
- test(bso.Count == 4);
- test(bso[0] == 0x22);
- test(bso[1] == 0x12);
- test(bso[2] == 0x11);
- test(bso[3] == 0x01);
- test(rso.Count == 8);
- test(rso[0] == 0x01);
- test(rso[1] == 0x11);
- test(rso[2] == 0x12);
- test(rso[3] == 0x22);
- test(rso[4] == 0xf1);
- test(rso[5] == 0xf2);
- test(rso[6] == 0xf3);
- test(rso[7] == 0xf4);
- called();
- }
-
- public void opBoolS(Test.BoolS rso, Test.BoolS bso)
- {
- test(bso.Count == 4);
- test(bso[0]);
- test(bso[1]);
- test(!bso[2]);
- test(!bso[3]);
- test(rso.Count == 3);
- test(!rso[0]);
- test(rso[1]);
- test(rso[2]);
- called();
- }
-
- public void opShortIntLongS(Test.LongS rso, Test.ShortS sso, Test.IntS iso, Test.LongS lso)
- {
- test(sso.Count == 3);
- test(sso[0] == 1);
- test(sso[1] == 2);
- test(sso[2] == 3);
- test(iso.Count == 4);
- test(iso[0] == 8);
- test(iso[1] == 7);
- test(iso[2] == 6);
- test(iso[3] == 5);
- test(lso.Count == 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.Count == 3);
- test(rso[0] == 10);
- test(rso[1] == 30);
- test(rso[2] == 20);
- called();
- }
-
- public void opFloatDoubleS(Test.DoubleS rso, Test.FloatS fso, Test.DoubleS dso)
- {
- test(fso.Count == 2);
- test(fso[0] == 3.14f);
- test(fso[1] == 1.11f);
- test(dso.Count == 3);
- test(dso[0] == 1.3e10);
- test(dso[1] == 1.2e10);
- test(dso[2] == 1.1e10);
- test(rso.Count == 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);
- called();
- }
-
- public void opStringS(Test.StringS rso, Test.StringS sso)
- {
- test(sso.Count == 4);
- test(sso[0].Equals("abc"));
- test(sso[1].Equals("de"));
- test(sso[2].Equals("fghi"));
- test(sso[3].Equals("xyz"));
- test(rso.Count == 3);
- test(rso[0].Equals("fghi"));
- test(rso[1].Equals("de"));
- test(rso[2].Equals("abc"));
- called();
- }
-
- public void opByteSS(Test.ByteSS rso, Test.ByteSS bso)
- {
- test(bso.Count == 2);
- test(bso[0].Count == 1);
- test(bso[0][0] == 0xff);
- test(bso[1].Count == 3);
- test(bso[1][0] == 0x01);
- test(bso[1][1] == 0x11);
- test(bso[1][2] == 0x12);
- test(rso.Count == 4);
- test(rso[0].Count == 3);
- test(rso[0][0] == 0x01);
- test(rso[0][1] == 0x11);
- test(rso[0][2] == 0x12);
- test(rso[1].Count == 1);
- test(rso[1][0] == 0xff);
- test(rso[2].Count == 1);
- test(rso[2][0] == 0x0e);
- test(rso[3].Count == 2);
- test(rso[3][0] == 0xf2);
- test(rso[3][1] == 0xf1);
- called();
- }
-
- public void opBoolSS(Test.BoolSS rso, Test.BoolSS bso)
- {
- test(bso.Count == 4);
- test(bso[0].Count == 1);
- test(bso[0][0]);
- test(bso[1].Count == 1);
- test(!bso[1][0]);
- test(bso[2].Count == 2);
- test(bso[2][0]);
- test(bso[2][1]);
- test(bso[3].Count == 3);
- test(!bso[3][0]);
- test(!bso[3][1]);
- test(bso[3][2]);
- test(rso.Count == 3);
- test(rso[0].Count == 2);
- test(rso[0][0]);
- test(rso[0][1]);
- test(rso[1].Count == 1);
- test(!rso[1][0]);
- test(rso[2].Count == 1);
- test(rso[2][0]);
- called();
- }
-
- public void opShortIntLongSS(Test.LongSS rso, Test.ShortSS sso, Test.IntSS iso, Test.LongSS lso)
- {
- test(rso.Count == 1);
- test(rso[0].Count == 2);
- test(rso[0][0] == 496);
- test(rso[0][1] == 1729);
- test(sso.Count == 3);
- test(sso[0].Count == 3);
- test(sso[0][0] == 1);
- test(sso[0][1] == 2);
- test(sso[0][2] == 5);
- test(sso[1].Count == 1);
- test(sso[1][0] == 13);
- test(sso[2].Count == 0);
- test(iso.Count == 2);
- test(iso[0].Count == 1);
- test(iso[0][0] == 42);
- test(iso[1].Count == 2);
- test(iso[1][0] == 24);
- test(iso[1][1] == 98);
- test(lso.Count == 2);
- test(lso[0].Count == 2);
- test(lso[0][0] == 496);
- test(lso[0][1] == 1729);
- test(lso[1].Count == 2);
- test(lso[1][0] == 496);
- test(lso[1][1] == 1729);
- called();
- }
-
- public void opFloatDoubleSS(Test.DoubleSS rso, Test.FloatSS fso, Test.DoubleSS dso)
- {
- test(fso.Count == 3);
- test(fso[0].Count == 1);
- test(fso[0][0] == 3.14f);
- test(fso[1].Count == 1);
- test(fso[1][0] == 1.11f);
- test(fso[2].Count == 0);
- test(dso.Count == 1);
- test(dso[0].Count == 3);
- test(dso[0][0] == 1.1e10);
- test(dso[0][1] == 1.2e10);
- test(dso[0][2] == 1.3e10);
- test(rso.Count == 2);
- test(rso[0].Count == 3);
- test(rso[0][0] == 1.1e10);
- test(rso[0][1] == 1.2e10);
- test(rso[0][2] == 1.3e10);
- test(rso[1].Count == 3);
- test(rso[1][0] == 1.1e10);
- test(rso[1][1] == 1.2e10);
- test(rso[1][2] == 1.3e10);
- called();
- }
-
- public void opStringSS(Test.StringSS rso, Test.StringSS sso)
- {
- test(sso.Count == 5);
- test(sso[0].Count == 1);
- test(sso[0][0].Equals("abc"));
- test(sso[1].Count == 2);
- test(sso[1][0].Equals("de"));
- test(sso[1][1].Equals("fghi"));
- test(sso[2].Count == 0);
- test(sso[3].Count == 0);
- test(sso[4].Count == 1);
- test(sso[4][0].Equals("xyz"));
- test(rso.Count == 3);
- test(rso[0].Count == 1);
- test(rso[0][0].Equals("xyz"));
- test(rso[1].Count == 0);
- test(rso[2].Count == 0);
- called();
- }
-
- public void opStringSSS(Test.StringSS[] rsso, Test.StringSS[] ssso)
- {
- test(ssso.Length == 5);
- test(ssso[0].Count == 2);
- test(ssso[0][0].Count == 2);
- test(ssso[0][1].Count == 1);
- test(ssso[1].Count == 1);
- test(ssso[1][0].Count == 1);
- test(ssso[2].Count == 2);
- test(ssso[2][0].Count == 2);
- test(ssso[2][1].Count == 1);
- test(ssso[3].Count == 1);
- test(ssso[3][0].Count == 1);
- test(ssso[4].Count == 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].Count == 0);
- test(rsso[1].Count == 1);
- test(rsso[1][0].Count == 1);
- test(rsso[2].Count == 2);
- test(rsso[2][0].Count == 2);
- test(rsso[2][1].Count == 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"));
- called();
- }
-
- public void opByteBoolD(Dictionary<byte, bool> ro, Dictionary<byte, bool> _do)
- {
- Dictionary<byte, bool> di1 = new Dictionary<byte, bool>();
- di1[10] = true;
- di1[100] = false;
- test(Ice.CollectionComparer.Equals(_do, di1));
- test(ro.Count == 4);
- // test(ro[10] == true); // Disabled since new dictionary mapping.
- test(ro[11] == false);
- test(ro[100] == false);
- test(ro[101] == true);
- called();
- }
-
- public void opShortIntD(Dictionary<short, int> ro, Dictionary<short, int> _do)
- {
- Dictionary<short, int> di1 = new Dictionary<short, int>();
- di1[110] = -1;
- di1[1100] = 123123;
- test(Ice.CollectionComparer.Equals(_do, di1));
- test(ro.Count == 4);
- // test(ro[110] == -1); // Disabled since new dictionary mapping.
- test(ro[111] == -100);
- test(ro[1100] == 123123);
- test(ro[1101] == 0);
- called();
- }
-
- public void opLongFloatD(Dictionary<long, float> ro, Dictionary<long, float> _do)
- {
- Dictionary<long, float> di1 = new Dictionary<long, float>();
- di1[999999110L] = -1.1f;
- di1[999999111L] = 123123.2f;
- test(Ice.CollectionComparer.Equals(_do, di1));
- test(ro.Count == 4);
- test(ro[999999110L] == -1.1f);
- test(ro[999999120L] == -100.4f);
- test(ro[999999111L] == 123123.2f);
- test(ro[999999130L] == 0.5f);
- called();
- }
-
- public void opStringStringD(Dictionary<string, string> ro, Dictionary<string, string> _do)
- {
- Dictionary<string, string> di1 = new Dictionary<string, string>();
- di1["foo"] = "abc -1.1";
- di1["bar"] = "abc 123123.2";
- test(Ice.CollectionComparer.Equals(_do, di1));
- test(ro.Count == 4);
- test(ro["foo"].Equals("abc -1.1"));
- test(ro["FOO"].Equals("abc -100.4"));
- test(ro["bar"].Equals("abc 123123.2"));
- test(ro["BAR"].Equals("abc 0.5"));
- called();
- }
-
- public void opStringMyEnumD(Dictionary<string, Test.MyEnum> ro, Dictionary<string, Test.MyEnum> _do)
- {
- Dictionary<string, Test.MyEnum> di1 = new Dictionary<string, Test.MyEnum>();
- di1["abc"] = Test.MyEnum.enum1;
- di1[""] = Test.MyEnum.enum2;
- test(Ice.CollectionComparer.Equals(_do, di1));
- test(ro.Count == 4);
- test(ro["abc"] == Test.MyEnum.enum1);
- test(ro["qwerty"] == Test.MyEnum.enum3);
- test(ro[""] == Test.MyEnum.enum2);
- test(ro["Hello!!"] == Test.MyEnum.enum2);
- called();
- }
-
- public void opMyEnumStringD(Dictionary<Test.MyEnum, string> ro, Dictionary<Test.MyEnum, string> _do)
- {
- Dictionary<Test.MyEnum, string> di1 = new Dictionary<Test.MyEnum, string>();
- di1[Test.MyEnum.enum1] = "abc";
- test(Ice.CollectionComparer.Equals(_do, di1));
- test(ro.Count == 3);
- test(ro[Test.MyEnum.enum1].Equals("abc"));
- test(ro[Test.MyEnum.enum2].Equals("Hello!!"));
- test(ro[Test.MyEnum.enum3].Equals("qwerty"));
- called();
- }
-
- public void opMyStructMyEnumD(Dictionary<Test.MyStruct, Test.MyEnum> ro,
- Dictionary<Test.MyStruct, Test.MyEnum> _do)
- {
- Test.MyStruct s11 = new Test.MyStruct(1, 1);
- Test.MyStruct s12 = new Test.MyStruct(1, 2);
- Dictionary<Test.MyStruct, Test.MyEnum> di1 = new Dictionary<Test.MyStruct, Test.MyEnum>();
- di1[s11] = Test.MyEnum.enum1;
- di1[s12] = Test.MyEnum.enum2;
- test(Ice.CollectionComparer.Equals(_do, di1));
- Test.MyStruct s22 = new Test.MyStruct(2, 2);
- Test.MyStruct s23 = new Test.MyStruct(2, 3);
- test(ro.Count == 4);
- test(ro[s11] == Test.MyEnum.enum1);
- test(ro[s12] == Test.MyEnum.enum2);
- test(ro[s22] == Test.MyEnum.enum3);
- test(ro[s23] == Test.MyEnum.enum2);
- called();
- }
-
- public void opIntS(Test.IntS r)
- {
- test(r.Count == _l);
- for(int j = 0; j < r.Count; ++j)
- {
- test(r[j] == -j);
- }
- called();
- }
-
- public void opContextNotEqual(Dictionary<string, string> r)
- {
- test(!Ice.CollectionComparer.Equals(r, _d));
- called();
- }
-
- public void opContextEqual(Dictionary<string, string> r)
- {
- test(Ice.CollectionComparer.Equals(r, _d));
- called();
- }
-
- public void opIdempotent()
- {
- called();
- }
-
- public void opNonmutating()
- {
- called();
- }
-
- public void opDerived()
- {
- called();
- }
-
- public void exCB(Ice.Exception ex)
- {
- test(false);
- }
-
- private Ice.Communicator _communicator;
- private int _l;
- private Dictionary<string, string> _d;
- }
-
- internal static void twowaysNewAMI(Ice.Communicator communicator, Test.MyClassPrx p)
- {
- {
- Ice.AsyncResult r = p.begin_ice_ping();
- p.end_ice_ping(r);
- }
-
- {
- Callback cb = new Callback();
- p.begin_ice_ping().whenCompleted(cb.ice_ping, cb.exCB);
- cb.check();
- }
-
- {
- Callback cb = new Callback();
- p.begin_ice_ping().whenCompleted(
- () =>
- {
- cb.ice_ping();
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Ice.AsyncResult r = p.begin_ice_isA(Test.MyClass.ice_staticId());
- test(p.end_ice_isA(r));
- }
-
- {
- Callback cb = new Callback();
- p.begin_ice_isA(Test.MyClass.ice_staticId()).whenCompleted(cb.ice_isA, cb.exCB);
- cb.check();
- }
-
- {
- Callback cb = new Callback();
- p.begin_ice_isA(Test.MyClass.ice_staticId()).whenCompleted(
- (bool v) =>
- {
- cb.ice_isA(v);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Ice.AsyncResult r = p.begin_ice_ids();
- test(p.end_ice_ids(r).Length == 3);
- }
-
- {
- Callback cb = new Callback();
- p.begin_ice_ids().whenCompleted(cb.ice_ids, cb.exCB);
- cb.check();
- }
-
- {
- Callback cb = new Callback();
- p.begin_ice_ids().whenCompleted(
- (string[] ids) =>
- {
- cb.ice_ids(ids);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Ice.AsyncResult r = p.begin_ice_id();
- test(p.end_ice_id(r).Equals(Test.MyDerivedClass.ice_staticId()));
- }
-
- {
- Callback cb = new Callback();
- p.begin_ice_id().whenCompleted(cb.ice_id, cb.exCB);
- cb.check();
- }
-
- {
- Callback cb = new Callback();
- p.begin_ice_id().whenCompleted(
- (string id) =>
- {
- cb.ice_id(id);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Ice.AsyncResult r = p.begin_opVoid();
- p.end_opVoid(r);
- }
-
- {
- Callback cb = new Callback();
- p.begin_opVoid().whenCompleted(cb.opVoid, cb.exCB);
- cb.check();
- }
-
- {
- Callback cb = new Callback();
- p.begin_opVoid().whenCompleted(
- () =>
- {
- cb.opVoid();
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Ice.AsyncResult r = p.begin_opByte(0xff, 0x0f);
- byte p3;
- byte ret = p.end_opByte(out p3, r);
- test(p3 == 0xf0);
- test(ret == 0xff);
- }
-
- {
- Callback cb = new Callback();
- p.begin_opByte(0xff, 0x0f).whenCompleted(cb.opByte, cb.exCB);
- cb.check();
- }
-
- {
- Callback cb = new Callback();
- p.begin_opByte(0xff, 0x0f).whenCompleted(
- (byte r, byte b) =>
- {
- cb.opByte(r, b);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Callback cb = new Callback();
- p.begin_opBool(true, false).whenCompleted(cb.opBool, cb.exCB);
- cb.check();
- }
-
- {
- Callback cb = new Callback();
- p.begin_opBool(true, false).whenCompleted(
- (bool r, bool b) =>
- {
- cb.opBool(r, b);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Callback cb = new Callback();
- p.begin_opShortIntLong(10, 11, 12).whenCompleted(cb.opShortIntLong, cb.exCB);
- cb.check();
- }
-
- {
- Callback cb = new Callback();
- p.begin_opShortIntLong(10, 11, 12).whenCompleted(
- (long r, short s, int i, long l) =>
- {
- cb.opShortIntLong(r, s, i, l);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Callback cb = new Callback();
- p.begin_opFloatDouble(3.14f, 1.1E10).whenCompleted(cb.opFloatDouble, cb.exCB);
- cb.check();
- }
-
- {
- Callback cb = new Callback();
- p.begin_opFloatDouble(3.14f, 1.1E10).whenCompleted(
- (double r, float f, double d) =>
- {
- cb.opFloatDouble(r, f, d);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Callback cb = new Callback();
- p.begin_opString("hello", "world").whenCompleted(cb.opString, cb.exCB);
- cb.check();
- }
-
- {
- Callback cb = new Callback();
- p.begin_opString("hello", "world").whenCompleted(
- (string r, string s) =>
- {
- cb.opString(r, s);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Callback cb = new Callback();
- p.begin_opMyEnum(Test.MyEnum.enum2).whenCompleted(cb.opMyEnum, cb.exCB);
- cb.check();
- }
-
- {
- Callback cb = new Callback();
- p.begin_opMyEnum(Test.MyEnum.enum2).whenCompleted(
- (Test.MyEnum r, Test.MyEnum e) =>
- {
- cb.opMyEnum(r, e);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Callback cb = new Callback(communicator);
- p.begin_opMyClass(p).whenCompleted(cb.opMyClass, cb.exCB);
- cb.check();
- }
-
- {
- Callback cb = new Callback(communicator);
- p.begin_opMyClass(p).whenCompleted(
- (Test.MyClassPrx r, Test.MyClassPrx c1, Test.MyClassPrx c2) =>
- {
- cb.opMyClass(r, c1, c2);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Test.Structure si1 = new Test.Structure();
- si1.p = p;
- si1.e = Test.MyEnum.enum3;
- si1.s = new Test.AnotherStruct();
- si1.s.s = "abc";
- Test.Structure si2 = new Test.Structure();
- si2.p = null;
- si2.e = Test.MyEnum.enum2;
- si2.s = new Test.AnotherStruct();
- si2.s.s = "def";
-
- Callback cb = new Callback(communicator);
- p.begin_opStruct(si1, si2).whenCompleted(cb.opStruct, cb.exCB);
- cb.check();
- }
-
- {
- Test.Structure si1 = new Test.Structure();
- si1.p = p;
- si1.e = Test.MyEnum.enum3;
- si1.s = new Test.AnotherStruct();
- si1.s.s = "abc";
- Test.Structure si2 = new Test.Structure();
- si2.p = null;
- si2.e = Test.MyEnum.enum2;
- si2.s = new Test.AnotherStruct();
- si2.s.s = "def";
-
- Callback cb = new Callback(communicator);
- p.begin_opStruct(si1, si2).whenCompleted(
- (Test.Structure rso, Test.Structure so) =>
- {
- cb.opStruct(rso, so);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- byte[] tbsi1 = new byte[] { 0x01, 0x11, 0x12, 0x22 };
- Test.ByteS bsi1 = new Test.ByteS(tbsi1);
- byte[] tbsi2 = new byte[] { 0xf1, 0xf2, 0xf3, 0xf4 };
- Test.ByteS bsi2 = new Test.ByteS(tbsi2);
-
- Callback cb = new Callback();
- p.begin_opByteS(bsi1, bsi2).whenCompleted(cb.opByteS, cb.exCB);
- cb.check();
- }
-
- {
- byte[] tbsi1 = new byte[] { 0x01, 0x11, 0x12, 0x22 };
- Test.ByteS bsi1 = new Test.ByteS(tbsi1);
- byte[] tbsi2 = new byte[] { 0xf1, 0xf2, 0xf3, 0xf4 };
- Test.ByteS bsi2 = new Test.ByteS(tbsi2);
-
- Callback cb = new Callback();
- p.begin_opByteS(bsi1, bsi2).whenCompleted(
- (Test.ByteS rso, Test.ByteS bso) =>
- {
- cb.opByteS(rso, bso);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- bool[] tbsi1 = new bool[] { true, true, false };
- Test.BoolS bsi1 = new Test.BoolS(tbsi1);
- bool[] tbsi2 = new bool[] { false };
- Test.BoolS bsi2 = new Test.BoolS(tbsi2);
-
- Callback cb = new Callback();
- p.begin_opBoolS(bsi1, bsi2).whenCompleted(cb.opBoolS, cb.exCB);
- cb.check();
- }
-
- {
- bool[] tbsi1 = new bool[] { true, true, false };
- Test.BoolS bsi1 = new Test.BoolS(tbsi1);
- bool[] tbsi2 = new bool[] { false };
- Test.BoolS bsi2 = new Test.BoolS(tbsi2);
-
- Callback cb = new Callback();
- p.begin_opBoolS(bsi1, bsi2).whenCompleted(
- (Test.BoolS rso, Test.BoolS bso) =>
- {
- cb.opBoolS(rso, bso);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- short[] tssi = new short[] { 1, 2, 3 };
- Test.ShortS ssi = new Test.ShortS(tssi);
- int[] tisi = new int[] { 5, 6, 7, 8 };
- Test.IntS isi = new Test.IntS(tisi);
- long[] tlsi = new long[] { 10, 30, 20 };
- Test.LongS lsi = new Test.LongS(tlsi);
-
- Callback cb = new Callback();
- p.begin_opShortIntLongS(ssi, isi, lsi).whenCompleted(cb.opShortIntLongS, cb.exCB);
- cb.check();
- }
-
- {
- short[] tssi = new short[] { 1, 2, 3 };
- Test.ShortS ssi = new Test.ShortS(tssi);
- int[] tisi = new int[] { 5, 6, 7, 8 };
- Test.IntS isi = new Test.IntS(tisi);
- long[] tlsi = new long[] { 10, 30, 20 };
- Test.LongS lsi = new Test.LongS(tlsi);
-
- Callback cb = new Callback();
- p.begin_opShortIntLongS(ssi, isi, lsi).whenCompleted(
- (Test.LongS rso, Test.ShortS sso, Test.IntS iso, Test.LongS lso) =>
- {
- cb.opShortIntLongS(rso, sso, iso, lso);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- float[] tfsi = new float[] { 3.14f, 1.11f };
- Test.FloatS fsi = new Test.FloatS(tfsi);
- double[] tdsi = new double[] { 1.1e10, 1.2e10, 1.3e10 };
- Test.DoubleS dsi = new Test.DoubleS(tdsi);
-
- Callback cb = new Callback();
- p.begin_opFloatDoubleS(fsi, dsi).whenCompleted(cb.opFloatDoubleS, cb.exCB);
- cb.check();
- }
-
- {
- float[] tfsi = new float[] { 3.14f, 1.11f };
- Test.FloatS fsi = new Test.FloatS(tfsi);
- double[] tdsi = new double[] { 1.1e10, 1.2e10, 1.3e10 };
- Test.DoubleS dsi = new Test.DoubleS(tdsi);
-
- Callback cb = new Callback();
- p.begin_opFloatDoubleS(fsi, dsi).whenCompleted(
- (Test.DoubleS rso, Test.FloatS fso, Test.DoubleS dso) =>
- {
- cb.opFloatDoubleS(rso, fso, dso);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- string[] tssi1 = new string[] { "abc", "de", "fghi" };
- Test.StringS ssi1 = new Test.StringS(tssi1);
- string[] tssi2 = new string[] { "xyz" };
- Test.StringS ssi2 = new Test.StringS(tssi2);
-
- Callback cb = new Callback();
- p.begin_opStringS(ssi1, ssi2).whenCompleted(cb.opStringS, cb.exCB);
- cb.check();
- }
-
- {
- string[] tssi1 = new string[] { "abc", "de", "fghi" };
- Test.StringS ssi1 = new Test.StringS(tssi1);
- string[] tssi2 = new string[] { "xyz" };
- Test.StringS ssi2 = new Test.StringS(tssi2);
-
- Callback cb = new Callback();
- p.begin_opStringS(ssi1, ssi2).whenCompleted(
- (Test.StringS rso, Test.StringS sso) =>
- {
- cb.opStringS(rso, sso);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Test.ByteS s11 = new Test.ByteS(new byte[] { 0x01, 0x11, 0x12 });
- Test.ByteS s12 = new Test.ByteS(new byte[] { 0xff });
- Test.ByteSS bsi1 = new Test.ByteSS(new Test.ByteS[] { s11, s12 });
-
- Test.ByteS s21 = new Test.ByteS(new byte[] { 0x0e });
- Test.ByteS s22 = new Test.ByteS(new byte[] { 0xf2, 0xf1 });
- Test.ByteSS bsi2 = new Test.ByteSS(new Test.ByteS[] { s21, s22 });
-
- Callback cb = new Callback();
- p.begin_opByteSS(bsi1, bsi2).whenCompleted(cb.opByteSS, cb.exCB);
- cb.check();
- }
-
- {
- Test.ByteS s11 = new Test.ByteS(new byte[] { 0x01, 0x11, 0x12 });
- Test.ByteS s12 = new Test.ByteS(new byte[] { 0xff });
- Test.ByteSS bsi1 = new Test.ByteSS(new Test.ByteS[] { s11, s12 });
-
- Test.ByteS s21 = new Test.ByteS(new byte[] { 0x0e });
- Test.ByteS s22 = new Test.ByteS(new byte[] { 0xf2, 0xf1 });
- Test.ByteSS bsi2 = new Test.ByteSS(new Test.ByteS[] { s21, s22 });
-
- Callback cb = new Callback();
- p.begin_opByteSS(bsi1, bsi2).whenCompleted(
- (Test.ByteSS rso, Test.ByteSS bso) =>
- {
- cb.opByteSS(rso, bso);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Test.BoolS s11 = new Test.BoolS(new bool[] {true});
- Test.BoolS s12 = new Test.BoolS(new bool[] {false});
- Test.BoolS s13 = new Test.BoolS(new bool[] {true, true});
- Test.BoolSS bsi1 = new Test.BoolSS(new Test.BoolS[] {s11, s12, s13});
-
- Test.BoolS s21 = new Test.BoolS(new bool[] {false, false, true});
- Test.BoolSS bsi2 = new Test.BoolSS(new Test.BoolS[] {s21});
-
- Callback cb = new Callback();
- p.begin_opBoolSS(bsi1, bsi2).whenCompleted(cb.opBoolSS, cb.exCB);
- cb.check();
- }
-
- {
- Test.BoolS s11 = new Test.BoolS(new bool[] {true});
- Test.BoolS s12 = new Test.BoolS(new bool[] {false});
- Test.BoolS s13 = new Test.BoolS(new bool[] {true, true});
- Test.BoolSS bsi1 = new Test.BoolSS(new Test.BoolS[] {s11, s12, s13});
-
- Test.BoolS s21 = new Test.BoolS(new bool[] {false, false, true});
- Test.BoolSS bsi2 = new Test.BoolSS(new Test.BoolS[] {s21});
-
- Callback cb = new Callback();
- p.begin_opBoolSS(bsi1, bsi2).whenCompleted(
- (Test.BoolSS rso, Test.BoolSS bso) =>
- {
- cb.opBoolSS(rso, bso);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Test.ShortS s11 = new Test.ShortS(new short[] {1, 2, 5});
- Test.ShortS s12 = new Test.ShortS(new short[] {13});
- Test.ShortS s13 = new Test.ShortS(new short[] {});
- Test.ShortSS ssi = new Test.ShortSS(new Test.ShortS[] {s11, s12, s13});
-
- Test.IntS i11 = new Test.IntS(new int[] {24, 98});
- Test.IntS i12 = new Test.IntS(new int[] {42});
- Test.IntSS isi = new Test.IntSS(new Test.IntS[] {i11, i12});
-
- Test.LongS l11 = new Test.LongS(new long[] {496, 1729});
- Test.LongSS lsi = new Test.LongSS(new Test.LongS[] {l11});
-
- Callback cb = new Callback();
- p.begin_opShortIntLongSS(ssi, isi, lsi).whenCompleted(cb.opShortIntLongSS, cb.exCB);
- cb.check();
- }
-
- {
- Test.ShortS s11 = new Test.ShortS(new short[] {1, 2, 5});
- Test.ShortS s12 = new Test.ShortS(new short[] {13});
- Test.ShortS s13 = new Test.ShortS(new short[] {});
- Test.ShortSS ssi = new Test.ShortSS(new Test.ShortS[] {s11, s12, s13});
-
- Test.IntS i11 = new Test.IntS(new int[] {24, 98});
- Test.IntS i12 = new Test.IntS(new int[] {42});
- Test.IntSS isi = new Test.IntSS(new Test.IntS[] {i11, i12});
-
- Test.LongS l11 = new Test.LongS(new long[] {496, 1729});
- Test.LongSS lsi = new Test.LongSS(new Test.LongS[] {l11});
-
- Callback cb = new Callback();
- p.begin_opShortIntLongSS(ssi, isi, lsi).whenCompleted(
- (Test.LongSS rso, Test.ShortSS sso, Test.IntSS iso, Test.LongSS lso) =>
- {
- cb.opShortIntLongSS(rso, sso, iso, lso);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Test.FloatS f11 = new Test.FloatS(new float[] { 3.14f });
- Test.FloatS f12 = new Test.FloatS(new float[] { 1.11f });
- Test.FloatS f13 = new Test.FloatS(new float[] { });
- Test.FloatSS fsi = new Test.FloatSS(new Test.FloatS[] { f11, f12, f13 });
-
- Test.DoubleS d11 = new Test.DoubleS(new double[] { 1.1e10, 1.2e10, 1.3e10 });
- Test.DoubleSS dsi = new Test.DoubleSS(new Test.DoubleS[] { d11 });
-
- Callback cb = new Callback();
- p.begin_opFloatDoubleSS(fsi, dsi).whenCompleted(cb.opFloatDoubleSS, cb.exCB);
- cb.check();
- }
-
- {
- Test.FloatS f11 = new Test.FloatS(new float[] { 3.14f });
- Test.FloatS f12 = new Test.FloatS(new float[] { 1.11f });
- Test.FloatS f13 = new Test.FloatS(new float[] { });
- Test.FloatSS fsi = new Test.FloatSS(new Test.FloatS[] { f11, f12, f13 });
-
- Test.DoubleS d11 = new Test.DoubleS(new double[] { 1.1e10, 1.2e10, 1.3e10 });
- Test.DoubleSS dsi = new Test.DoubleSS(new Test.DoubleS[] { d11 });
-
- Callback cb = new Callback();
- p.begin_opFloatDoubleSS(fsi, dsi).whenCompleted(
- (Test.DoubleSS rso, Test.FloatSS fso, Test.DoubleSS dso) =>
- {
- cb.opFloatDoubleSS(rso, fso, dso);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Test.StringS s11 = new Test.StringS();
- s11.Add("abc");
- Test.StringS s12 = new Test.StringS();
- s12.Add("de");
- s12.Add("fghi");
- Test.StringSS ssi1 = new Test.StringSS();
- ssi1.Add(s11);
- ssi1.Add(s12);
-
- Test.StringS s21 = new Test.StringS();
- Test.StringS s22 = new Test.StringS();
- Test.StringS s23 = new Test.StringS();
- s23.Add("xyz");
- Test.StringSS ssi2 = new Test.StringSS();
- ssi2.Add(s21);
- ssi2.Add(s22);
- ssi2.Add(s23);
-
- Callback cb = new Callback();
- p.begin_opStringSS(ssi1, ssi2).whenCompleted(cb.opStringSS, cb.exCB);
- cb.check();
- }
-
- {
- Test.StringS s11 = new Test.StringS();
- s11.Add("abc");
- Test.StringS s12 = new Test.StringS();
- s12.Add("de");
- s12.Add("fghi");
- Test.StringSS ssi1 = new Test.StringSS();
- ssi1.Add(s11);
- ssi1.Add(s12);
-
- Test.StringS s21 = new Test.StringS();
- Test.StringS s22 = new Test.StringS();
- Test.StringS s23 = new Test.StringS();
- s23.Add("xyz");
- Test.StringSS ssi2 = new Test.StringSS();
- ssi2.Add(s21);
- ssi2.Add(s22);
- ssi2.Add(s23);
-
- Callback cb = new Callback();
- p.begin_opStringSS(ssi1, ssi2).whenCompleted(
- (Test.StringSS rso, Test.StringSS sso) =>
- {
- cb.opStringSS(rso, sso);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Test.StringSS[] sssi1 = { new Test.StringSS(), new Test.StringSS() };
- sssi1[0].Add(new Test.StringS());
- sssi1[0].Add(new Test.StringS());
- sssi1[0][0].Add("abc");
- sssi1[0][0].Add("de");
- sssi1[0][1].Add("xyz");
- sssi1[1].Add(new Test.StringS());
- sssi1[1][0].Add("hello");
- Test.StringSS[] sssi2 = { new Test.StringSS(), new Test.StringSS(), new Test.StringSS() };
- sssi2[0].Add(new Test.StringS());
- sssi2[0].Add(new Test.StringS());
- sssi2[0][0].Add("");
- sssi2[0][0].Add("");
- sssi2[0][1].Add("abcd");
- sssi2[1].Add(new Test.StringS());
- sssi2[1][0].Add("");
-
- Callback cb = new Callback();
- p.begin_opStringSSS(sssi1, sssi2).whenCompleted(cb.opStringSSS, cb.exCB);
- cb.check();
- }
-
- {
- Test.StringSS[] sssi1 = { new Test.StringSS(), new Test.StringSS() };
- sssi1[0].Add(new Test.StringS());
- sssi1[0].Add(new Test.StringS());
- sssi1[0][0].Add("abc");
- sssi1[0][0].Add("de");
- sssi1[0][1].Add("xyz");
- sssi1[1].Add(new Test.StringS());
- sssi1[1][0].Add("hello");
- Test.StringSS[] sssi2 = { new Test.StringSS(), new Test.StringSS(), new Test.StringSS() };
- sssi2[0].Add(new Test.StringS());
- sssi2[0].Add(new Test.StringS());
- sssi2[0][0].Add("");
- sssi2[0][0].Add("");
- sssi2[0][1].Add("abcd");
- sssi2[1].Add(new Test.StringS());
- sssi2[1][0].Add("");
-
- Callback cb = new Callback();
- p.begin_opStringSSS(sssi1, sssi2).whenCompleted(
- (Test.StringSS[] rsso, Test.StringSS[] ssso) =>
- {
- cb.opStringSSS(rsso, ssso);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Dictionary<byte, bool> di1 = new Dictionary<byte, bool>();
- di1[10] = true;
- di1[100] = false;
- Dictionary<byte, bool> di2 = new Dictionary<byte, bool>();
- di2[10] = true;
- di2[11] = false;
- di2[101] = true;
-
- Callback cb = new Callback();
- p.begin_opByteBoolD(di1, di2).whenCompleted(cb.opByteBoolD, cb.exCB);
- cb.check();
- }
-
- {
- Dictionary<byte, bool> di1 = new Dictionary<byte, bool>();
- di1[10] = true;
- di1[100] = false;
- Dictionary<byte, bool> di2 = new Dictionary<byte, bool>();
- di2[10] = true;
- di2[11] = false;
- di2[101] = true;
-
- Callback cb = new Callback();
- p.begin_opByteBoolD(di1, di2).whenCompleted(
- (Dictionary<byte, bool> ro, Dictionary<byte, bool> _do) =>
- {
- cb.opByteBoolD(ro, _do);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Dictionary<short, int> di1 = new Dictionary<short, int>();
- di1[110] = -1;
- di1[1100] = 123123;
- Dictionary<short, int> di2 = new Dictionary<short, int>();
- di2[110] = -1;
- di2[111] = -100;
- di2[1101] = 0;
-
- Callback cb = new Callback();
- p.begin_opShortIntD(di1, di2).whenCompleted(cb.opShortIntD, cb.exCB);
- cb.check();
- }
-
- {
- Dictionary<short, int> di1 = new Dictionary<short, int>();
- di1[110] = -1;
- di1[1100] = 123123;
- Dictionary<short, int> di2 = new Dictionary<short, int>();
- di2[110] = -1;
- di2[111] = -100;
- di2[1101] = 0;
-
- Callback cb = new Callback();
- p.begin_opShortIntD(di1, di2).whenCompleted(
- (Dictionary<short, int> ro, Dictionary<short, int> _do) =>
- {
- cb.opShortIntD(ro, _do);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Dictionary<long, float> di1 = new Dictionary<long, float>();
- di1[999999110L] = -1.1f;
- di1[999999111L] = 123123.2f;
- Dictionary<long, float> di2 = new Dictionary<long, float>();
- di2[999999110L] = -1.1f;
- di2[999999120L] = -100.4f;
- di2[999999130L] = 0.5f;
-
- Callback cb = new Callback();
- p.begin_opLongFloatD(di1, di2).whenCompleted(cb.opLongFloatD, cb.exCB);
- cb.check();
- }
-
- {
- Dictionary<long, float> di1 = new Dictionary<long, float>();
- di1[999999110L] = -1.1f;
- di1[999999111L] = 123123.2f;
- Dictionary<long, float> di2 = new Dictionary<long, float>();
- di2[999999110L] = -1.1f;
- di2[999999120L] = -100.4f;
- di2[999999130L] = 0.5f;
-
- Callback cb = new Callback();
- p.begin_opLongFloatD(di1, di2).whenCompleted(
- (Dictionary<long, float> ro, Dictionary<long, float> _do) =>
- {
- cb.opLongFloatD(ro, _do);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Dictionary<string, string> di1 = new Dictionary<string, string>();
- di1["foo"] = "abc -1.1";
- di1["bar"] = "abc 123123.2";
- Dictionary<string, string> di2 = new Dictionary<string, string>();
- di2["foo"] = "abc -1.1";
- di2["FOO"] = "abc -100.4";
- di2["BAR"] = "abc 0.5";
-
- Callback cb = new Callback();
- p.begin_opStringStringD(di1, di2).whenCompleted(cb.opStringStringD, cb.exCB);
- cb.check();
- }
-
- {
- Dictionary<string, string> di1 = new Dictionary<string, string>();
- di1["foo"] = "abc -1.1";
- di1["bar"] = "abc 123123.2";
- Dictionary<string, string> di2 = new Dictionary<string, string>();
- di2["foo"] = "abc -1.1";
- di2["FOO"] = "abc -100.4";
- di2["BAR"] = "abc 0.5";
-
- Callback cb = new Callback();
- p.begin_opStringStringD(di1, di2).whenCompleted(
- (Dictionary<string, string> ro, Dictionary<string, string> _do) =>
- {
- cb.opStringStringD(ro, _do);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Dictionary<string, Test.MyEnum> di1 = new Dictionary<string, Test.MyEnum>();
- di1["abc"] = Test.MyEnum.enum1;
- di1[""] = Test.MyEnum.enum2;
- Dictionary<string, Test.MyEnum> di2 = new Dictionary<string, Test.MyEnum>();
- di2["abc"] = Test.MyEnum.enum1;
- di2["qwerty"] = Test.MyEnum.enum3;
- di2["Hello!!"] = Test.MyEnum.enum2;
-
- Callback cb = new Callback();
- p.begin_opStringMyEnumD(di1, di2).whenCompleted(cb.opStringMyEnumD, cb.exCB);
- cb.check();
- }
-
- {
- Dictionary<string, Test.MyEnum> di1 = new Dictionary<string, Test.MyEnum>();
- di1["abc"] = Test.MyEnum.enum1;
- di1[""] = Test.MyEnum.enum2;
- Dictionary<string, Test.MyEnum> di2 = new Dictionary<string, Test.MyEnum>();
- di2["abc"] = Test.MyEnum.enum1;
- di2["qwerty"] = Test.MyEnum.enum3;
- di2["Hello!!"] = Test.MyEnum.enum2;
-
- Callback cb = new Callback();
- p.begin_opStringMyEnumD(di1, di2).whenCompleted(
- (Dictionary<string, Test.MyEnum> ro, Dictionary<string, Test.MyEnum> _do) =>
- {
- cb.opStringMyEnumD(ro, _do);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Dictionary<Test.MyEnum, string> di1 = new Dictionary<Test.MyEnum, string>();
- di1[Test.MyEnum.enum1] = "abc";
- Dictionary<Test.MyEnum, string> di2 = new Dictionary<Test.MyEnum, string>();
- di2[Test.MyEnum.enum2] = "Hello!!";
- di2[Test.MyEnum.enum3] = "qwerty";
-
- Callback cb = new Callback();
- p.begin_opMyEnumStringD(di1, di2).whenCompleted(cb.opMyEnumStringD, cb.exCB);
- cb.check();
- }
-
- {
- Dictionary<Test.MyEnum, string> di1 = new Dictionary<Test.MyEnum, string>();
- di1[Test.MyEnum.enum1] = "abc";
- Dictionary<Test.MyEnum, string> di2 = new Dictionary<Test.MyEnum, string>();
- di2[Test.MyEnum.enum2] = "Hello!!";
- di2[Test.MyEnum.enum3] = "qwerty";
-
- Callback cb = new Callback();
- p.begin_opMyEnumStringD(di1, di2).whenCompleted(
- (Dictionary<Test.MyEnum, string> ro, Dictionary<Test.MyEnum, string> _do) =>
- {
- cb.opMyEnumStringD(ro, _do);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Test.MyStruct s11 = new Test.MyStruct(1, 1);
- Test.MyStruct s12 = new Test.MyStruct(1, 2);
- Dictionary<Test.MyStruct, Test.MyEnum> di1 = new Dictionary<Test.MyStruct, Test.MyEnum>();
- di1[s11] = Test.MyEnum.enum1;
- di1[s12] = Test.MyEnum.enum2;
-
- Test.MyStruct s22 = new Test.MyStruct(2, 2);
- Test.MyStruct s23 = new Test.MyStruct(2, 3);
- Dictionary<Test.MyStruct, Test.MyEnum> di2 = new Dictionary<Test.MyStruct, Test.MyEnum>();
- di2[s11] = Test.MyEnum.enum1;
- di2[s22] = Test.MyEnum.enum3;
- di2[s23] = Test.MyEnum.enum2;
-
- Callback cb = new Callback();
- p.begin_opMyStructMyEnumD(di1, di2).whenCompleted(cb.opMyStructMyEnumD, cb.exCB);
- cb.check();
- }
-
- {
- Test.MyStruct s11 = new Test.MyStruct(1, 1);
- Test.MyStruct s12 = new Test.MyStruct(1, 2);
- Dictionary<Test.MyStruct, Test.MyEnum> di1 = new Dictionary<Test.MyStruct, Test.MyEnum>();
- di1[s11] = Test.MyEnum.enum1;
- di1[s12] = Test.MyEnum.enum2;
-
- Test.MyStruct s22 = new Test.MyStruct(2, 2);
- Test.MyStruct s23 = new Test.MyStruct(2, 3);
- Dictionary<Test.MyStruct, Test.MyEnum> di2 = new Dictionary<Test.MyStruct, Test.MyEnum>();
- di2[s11] = Test.MyEnum.enum1;
- di2[s22] = Test.MyEnum.enum3;
- di2[s23] = Test.MyEnum.enum2;
-
- Callback cb = new Callback();
- p.begin_opMyStructMyEnumD(di1, di2).whenCompleted(
- (Dictionary<Test.MyStruct, Test.MyEnum> ro,
- Dictionary<Test.MyStruct, Test.MyEnum> _do) =>
- {
- cb.opMyStructMyEnumD(ro, _do);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- int[] lengths = new int[] { 0, 1, 2, 126, 127, 128, 129, 253, 254, 255, 256, 257, 1000 };
-
- for(int l = 0; l < lengths.Length; ++l)
- {
- Test.IntS s = new Test.IntS();
- for(int i = 0; i < lengths[l]; ++i)
- {
- s.Add(i);
- }
-
- Callback cb = new Callback(lengths[l]);
- p.begin_opIntS(s).whenCompleted(cb.opIntS, cb.exCB);
- cb.check();
- }
- }
-
- {
- int[] lengths = new int[] { 0, 1, 2, 126, 127, 128, 129, 253, 254, 255, 256, 257, 1000 };
-
- for(int l = 0; l < lengths.Length; ++l)
- {
- Test.IntS s = new Test.IntS();
- for(int i = 0; i < lengths[l]; ++i)
- {
- s.Add(i);
- }
-
- Callback cb = new Callback(lengths[l]);
- p.begin_opIntS(s).whenCompleted(
- (Test.IntS r) =>
- {
- cb.opIntS(r);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
- }
-
- {
- Dictionary<string, string> ctx = new Dictionary<string, string>();
- ctx["one"] = "ONE";
- ctx["two"] = "TWO";
- ctx["three"] = "THREE";
- {
- test(p.ice_getContext().Count == 0);
- Callback cb = new Callback(ctx);
- p.begin_opContext().whenCompleted(cb.opContextNotEqual, cb.exCB);
- cb.check();
- }
- {
- test(p.ice_getContext().Count == 0);
- Callback cb = new Callback(ctx);
- p.begin_opContext(ctx).whenCompleted(cb.opContextEqual, cb.exCB);
- cb.check();
- }
- {
- Test.MyClassPrx p2 = Test.MyClassPrxHelper.checkedCast(p.ice_context(ctx));
- test(Ice.CollectionComparer.Equals(p2.ice_getContext(), ctx));
- Callback cb = new Callback(ctx);
- p2.begin_opContext().whenCompleted(cb.opContextEqual, cb.exCB);
- cb.check();
- }
- {
- Test.MyClassPrx p2 = Test.MyClassPrxHelper.checkedCast(p.ice_context(ctx));
- Callback cb = new Callback(ctx);
- p2.begin_opContext(ctx).whenCompleted(cb.opContextEqual, cb.exCB);
- cb.check();
- }
- }
-
- {
- Dictionary<string, string> ctx = new Dictionary<string, string>();
- ctx["one"] = "ONE";
- ctx["two"] = "TWO";
- ctx["three"] = "THREE";
- {
- test(p.ice_getContext().Count == 0);
- Callback cb = new Callback(ctx);
- p.begin_opContext().whenCompleted(
- (Dictionary<string, string> r) =>
- {
- cb.opContextNotEqual(r);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
- {
- test(p.ice_getContext().Count == 0);
- Callback cb = new Callback(ctx);
- p.begin_opContext(ctx).whenCompleted(
- (Dictionary<string, string> r) =>
- {
- cb.opContextEqual(r);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
- {
- Test.MyClassPrx p2 = Test.MyClassPrxHelper.checkedCast(p.ice_context(ctx));
- test(Ice.CollectionComparer.Equals(p2.ice_getContext(), ctx));
- Callback cb = new Callback(ctx);
- p2.begin_opContext().whenCompleted(
- (Dictionary<string, string> r) =>
- {
- cb.opContextEqual(r);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
- {
- Test.MyClassPrx p2 = Test.MyClassPrxHelper.checkedCast(p.ice_context(ctx));
- Callback cb = new Callback(ctx);
- p2.begin_opContext(ctx).whenCompleted(
- (Dictionary<string, string> r) =>
- {
- cb.opContextEqual(r);
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
- }
-
- {
- //
- // 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().ice_clone_();
- initData.properties.setProperty("Ice.ImplicitContext", impls[i]);
-
- Ice.Communicator ic = Ice.Util.initialize(initData);
-
- Dictionary<string, string> ctx = new Dictionary<string, string>();
- ctx["one"] = "ONE";
- ctx["two"] = "TWO";
- ctx["three"] = "THREE";
-
- Test.MyClassPrx p3 = Test.MyClassPrxHelper.uncheckedCast(
- ic.stringToProxy("test:default -p 12010"));
-
- ic.getImplicitContext().setContext(ctx);
- test(Ice.CollectionComparer.Equals(ic.getImplicitContext().getContext(), ctx));
- {
- Ice.AsyncResult r = p3.begin_opContext();
- Dictionary<string, string> c = p3.end_opContext(r);
- test(Ice.CollectionComparer.Equals(c, ctx));
- }
-
- ic.getImplicitContext().put("zero", "ZERO");
-
- ctx = ic.getImplicitContext().getContext();
- {
- Ice.AsyncResult r = p3.begin_opContext();
- Dictionary<string, string> c = p3.end_opContext(r);
- test(Ice.CollectionComparer.Equals(c, ctx));
- }
-
- Dictionary<string, string> prxContext = new Dictionary<string, string>();
- prxContext["one"] = "UN";
- prxContext["four"] = "QUATRE";
-
- Dictionary<string, string> combined = prxContext;
- foreach(KeyValuePair<string, string> e in ctx)
- {
- try
- {
- combined.Add(e.Key, e.Value);
- }
- catch(System.ArgumentException)
- {
- // Ignore.
- }
- }
- test(combined["one"].Equals("UN"));
-
- p3 = Test.MyClassPrxHelper.uncheckedCast(p.ice_context(prxContext));
-
- ic.getImplicitContext().setContext(null);
- {
- Ice.AsyncResult r = p3.begin_opContext();
- Dictionary<string, string> c = p3.end_opContext(r);
- test(Ice.CollectionComparer.Equals(c, prxContext));
- }
-
- ic.getImplicitContext().setContext(ctx);
- {
- Ice.AsyncResult r = p3.begin_opContext();
- Dictionary<string, string> c = p3.end_opContext(r);
- test(Ice.CollectionComparer.Equals(c, combined));
- }
-
- //ic.getImplicitContext().setContext(null);
- ic.destroy();
- }
- }
-
- {
- Ice.AsyncResult r = p.begin_opIdempotent();
- p.end_opIdempotent(r);
- }
-
- {
- Callback cb = new Callback();
- p.begin_opIdempotent().whenCompleted(cb.opIdempotent, cb.exCB);
- cb.check();
- }
-
- {
- Callback cb = new Callback();
- p.begin_opIdempotent().whenCompleted(
- () =>
- {
- cb.opIdempotent();
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Ice.AsyncResult r = p.begin_opNonmutating();
- p.end_opNonmutating(r);
- }
-
- {
- Callback cb = new Callback();
- p.begin_opNonmutating().whenCompleted(cb.opNonmutating, cb.exCB);
- cb.check();
- }
-
- {
- Callback cb = new Callback();
- p.begin_opNonmutating().whenCompleted(
- () =>
- {
- cb.opNonmutating();
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
-
- {
- Test.MyDerivedClassPrx derived = Test.MyDerivedClassPrxHelper.checkedCast(p);
- test(derived != null);
- Callback cb = new Callback();
- derived.begin_opDerived().whenCompleted(cb.opDerived, cb.exCB);
- cb.check();
- }
-
- {
- Test.MyDerivedClassPrx derived = Test.MyDerivedClassPrxHelper.checkedCast(p);
- test(derived != null);
- Callback cb = new Callback();
- derived.begin_opDerived().whenCompleted(
- () =>
- {
- cb.opDerived();
- },
- (Ice.Exception ex) =>
- {
- cb.exCB(ex);
- });
- cb.check();
- }
- }
-}
diff --git a/cs/test/Ice/optional/Test.ice b/cs/test/Ice/optional/Test.ice
index 80b476096ca..c56cca8e6f5 100644
--- a/cs/test/Ice/optional/Test.ice
+++ b/cs/test/Ice/optional/Test.ice
@@ -183,7 +183,6 @@ class Recursive {
optional(0) RecursiveSeq value;
};
-["ami"]
class Initial
{
void shutdown();
diff --git a/cs/test/Ice/optional/TestAMD.ice b/cs/test/Ice/optional/TestAMD.ice
index 7414ef54ecf..ad0f0694904 100644
--- a/cs/test/Ice/optional/TestAMD.ice
+++ b/cs/test/Ice/optional/TestAMD.ice
@@ -183,7 +183,7 @@ class Recursive {
optional(0) RecursiveSeq value;
};
-["ami", "amd"]
+["amd"]
class Initial
{
void shutdown();
diff --git a/cs/test/Ice/seqMapping/AllTests.cs b/cs/test/Ice/seqMapping/AllTests.cs
index 91b1c21b7d1..338b91ce64b 100644
--- a/cs/test/Ice/seqMapping/AllTests.cs
+++ b/cs/test/Ice/seqMapping/AllTests.cs
@@ -49,11 +49,6 @@ public class AllTests : TestCommon.TestApp
Flush();
TwowaysAMI.twowaysAMI(communicator, cl);
WriteLine("ok");
-
- Write("testing twoway operations with new AMI mapping... ");
- Flush();
- TwowaysNewAMI.twowaysAMI(communicator, cl);
- WriteLine("ok");
}
#if SILVERLIGHT
cl.shutdown();
diff --git a/cs/test/Ice/seqMapping/Makefile b/cs/test/Ice/seqMapping/Makefile
index 78adf76c9e1..be209b2bdff 100644
--- a/cs/test/Ice/seqMapping/Makefile
+++ b/cs/test/Ice/seqMapping/Makefile
@@ -11,9 +11,9 @@ top_srcdir = ../../..
TARGETS = client.exe server.exe collocated.exe serveramd.exe
-C_SRCS = AllTests.cs Client.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs Custom.cs ../../TestCommon/TestApp.cs
+C_SRCS = AllTests.cs Client.cs Twoways.cs TwowaysAMI.cs Custom.cs ../../TestCommon/TestApp.cs
S_SRCS = MyClassI.cs Server.cs Custom.cs
-COL_SRCS = AllTests.cs Collocated.cs MyClassI.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs Custom.cs \
+COL_SRCS = AllTests.cs Collocated.cs MyClassI.cs Twoways.cs TwowaysAMI.cs Custom.cs \
../../TestCommon/TestApp.cs
SAMD_SRCS = MyClassAMDI.cs ServerAMD.cs Custom.cs
diff --git a/cs/test/Ice/seqMapping/Makefile.mak b/cs/test/Ice/seqMapping/Makefile.mak
index 45a27226606..0357792db3b 100644
--- a/cs/test/Ice/seqMapping/Makefile.mak
+++ b/cs/test/Ice/seqMapping/Makefile.mak
@@ -11,9 +11,9 @@ top_srcdir = ..\..\..
TARGETS = client.exe server.exe collocated.exe serveramd.exe Serializable.dll
-C_SRCS = AllTests.cs Client.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs Custom.cs ..\..\TestCommon\TestApp.cs
+C_SRCS = AllTests.cs Client.cs Twoways.cs TwowaysAMI.cs Custom.cs ..\..\TestCommon\TestApp.cs
S_SRCS = MyClassI.cs Server.cs Custom.cs
-COL_SRCS = AllTests.cs Collocated.cs MyClassI.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs Custom.cs ..\..\TestCommon\TestApp.cs
+COL_SRCS = AllTests.cs Collocated.cs MyClassI.cs Twoways.cs TwowaysAMI.cs Custom.cs ..\..\TestCommon\TestApp.cs
SAMD_SRCS = MyClassAMDI.cs ServerAMD.cs Custom.cs
GEN_SRCS = $(GDIR)\Test.cs
diff --git a/cs/test/Ice/seqMapping/Test.ice b/cs/test/Ice/seqMapping/Test.ice
index 8504062e2c2..febadf8532e 100644
--- a/cs/test/Ice/seqMapping/Test.ice
+++ b/cs/test/Ice/seqMapping/Test.ice
@@ -149,7 +149,7 @@ sequence<En> AEnS;
["clr:serializable:Serialize.Struct"] sequence<byte> SerialStruct;
#endif
-["ami"] class MyClass
+class MyClass
{
void shutdown();
diff --git a/cs/test/Ice/seqMapping/TestAMD.ice b/cs/test/Ice/seqMapping/TestAMD.ice
index dbd01fc2021..1cdf5f6858f 100644
--- a/cs/test/Ice/seqMapping/TestAMD.ice
+++ b/cs/test/Ice/seqMapping/TestAMD.ice
@@ -147,7 +147,7 @@ sequence<En> AEnS;
["clr:serializable:Serialize.Large"] sequence<byte> SerialLarge;
["clr:serializable:Serialize.Struct"] sequence<byte> SerialStruct;
-["ami", "amd"] class MyClass
+["amd"] class MyClass
{
void shutdown();
diff --git a/cs/test/Ice/seqMapping/TwowaysAMI.cs b/cs/test/Ice/seqMapping/TwowaysAMI.cs
index bc1c90339d6..aee076b01bd 100644
--- a/cs/test/Ice/seqMapping/TwowaysAMI.cs
+++ b/cs/test/Ice/seqMapping/TwowaysAMI.cs
@@ -23,9 +23,9 @@ public class TwowaysAMI
}
}
- private class Callback
+ private class CallbackBase
{
- internal Callback()
+ internal CallbackBase()
{
_called = false;
}
@@ -56,1362 +56,496 @@ public class TwowaysAMI
private bool _called;
}
- private class AMI_MyClass_opAByteSI : Test.AMI_MyClass_opAByteS
+ private class Callback
{
- public AMI_MyClass_opAByteSI(byte[] i)
- {
- _i = i;
- }
-
- public override void ice_response(byte[] r, byte[] o)
+ public void opAByteSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ byte[] i = (byte[])result.AsyncState;
+ byte[] o;
+ byte[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAByteS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private byte[] _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opLByteSI : Test.AMI_MyClass_opLByteS
- {
- public AMI_MyClass_opLByteSI(List<byte> i)
+ public void opLByteSI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(List<byte> r, List<byte> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ List<byte> i = (List<byte>)result.AsyncState;
+ List<byte> o;
+ List<byte> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLByteS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private List<byte> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opKByteSI : Test.AMI_MyClass_opKByteS
- {
- public AMI_MyClass_opKByteSI(LinkedList<byte> i)
+ public void opKByteSI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(LinkedList<byte> r, LinkedList<byte> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ LinkedList<byte> i = (LinkedList<byte>)result.AsyncState;
+ LinkedList<byte> o;
+ LinkedList<byte> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKByteS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private LinkedList<byte> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opQByteSI : Test.AMI_MyClass_opQByteS
- {
- public AMI_MyClass_opQByteSI(Queue<byte> i)
- {
- _i = i;
- }
-
- public override void ice_response(Queue<byte> r, Queue<byte> o)
+ public void opQByteSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Queue<byte> i = (Queue<byte>)result.AsyncState;
+ Queue<byte> o;
+ Queue<byte> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQByteS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Queue<byte> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opSByteSI : Test.AMI_MyClass_opSByteS
- {
- public AMI_MyClass_opSByteSI(Stack<byte> i)
- {
- _i = i;
- }
-
- public override void ice_response(Stack<byte> r, Stack<byte> o)
+ public void opSByteSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Stack<byte> i = (Stack<byte>)result.AsyncState;
+ Stack<byte> o;
+ Stack<byte> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSByteS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Stack<byte> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opCByteSI : Test.AMI_MyClass_opCByteS
- {
- public AMI_MyClass_opCByteSI(CByteS i)
+ public void opCByteSI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(CByteS r, CByteS o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ CByteS i = (CByteS)result.AsyncState;
+ CByteS o;
+ CByteS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCByteS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private CByteS _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opABoolSI : Test.AMI_MyClass_opABoolS
- {
- public AMI_MyClass_opABoolSI(bool[] i)
- {
- _i = i;
- }
-
- public override void ice_response(bool[] r, bool[] o)
+ public void opABoolSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ bool[] i = (bool[])result.AsyncState;
+ bool[] o;
+ bool[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opABoolS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opLBoolSI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private bool[] _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opLBoolSI : Test.AMI_MyClass_opLBoolS
- {
- public AMI_MyClass_opLBoolSI(List<bool> i)
- {
- _i = i;
- }
-
- public override void ice_response(List<bool> r, List<bool> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ List<bool> i = (List<bool>)result.AsyncState;
+ List<bool> o;
+ List<bool> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLBoolS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private List<bool> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opKBoolSI : Test.AMI_MyClass_opKBoolS
- {
- public AMI_MyClass_opKBoolSI(LinkedList<bool> i)
- {
- _i = i;
- }
-
- public override void ice_response(LinkedList<bool> r, LinkedList<bool> o)
+ public void opKBoolSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ LinkedList<bool> i = (LinkedList<bool>)result.AsyncState;
+ LinkedList<bool> o;
+ LinkedList<bool> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKBoolS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private LinkedList<bool> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opQBoolSI : Test.AMI_MyClass_opQBoolS
- {
- public AMI_MyClass_opQBoolSI(Queue<bool> i)
+ public void opQBoolSI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(Queue<bool> r, Queue<bool> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Queue<bool> i = (Queue<bool>)result.AsyncState;
+ Queue<bool> o;
+ Queue<bool> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQBoolS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opSBoolSI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Queue<bool> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opSBoolSI : Test.AMI_MyClass_opSBoolS
- {
- public AMI_MyClass_opSBoolSI(Stack<bool> i)
- {
- _i = i;
- }
-
- public override void ice_response(Stack<bool> r, Stack<bool> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Stack<bool> i = (Stack<bool>)result.AsyncState;
+ Stack<bool> o;
+ Stack<bool> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSBoolS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
+ public void opCBoolSI(Ice.AsyncResult result)
{
- callback.check();
- }
-
- private Stack<bool> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opCBoolSI : Test.AMI_MyClass_opCBoolS
- {
- public AMI_MyClass_opCBoolSI(CBoolS i)
- {
- _i = i;
- }
-
- public override void ice_response(CBoolS r, CBoolS o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ CBoolS i = (CBoolS)result.AsyncState;
+ CBoolS o;
+ CBoolS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCBoolS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opAShortSI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private CBoolS _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opAShortSI : Test.AMI_MyClass_opAShortS
- {
- public AMI_MyClass_opAShortSI(short[] i)
- {
- _i = i;
- }
-
- public override void ice_response(short[] r, short[] o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ short[] i = (short[])result.AsyncState;
+ short[] o;
+ short[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAShortS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opLShortSI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private short[] _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opLShortSI : Test.AMI_MyClass_opLShortS
- {
- public AMI_MyClass_opLShortSI(List<short> i)
- {
- _i = i;
- }
-
- public override void ice_response(List<short> r, List<short> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ List<short> i = (List<short>)result.AsyncState;
+ List<short> o;
+ List<short> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLShortS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private List<short> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opKShortSI : Test.AMI_MyClass_opKShortS
- {
- public AMI_MyClass_opKShortSI(LinkedList<short> i)
- {
- _i = i;
- }
-
- public override void ice_response(LinkedList<short> r, LinkedList<short> o)
+ public void opKShortSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ LinkedList<short> i = (LinkedList<short>)result.AsyncState;
+ LinkedList<short> o;
+ LinkedList<short> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKShortS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private LinkedList<short> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opQShortSI : Test.AMI_MyClass_opQShortS
- {
- public AMI_MyClass_opQShortSI(Queue<short> i)
- {
- _i = i;
- }
-
- public override void ice_response(Queue<short> r, Queue<short> o)
+ public void opQShortSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Queue<short> i = (Queue<short>)result.AsyncState;
+ Queue<short> o;
+ Queue<short> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQShortS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opSShortSI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Queue<short> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opSShortSI : Test.AMI_MyClass_opSShortS
- {
- public AMI_MyClass_opSShortSI(Stack<short> i)
- {
- _i = i;
- }
-
- public override void ice_response(Stack<short> r, Stack<short> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Stack<short> i = (Stack<short>)result.AsyncState;
+ Stack<short> o;
+ Stack<short> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSShortS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
+ public void opCShortSI(Ice.AsyncResult result)
{
- callback.check();
- }
-
- private Stack<short> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opCShortSI : Test.AMI_MyClass_opCShortS
- {
- public AMI_MyClass_opCShortSI(CShortS i)
- {
- _i = i;
- }
-
- public override void ice_response(CShortS r, CShortS o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ CShortS i = (CShortS)result.AsyncState;
+ CShortS o;
+ CShortS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCShortS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
+ public void opAIntSI(Ice.AsyncResult result)
{
- callback.check();
- }
-
- private CShortS _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opAIntSI : Test.AMI_MyClass_opAIntS
- {
- public AMI_MyClass_opAIntSI(int[] i)
- {
- _i = i;
- }
-
- public override void ice_response(int[] r, int[] o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ int[] i = (int[])result.AsyncState;
+ int[] o;
+ int[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAIntS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private int[] _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opLIntSI : Test.AMI_MyClass_opLIntS
- {
- public AMI_MyClass_opLIntSI(List<int> i)
+ public void opLIntSI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(List<int> r, List<int> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ List<int> i = (List<int>)result.AsyncState;
+ List<int> o;
+ List<int> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLIntS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private List<int> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opKIntSI : Test.AMI_MyClass_opKIntS
- {
- public AMI_MyClass_opKIntSI(LinkedList<int> i)
- {
- _i = i;
- }
-
- public override void ice_response(LinkedList<int> r, LinkedList<int> o)
+ public void opKIntSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ LinkedList<int> i = (LinkedList<int>)result.AsyncState;
+ LinkedList<int> o;
+ LinkedList<int> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKIntS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opQIntSI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private LinkedList<int> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opQIntSI : Test.AMI_MyClass_opQIntS
- {
- public AMI_MyClass_opQIntSI(Queue<int> i)
- {
- _i = i;
- }
-
- public override void ice_response(Queue<int> r, Queue<int> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Queue<int> i = (Queue<int>)result.AsyncState;
+ Queue<int> o;
+ Queue<int> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQIntS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opSIntSI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Queue<int> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opSIntSI : Test.AMI_MyClass_opSIntS
- {
- public AMI_MyClass_opSIntSI(Stack<int> i)
- {
- _i = i;
- }
-
- public override void ice_response(Stack<int> r, Stack<int> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Stack<int> i = (Stack<int>)result.AsyncState;
+ Stack<int> o;
+ Stack<int> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSIntS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Stack<int> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opCIntSI : Test.AMI_MyClass_opCIntS
- {
- public AMI_MyClass_opCIntSI(CIntS i)
+ public void opCIntSI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(CIntS r, CIntS o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ CIntS i = (CIntS)result.AsyncState;
+ CIntS o;
+ CIntS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCIntS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opALongSI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private CIntS _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opALongSI : Test.AMI_MyClass_opALongS
- {
- public AMI_MyClass_opALongSI(long[] i)
- {
- _i = i;
- }
-
- public override void ice_response(long[] r, long[] o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ long[] i = (long[])result.AsyncState;
+ long[] o;
+ long[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opALongS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
+ public void opLLongSI(Ice.AsyncResult result)
{
- callback.check();
- }
-
- private long[] _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opLLongSI : Test.AMI_MyClass_opLLongS
- {
- public AMI_MyClass_opLLongSI(List<long> i)
- {
- _i = i;
- }
-
- public override void ice_response(List<long> r, List<long> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ List<long> i = (List<long>)result.AsyncState;
+ List<long> o;
+ List<long> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLLongS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private List<long> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opKLongSI : Test.AMI_MyClass_opKLongS
- {
- public AMI_MyClass_opKLongSI(LinkedList<long> i)
+ public void opKLongSI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(LinkedList<long> r, LinkedList<long> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ LinkedList<long> i = (LinkedList<long>)result.AsyncState;
+ LinkedList<long> o;
+ LinkedList<long> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKLongS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private LinkedList<long> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opQLongSI : Test.AMI_MyClass_opQLongS
- {
- public AMI_MyClass_opQLongSI(Queue<long> i)
- {
- _i = i;
- }
-
- public override void ice_response(Queue<long> r, Queue<long> o)
+ public void opQLongSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Queue<long> i = (Queue<long>)result.AsyncState;
+ Queue<long> o;
+ Queue<long> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQLongS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Queue<long> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opSLongSI : Test.AMI_MyClass_opSLongS
- {
- public AMI_MyClass_opSLongSI(Stack<long> i)
+ public void opSLongSI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(Stack<long> r, Stack<long> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Stack<long> i = (Stack<long>)result.AsyncState;
+ Stack<long> o;
+ Stack<long> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSLongS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Stack<long> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opCLongSI : Test.AMI_MyClass_opCLongS
- {
- public AMI_MyClass_opCLongSI(CLongS i)
- {
- _i = i;
- }
-
- public override void ice_response(CLongS r, CLongS o)
+ public void opCLongSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ CLongS i = (CLongS)result.AsyncState;
+ CLongS o;
+ CLongS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCLongS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opAFloatSI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private CLongS _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opAFloatSI : Test.AMI_MyClass_opAFloatS
- {
- public AMI_MyClass_opAFloatSI(float[] i)
- {
- _i = i;
- }
-
- public override void ice_response(float[] r, float[] o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ float[] i = (float[])result.AsyncState;
+ float[] o;
+ float[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAFloatS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private float[] _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opLFloatSI : Test.AMI_MyClass_opLFloatS
- {
- public AMI_MyClass_opLFloatSI(List<float> i)
- {
- _i = i;
- }
-
- public override void ice_response(List<float> r, List<float> o)
+ public void opLFloatSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ List<float> i = (List<float>)result.AsyncState;
+ List<float> o;
+ List<float> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLFloatS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private List<float> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opKFloatSI : Test.AMI_MyClass_opKFloatS
- {
- public AMI_MyClass_opKFloatSI(LinkedList<float> i)
- {
- _i = i;
- }
-
- public override void ice_response(LinkedList<float> r, LinkedList<float> o)
+ public void opKFloatSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ LinkedList<float> i = (LinkedList<float>)result.AsyncState;
+ LinkedList<float> o;
+ LinkedList<float> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKFloatS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private LinkedList<float> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opQFloatSI : Test.AMI_MyClass_opQFloatS
- {
- public AMI_MyClass_opQFloatSI(Queue<float> i)
+ public void opQFloatSI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(Queue<float> r, Queue<float> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Queue<float> i = (Queue<float>)result.AsyncState;
+ Queue<float> o;
+ Queue<float> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQFloatS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Queue<float> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opSFloatSI : Test.AMI_MyClass_opSFloatS
- {
- public AMI_MyClass_opSFloatSI(Stack<float> i)
- {
- _i = i;
- }
-
- public override void ice_response(Stack<float> r, Stack<float> o)
+ public void opSFloatSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Stack<float> i = (Stack<float>)result.AsyncState;
+ Stack<float> o;
+ Stack<float> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSFloatS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opCFloatSI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Stack<float> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opCFloatSI : Test.AMI_MyClass_opCFloatS
- {
- public AMI_MyClass_opCFloatSI(CFloatS i)
- {
- _i = i;
- }
-
- public override void ice_response(CFloatS r, CFloatS o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ CFloatS i = (CFloatS)result.AsyncState;
+ CFloatS o;
+ CFloatS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCFloatS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opADoubleSI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private CFloatS _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opADoubleSI : Test.AMI_MyClass_opADoubleS
- {
- public AMI_MyClass_opADoubleSI(double[] i)
- {
- _i = i;
- }
-
- public override void ice_response(double[] r, double[] o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ double[] i = (double[])result.AsyncState;
+ double[] o;
+ double[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opADoubleS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opLDoubleSI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private double[] _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opLDoubleSI : Test.AMI_MyClass_opLDoubleS
- {
- public AMI_MyClass_opLDoubleSI(List<double> i)
- {
- _i = i;
- }
-
- public override void ice_response(List<double> r, List<double> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ List<double> i = (List<double>)result.AsyncState;
+ List<double> o;
+ List<double> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLDoubleS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private List<double> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opKDoubleSI : Test.AMI_MyClass_opKDoubleS
- {
- public AMI_MyClass_opKDoubleSI(LinkedList<double> i)
- {
- _i = i;
- }
-
- public override void ice_response(LinkedList<double> r, LinkedList<double> o)
+ public void opKDoubleSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ LinkedList<double> i = (LinkedList<double>)result.AsyncState;
+ LinkedList<double> o;
+ LinkedList<double> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKDoubleS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private LinkedList<double> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opQDoubleSI : Test.AMI_MyClass_opQDoubleS
- {
- public AMI_MyClass_opQDoubleSI(Queue<double> i)
- {
- _i = i;
- }
-
- public override void ice_response(Queue<double> r, Queue<double> o)
+ public void opQDoubleSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Queue<double> i = (Queue<double>)result.AsyncState;
+ Queue<double> o;
+ Queue<double> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQDoubleS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Queue<double> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opSDoubleSI : Test.AMI_MyClass_opSDoubleS
- {
- public AMI_MyClass_opSDoubleSI(Stack<double> i)
+ public void opSDoubleSI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(Stack<double> r, Stack<double> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Stack<double> i = (Stack<double>)result.AsyncState;
+ Stack<double> o;
+ Stack<double> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSDoubleS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opCDoubleSI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Stack<double> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opCDoubleSI : Test.AMI_MyClass_opCDoubleS
- {
- public AMI_MyClass_opCDoubleSI(CDoubleS i)
- {
- _i = i;
- }
-
- public override void ice_response(CDoubleS r, CDoubleS o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ CDoubleS i = (CDoubleS)result.AsyncState;
+ CDoubleS o;
+ CDoubleS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCDoubleS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private CDoubleS _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opAStringSI : Test.AMI_MyClass_opAStringS
- {
- public AMI_MyClass_opAStringSI(string[] i)
+ public void opAStringSI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(string[] r, string[] o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ string[] i = (string[])result.AsyncState;
+ string[] o;
+ string[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAStringS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opLStringSI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private string[] _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opLStringSI : Test.AMI_MyClass_opLStringS
- {
- public AMI_MyClass_opLStringSI(List<string> i)
- {
- _i = i;
- }
-
- public override void ice_response(List<string> r, List<string> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ List<string> i = (List<string>)result.AsyncState;
+ List<string> o;
+ List<string> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLStringS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private List<string> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opKStringSI : Test.AMI_MyClass_opKStringS
- {
- public AMI_MyClass_opKStringSI(LinkedList<string> i)
+ public void opKStringSI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(LinkedList<string> r, LinkedList<string> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ LinkedList<string> i = (LinkedList<string>)result.AsyncState;
+ LinkedList<string> o;
+ LinkedList<string> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKStringS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private LinkedList<string> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opQStringSI : Test.AMI_MyClass_opQStringS
- {
- public AMI_MyClass_opQStringSI(Queue<string> i)
- {
- _i = i;
- }
-
- public override void ice_response(Queue<string> r, Queue<string> o)
+ public void opQStringSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Queue<string> i = (Queue<string>)result.AsyncState;
+ Queue<string> o;
+ Queue<string> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQStringS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Queue<string> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opSStringSI : Test.AMI_MyClass_opSStringS
- {
- public AMI_MyClass_opSStringSI(Stack<string> i)
- {
- _i = i;
- }
-
- public override void ice_response(Stack<string> r, Stack<string> o)
+ public void opSStringSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Stack<string> i = (Stack<string>)result.AsyncState;
+ Stack<string> o;
+ Stack<string> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSStringS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opCStringSI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Stack<string> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opCStringSI : Test.AMI_MyClass_opCStringS
- {
- public AMI_MyClass_opCStringSI(CStringS i)
- {
- _i = i;
- }
-
- public override void ice_response(CStringS r, CStringS o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ CStringS i = (CStringS)result.AsyncState;
+ CStringS o;
+ CStringS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCStringS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private CStringS _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opAObjectSI : Test.AMI_MyClass_opAObjectS
- {
- public AMI_MyClass_opAObjectSI(Ice.Object[] i)
- {
- _i = i;
- }
-
- public override void ice_response(Ice.Object[] r, Ice.Object[] o)
+ public void opAObjectSI(Ice.AsyncResult result)
{
+ Ice.Object[] i = (Ice.Object[])result.AsyncState;
+ Ice.Object[] o;
+ Ice.Object[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAObjectS(out o, result);
System.Collections.IEnumerator eo = o.GetEnumerator();
System.Collections.IEnumerator er = r.GetEnumerator();
- foreach(CV obj in _i)
+ foreach(CV obj in i)
{
eo.MoveNext();
er.MoveNext();
@@ -1421,32 +555,14 @@ public class TwowaysAMI
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Ice.Object[] _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opLObjectSI : Test.AMI_MyClass_opLObjectS
- {
- public AMI_MyClass_opLObjectSI(List<Ice.Object> i)
- {
- _i = i;
- }
-
- public override void ice_response(List<Ice.Object> r, List<Ice.Object> o)
+ public void opLObjectSI(Ice.AsyncResult result)
{
+ List<Ice.Object> i = (List<Ice.Object>)result.AsyncState;
+ List<Ice.Object> o;
+ List<Ice.Object> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLObjectS(out o, result);
IEnumerator<Ice.Object> eo = o.GetEnumerator();
IEnumerator<Ice.Object> er = r.GetEnumerator();
- foreach(CV obj in _i)
+ foreach(CV obj in i)
{
eo.MoveNext();
er.MoveNext();
@@ -1456,32 +572,14 @@ public class TwowaysAMI
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private List<Ice.Object> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opCObjectSI : Test.AMI_MyClass_opCObjectS
- {
- public AMI_MyClass_opCObjectSI(CObjectS i)
+ public void opCObjectSI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(CObjectS r, CObjectS o)
- {
- IEnumerator<Ice.Object> eo = (IEnumerator<Ice.Object>)o.GetEnumerator();
- IEnumerator<Ice.Object> er = (IEnumerator<Ice.Object>)r.GetEnumerator();
- foreach(CV obj in _i)
+ CObjectS i = (CObjectS)result.AsyncState;
+ CObjectS o;
+ CObjectS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCObjectS(out o, result);
+ IEnumerator<Ice.Object> eo = o.GetEnumerator();
+ IEnumerator<Ice.Object> er = r.GetEnumerator();
+ foreach(CV obj in i)
{
eo.MoveNext();
er.MoveNext();
@@ -1491,536 +589,195 @@ public class TwowaysAMI
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private CObjectS _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opAObjectPrxSI : Test.AMI_MyClass_opAObjectPrxS
- {
- public AMI_MyClass_opAObjectPrxSI(Ice.ObjectPrx[] i)
- {
- _i = i;
- }
-
- public override void ice_response(Ice.ObjectPrx[] r, Ice.ObjectPrx[] o)
+ public void opAObjectPrxSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Ice.ObjectPrx[] i = (Ice.ObjectPrx[])result.AsyncState;
+ Ice.ObjectPrx[] o;
+ Ice.ObjectPrx[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAObjectPrxS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Ice.ObjectPrx[] _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opLObjectPrxSI : Test.AMI_MyClass_opLObjectPrxS
- {
- public AMI_MyClass_opLObjectPrxSI(List<Ice.ObjectPrx> i)
- {
- _i = i;
- }
-
- public override void ice_response(List<Ice.ObjectPrx> r, List<Ice.ObjectPrx> o)
+ public void opLObjectPrxSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ List<Ice.ObjectPrx> i = (List<Ice.ObjectPrx>)result.AsyncState;
+ List<Ice.ObjectPrx> o;
+ List<Ice.ObjectPrx> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLObjectPrxS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private List<Ice.ObjectPrx> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opKObjectPrxSI : Test.AMI_MyClass_opKObjectPrxS
- {
- public AMI_MyClass_opKObjectPrxSI(LinkedList<Ice.ObjectPrx> i)
+ public void opKObjectPrxSI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(LinkedList<Ice.ObjectPrx> r, LinkedList<Ice.ObjectPrx> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ LinkedList<Ice.ObjectPrx> i = (LinkedList<Ice.ObjectPrx>)result.AsyncState;
+ LinkedList<Ice.ObjectPrx> o;
+ LinkedList<Ice.ObjectPrx> r =
+ MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKObjectPrxS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private LinkedList<Ice.ObjectPrx> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opQObjectPrxSI : Test.AMI_MyClass_opQObjectPrxS
- {
- public AMI_MyClass_opQObjectPrxSI(Queue<Ice.ObjectPrx> i)
+ public void opQObjectPrxSI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(Queue<Ice.ObjectPrx> r, Queue<Ice.ObjectPrx> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Queue<Ice.ObjectPrx> i = (Queue<Ice.ObjectPrx>)result.AsyncState;
+ Queue<Ice.ObjectPrx> o;
+ Queue<Ice.ObjectPrx> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQObjectPrxS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Queue<Ice.ObjectPrx> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opSObjectPrxSI : Test.AMI_MyClass_opSObjectPrxS
- {
- public AMI_MyClass_opSObjectPrxSI(Stack<Ice.ObjectPrx> i)
- {
- _i = i;
- }
-
- public override void ice_response(Stack<Ice.ObjectPrx> r, Stack<Ice.ObjectPrx> o)
+ public void opSObjectPrxSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Stack<Ice.ObjectPrx> i = (Stack<Ice.ObjectPrx>)result.AsyncState;
+ Stack<Ice.ObjectPrx> o;
+ Stack<Ice.ObjectPrx> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSObjectPrxS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
+ public void opCObjectPrxSI(Ice.AsyncResult result)
{
- callback.check();
- }
-
- private Stack<Ice.ObjectPrx> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opCObjectPrxSI : Test.AMI_MyClass_opCObjectPrxS
- {
- public AMI_MyClass_opCObjectPrxSI(CObjectPrxS i)
- {
- _i = i;
- }
-
- public override void ice_response(CObjectPrxS r, CObjectPrxS o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ CObjectPrxS i = (CObjectPrxS)result.AsyncState;
+ CObjectPrxS o;
+ CObjectPrxS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCObjectPrxS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private CObjectPrxS _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opAStructSI : Test.AMI_MyClass_opAStructS
- {
- public AMI_MyClass_opAStructSI(S[] i)
+ public void opAStructSI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(S[] r, S[] o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ S[] i = (S[])result.AsyncState;
+ S[] o;
+ S[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAStructS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private S[] _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opLStructSI : Test.AMI_MyClass_opLStructS
- {
- public AMI_MyClass_opLStructSI(List<S> i)
- {
- _i = i;
- }
-
- public override void ice_response(List<S> r, List<S> o)
+ public void opLStructSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ List<S> i = (List<S>)result.AsyncState;
+ List<S> o;
+ List<S> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLStructS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private List<S> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opKStructSI : Test.AMI_MyClass_opKStructS
- {
- public AMI_MyClass_opKStructSI(LinkedList<S> i)
+ public void opKStructSI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(LinkedList<S> r, LinkedList<S> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ LinkedList<S> i = (LinkedList<S>)result.AsyncState;
+ LinkedList<S> o;
+ LinkedList<S> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKStructS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private LinkedList<S> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opQStructSI : Test.AMI_MyClass_opQStructS
- {
- public AMI_MyClass_opQStructSI(Queue<S> i)
- {
- _i = i;
- }
-
- public override void ice_response(Queue<S> r, Queue<S> o)
+ public void opQStructSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Queue<S> i = (Queue<S>)result.AsyncState;
+ Queue<S> o;
+ Queue<S> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQStructS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opSStructSI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Queue<S> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opSStructSI : Test.AMI_MyClass_opSStructS
- {
- public AMI_MyClass_opSStructSI(Stack<S> i)
- {
- _i = i;
- }
-
- public override void ice_response(Stack<S> r, Stack<S> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Stack<S> i = (Stack<S>)result.AsyncState;
+ Stack<S> o;
+ Stack<S> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSStructS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opCStructSI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Stack<S> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opCStructSI : Test.AMI_MyClass_opCStructS
- {
- public AMI_MyClass_opCStructSI(CStructS i)
- {
- _i = i;
- }
-
- public override void ice_response(CStructS r, CStructS o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ CStructS i = (CStructS)result.AsyncState;
+ CStructS o;
+ CStructS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCStructS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private CStructS _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opAStructSDI : Test.AMI_MyClass_opAStructSD
- {
- public AMI_MyClass_opAStructSDI(SD[] i)
- {
- _i = i;
- }
-
- public override void ice_response(SD[] r, SD[] o)
+ public void opAStructSDI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ SD[] i = (SD[])result.AsyncState;
+ SD[] o;
+ SD[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAStructSD(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private SD[] _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opLStructSDI : Test.AMI_MyClass_opLStructSD
- {
- public AMI_MyClass_opLStructSDI(List<SD> i)
+ public void opLStructSDI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(List<SD> r, List<SD> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ List<SD> i = (List<SD>)result.AsyncState;
+ List<SD> o;
+ List<SD> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLStructSD(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private List<SD> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opKStructSDI : Test.AMI_MyClass_opKStructSD
- {
- public AMI_MyClass_opKStructSDI(LinkedList<SD> i)
- {
- _i = i;
- }
-
- public override void ice_response(LinkedList<SD> r, LinkedList<SD> o)
+ public void opKStructSDI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ LinkedList<SD> i = (LinkedList<SD>)result.AsyncState;
+ LinkedList<SD> o;
+ LinkedList<SD> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKStructSD(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opQStructSDI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private LinkedList<SD> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opQStructSDI : Test.AMI_MyClass_opQStructSD
- {
- public AMI_MyClass_opQStructSDI(Queue<SD> i)
- {
- _i = i;
- }
-
- public override void ice_response(Queue<SD> r, Queue<SD> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Queue<SD> i = (Queue<SD>)result.AsyncState;
+ Queue<SD> o;
+ Queue<SD> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQStructSD(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opSStructSDI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Queue<SD> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opSStructSDI : Test.AMI_MyClass_opSStructSD
- {
- public AMI_MyClass_opSStructSDI(Stack<SD> i)
- {
- _i = i;
- }
-
- public override void ice_response(Stack<SD> r, Stack<SD> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Stack<SD> i = (Stack<SD>)result.AsyncState;
+ Stack<SD> o;
+ Stack<SD> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSStructSD(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opCStructSDI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Stack<SD> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opCStructSDI : Test.AMI_MyClass_opCStructSD
- {
- public AMI_MyClass_opCStructSDI(CStructSD i)
- {
- _i = i;
- }
-
- public override void ice_response(CStructSD r, CStructSD o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ CStructSD i = (CStructSD)result.AsyncState;
+ CStructSD o;
+ CStructSD r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCStructSD(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private CStructSD _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opACVSI : Test.AMI_MyClass_opACVS
- {
- public AMI_MyClass_opACVSI(CV[] i)
- {
- _i = i;
- }
-
- public override void ice_response(CV[] r, CV[] o)
+ public void opACVSI(Ice.AsyncResult result)
{
+ CV[] i = (CV[])result.AsyncState;
+ CV[] o;
+ CV[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opACVS(out o, result);
System.Collections.IEnumerator eo = o.GetEnumerator();
System.Collections.IEnumerator er = r.GetEnumerator();
- foreach(CV obj in _i)
+ foreach(CV obj in i)
{
eo.MoveNext();
er.MoveNext();
@@ -2030,32 +787,14 @@ public class TwowaysAMI
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private CV[] _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opLCVSI : Test.AMI_MyClass_opLCVS
- {
- public AMI_MyClass_opLCVSI(List<CV> i)
- {
- _i = i;
- }
-
- public override void ice_response(List<CV> r, List<CV> o)
+ public void opLCVSI(Ice.AsyncResult result)
{
+ List<CV> i = (List<CV>)result.AsyncState;
+ List<CV> o;
+ List<CV> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLCVS(out o, result);
IEnumerator<CV> eo = o.GetEnumerator();
IEnumerator<CV> er = r.GetEnumerator();
- foreach(CV obj in _i)
+ foreach(CV obj in i)
{
eo.MoveNext();
er.MoveNext();
@@ -2065,32 +804,14 @@ public class TwowaysAMI
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private List<CV> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opCCVSI : Test.AMI_MyClass_opCCVS
- {
- public AMI_MyClass_opCCVSI(CCVS i)
- {
- _i = i;
- }
-
- public override void ice_response(CCVS r, CCVS o)
+ public void opCCVSI(Ice.AsyncResult result)
{
+ CCVS i = (CCVS)result.AsyncState;
+ CCVS o;
+ CCVS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCCVS(out o, result);
IEnumerator<CV> eo = (IEnumerator<CV>)o.GetEnumerator();
IEnumerator<CV> er = (IEnumerator<CV>)r.GetEnumerator();
- foreach(CV obj in _i)
+ foreach(CV obj in i)
{
eo.MoveNext();
er.MoveNext();
@@ -2100,200 +821,75 @@ public class TwowaysAMI
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opACVPrxSI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private CCVS _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opACVPrxSI : Test.AMI_MyClass_opACVPrxS
- {
- public AMI_MyClass_opACVPrxSI(CVPrx[] i)
- {
- _i = i;
- }
-
- public override void ice_response(CVPrx[] r, CVPrx[] o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ CVPrx[] i = (CVPrx[])result.AsyncState;
+ CVPrx[] o;
+ CVPrx[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opACVPrxS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private CVPrx[] _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opLCVPrxSI : Test.AMI_MyClass_opLCVPrxS
- {
- public AMI_MyClass_opLCVPrxSI(List<CVPrx> i)
+ public void opLCVPrxSI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(List<CVPrx> r, List<CVPrx> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ List<CVPrx> i = (List<CVPrx>)result.AsyncState;
+ List<CVPrx> o;
+ List<CVPrx> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLCVPrxS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opKCVPrxSI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private List<CVPrx> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opKCVPrxSI : Test.AMI_MyClass_opKCVPrxS
- {
- public AMI_MyClass_opKCVPrxSI(LinkedList<CVPrx> i)
- {
- _i = i;
- }
-
- public override void ice_response(LinkedList<CVPrx> r, LinkedList<CVPrx> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ LinkedList<CVPrx> i = (LinkedList<CVPrx>)result.AsyncState;
+ LinkedList<CVPrx> o;
+ LinkedList<CVPrx> r =
+ MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKCVPrxS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
+ public void opQCVPrxSI(Ice.AsyncResult result)
{
- callback.check();
- }
-
- private LinkedList<CVPrx> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opQCVPrxSI : Test.AMI_MyClass_opQCVPrxS
- {
- public AMI_MyClass_opQCVPrxSI(Queue<CVPrx> i)
- {
- _i = i;
- }
-
- public override void ice_response(Queue<CVPrx> r, Queue<CVPrx> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Queue<CVPrx> i = (Queue<CVPrx>)result.AsyncState;
+ Queue<CVPrx> o;
+ Queue<CVPrx> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQCVPrxS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Queue<CVPrx> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opSCVPrxSI : Test.AMI_MyClass_opSCVPrxS
- {
- public AMI_MyClass_opSCVPrxSI(Stack<CVPrx> i)
- {
- _i = i;
- }
-
- public override void ice_response(Stack<CVPrx> r, Stack<CVPrx> o)
+ public void opSCVPrxSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Stack<CVPrx> i = (Stack<CVPrx>)result.AsyncState;
+ Stack<CVPrx> o;
+ Stack<CVPrx> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSCVPrxS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Stack<CVPrx> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opCCVPrxSI : Test.AMI_MyClass_opCCVPrxS
- {
- public AMI_MyClass_opCCVPrxSI(CCVPrxS i)
- {
- _i = i;
- }
-
- public override void ice_response(CCVPrxS r, CCVPrxS o)
+ public void opCCVPrxSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ CCVPrxS i = (CCVPrxS)result.AsyncState;
+ CCVPrxS o;
+ CCVPrxS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCCVPrxS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private CCVPrxS _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opACRSI : Test.AMI_MyClass_opACRS
- {
- public AMI_MyClass_opACRSI(CR[] i)
- {
- _i = i;
- }
-
- public override void ice_response(CR[] r, CR[] o)
+ public void opACRSI(Ice.AsyncResult result)
{
+ CR[] i = (CR[])result.AsyncState;
+ CR[] o;
+ CR[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opACRS(out o, result);
System.Collections.IEnumerator eo = o.GetEnumerator();
System.Collections.IEnumerator er = r.GetEnumerator();
- foreach(CR obj in _i)
+ foreach(CR obj in i)
{
eo.MoveNext();
er.MoveNext();
@@ -2303,32 +899,14 @@ public class TwowaysAMI
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private CR[] _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opLCRSI : Test.AMI_MyClass_opLCRS
- {
- public AMI_MyClass_opLCRSI(List<CR> i)
- {
- _i = i;
- }
-
- public override void ice_response(List<CR> r, List<CR> o)
+ public void opLCRSI(Ice.AsyncResult result)
{
+ List<CR> i = (List<CR>)result.AsyncState;
+ List<CR> o;
+ List<CR> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLCRS(out o, result);
IEnumerator<CR> eo = o.GetEnumerator();
IEnumerator<CR> er = r.GetEnumerator();
- foreach(CR obj in _i)
+ foreach(CR obj in i)
{
eo.MoveNext();
er.MoveNext();
@@ -2338,32 +916,14 @@ public class TwowaysAMI
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private List<CR> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opCCRSI : Test.AMI_MyClass_opCCRS
- {
- public AMI_MyClass_opCCRSI(CCRS i)
- {
- _i = i;
- }
-
- public override void ice_response(CCRS r, CCRS o)
+ public void opCCRSI(Ice.AsyncResult result)
{
+ CCRS i = (CCRS)result.AsyncState;
+ CCRS o;
+ CCRS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCCRS(out o, result);
IEnumerator<CR> eo = (IEnumerator<CR>)o.GetEnumerator();
IEnumerator<CR> er = (IEnumerator<CR>)r.GetEnumerator();
- foreach(CR obj in _i)
+ foreach(CR obj in i)
{
eo.MoveNext();
er.MoveNext();
@@ -2373,228 +933,84 @@ public class TwowaysAMI
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private CCRS _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opAEnSI : Test.AMI_MyClass_opAEnS
- {
- public AMI_MyClass_opAEnSI(En[] i)
+ public void opAEnSI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(En[] r, En[] o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ En[] i = (En[])result.AsyncState;
+ En[] o;
+ En[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAEnS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private En[] _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opLEnSI : Test.AMI_MyClass_opLEnS
- {
- public AMI_MyClass_opLEnSI(List<En> i)
+ public void opLEnSI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(List<En> r, List<En> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ List<En> i = (List<En>)result.AsyncState;
+ List<En> o;
+ List<En> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLEnS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private List<En> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opKEnSI : Test.AMI_MyClass_opKEnS
- {
- public AMI_MyClass_opKEnSI(LinkedList<En> i)
- {
- _i = i;
- }
-
- public override void ice_response(LinkedList<En> r, LinkedList<En> o)
+ public void opKEnSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ LinkedList<En> i = (LinkedList<En>)result.AsyncState;
+ LinkedList<En> o;
+ LinkedList<En> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKEnS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
+ public void opQEnSI(Ice.AsyncResult result)
{
- callback.check();
- }
-
- private LinkedList<En> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opQEnSI : Test.AMI_MyClass_opQEnS
- {
- public AMI_MyClass_opQEnSI(Queue<En> i)
- {
- _i = i;
- }
-
- public override void ice_response(Queue<En> r, Queue<En> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Queue<En> i = (Queue<En>)result.AsyncState;
+ Queue<En> o;
+ Queue<En> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQEnS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Queue<En> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opSEnSI : Test.AMI_MyClass_opSEnS
- {
- public AMI_MyClass_opSEnSI(Stack<En> i)
+ public void opSEnSI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(Stack<En> r, Stack<En> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Stack<En> i = (Stack<En>)result.AsyncState;
+ Stack<En> o;
+ Stack<En> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSEnS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
+ public void opCEnSI(Ice.AsyncResult result)
{
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Stack<En> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opCEnSI : Test.AMI_MyClass_opCEnS
- {
- public AMI_MyClass_opCEnSI(CEnS i)
- {
- _i = i;
- }
-
- public override void ice_response(CEnS r, CEnS o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ CEnS i = (CEnS)result.AsyncState;
+ CEnS o;
+ CEnS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCEnS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private CEnS _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opCustomIntSI : Test.AMI_MyClass_opCustomIntS
- {
- public AMI_MyClass_opCustomIntSI(Custom<int> i)
- {
- _i = i;
- }
-
- public override void ice_response(Custom<int> r, Custom<int> o)
+ public void opCustomIntSI(Ice.AsyncResult result)
{
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Custom<int> i = (Custom<int>)result.AsyncState;
+ Custom<int> o;
+ Custom<int> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCustomIntS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Custom<int> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opCustomCVSI : Test.AMI_MyClass_opCustomCVS
- {
- public AMI_MyClass_opCustomCVSI(Custom<CV> i)
- {
- _i = i;
- }
-
- public override void ice_response(Custom<CV> r, Custom<CV> o)
+ public void opCustomCVSI(Ice.AsyncResult result)
{
+ Custom<CV> i = (Custom<CV>)result.AsyncState;
+ Custom<CV> o;
+ Custom<CV> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCustomCVS(out o, result);
IEnumerator<CV> eo = (IEnumerator<CV>)o.GetEnumerator();
IEnumerator<CV> er = (IEnumerator<CV>)r.GetEnumerator();
- foreach(CV obj in _i)
+ foreach(CV obj in i)
{
eo.MoveNext();
er.MoveNext();
@@ -2612,60 +1028,24 @@ public class TwowaysAMI
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Custom<CV> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opCustomIntSSI : Test.AMI_MyClass_opCustomIntSS
- {
- public AMI_MyClass_opCustomIntSSI(Custom<Custom<int>> i)
+ public void opCustomIntSSI(Ice.AsyncResult result)
{
- _i = i;
- }
-
- public override void ice_response(Custom<Custom<int>> r, Custom<Custom<int>> o)
- {
- test(Ice.CollectionComparer.Equals(_i, o));
- test(Ice.CollectionComparer.Equals(_i, r));
+ Custom<Custom<int>> i = (Custom<Custom<int>>)result.AsyncState;
+ Custom<Custom<int>> o;
+ Custom<Custom<int>> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCustomIntSS(out o, result);
+ test(Ice.CollectionComparer.Equals(i, o));
+ test(Ice.CollectionComparer.Equals(i, r));
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Custom<Custom<int>> _i;
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opCustomCVSSI : Test.AMI_MyClass_opCustomCVSS
- {
- public AMI_MyClass_opCustomCVSSI(Custom<Custom<CV>> i)
- {
- _i = i;
- }
-
- public override void ice_response(Custom<Custom<CV>> r, Custom<Custom<CV>> o)
+ public void opCustomCVSSI(Ice.AsyncResult result)
{
+ Custom<Custom<CV>> i = (Custom<Custom<CV>>)result.AsyncState;
+ Custom<Custom<CV>> o;
+ Custom<Custom<CV>> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCustomCVSS(out o, result);
IEnumerator<Custom<CV>> eo = (IEnumerator<Custom<CV>>)o.GetEnumerator();
IEnumerator<Custom<CV>> er = (IEnumerator<Custom<CV>>)r.GetEnumerator();
- foreach(Custom<CV> s in _i)
+ foreach(Custom<CV> s in i)
{
eo.MoveNext();
er.MoveNext();
@@ -2690,153 +1070,112 @@ public class TwowaysAMI
callback.called();
}
- public override void ice_exception(Ice.Exception ex)
- {
- test(false);
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Custom<Custom<CV>> _i;
- private Callback callback = new Callback();
- }
-
#if !COMPACT && !SILVERLIGHT
- private class AMI_MyClass_opSerialSmallCSharpNull : Test.AMI_MyClass_opSerialSmallCSharp
- {
- public AMI_MyClass_opSerialSmallCSharpNull()
- {
- }
-
- public override void ice_response(Serialize.Small r, Serialize.Small o)
+ public void opSerialSmallCSharpNullI(Ice.AsyncResult result)
{
- test(o == null);
- test(r == null);
- callback.called();
- }
-
- public override void ice_exception(Ice.Exception ex)
- {
- test(ex is Ice.OperationNotExistException); // OK, talking to non-C# server.
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opSerialSmallCSharp : Test.AMI_MyClass_opSerialSmallCSharp
- {
- public AMI_MyClass_opSerialSmallCSharp()
- {
- }
-
- public override void ice_response(Serialize.Small r, Serialize.Small o)
- {
- test(o.i == 99);
- test(r.i == 99);
- callback.called();
- }
-
- public override void ice_exception(Ice.Exception ex)
- {
- test(ex is Ice.OperationNotExistException); // OK, talking to non-C# server.
- }
-
- public virtual void check()
- {
- callback.check();
+ try
+ {
+ Serialize.Small o;
+ Serialize.Small r =
+ MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSerialSmallCSharp(out o, result);
+ test(o == null);
+ test(r == null);
+ callback.called();
+ }
+ catch(Ice.OperationNotExistException)
+ {
+ // OK, talking to non-C# server.
+ }
}
- private Callback callback = new Callback();
- }
-
- private class AMI_MyClass_opSerialLargeCSharp : Test.AMI_MyClass_opSerialLargeCSharp
- {
- public AMI_MyClass_opSerialLargeCSharp()
+ public void opSerialSmallCSharpI(Ice.AsyncResult result)
{
+ try
+ {
+ Serialize.Small o;
+ Serialize.Small r =
+ MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSerialSmallCSharp(out o, result);
+ test(o.i == 99);
+ test(r.i == 99);
+ callback.called();
+ }
+ catch(Ice.OperationNotExistException)
+ {
+ // OK, talking to non-C# server.
+ }
}
- public override void ice_response(Serialize.Large r, Serialize.Large o)
+ public void opSerialLargeCSharpI(Ice.AsyncResult result)
{
- 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();
+ try
+ {
+ Serialize.Large o;
+ Serialize.Large r =
+ MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSerialLargeCSharp(out o, result);
+ 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();
+ }
+ catch(Ice.OperationNotExistException)
+ {
+ // OK, talking to non-C# server.
+ }
}
- public override void ice_exception(Ice.Exception ex)
+ public void opSerialStructCSharpI(Ice.AsyncResult result)
{
- test(ex is Ice.OperationNotExistException); // OK, talking to non-C# server.
+ try
+ {
+ Serialize.Struct o;
+ Serialize.Struct r =
+ MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSerialStructCSharp(out o, result);
+ test(o.o == null);
+ test(o.o2 != null);
+ test(((Serialize.Struct)(o.o2)).o == null);
+ test(((Serialize.Struct)(o.o2)).o2 == o.o2);
+ test(o.s == null);
+ test(o.s2.Equals("Hello"));
+ test(r.o == null);
+ test(r.o2 != null);
+ test(((Serialize.Struct)(r.o2)).o == null);
+ test(((Serialize.Struct)(r.o2)).o2 == r.o2);
+ test(r.s == null);
+ test(r.s2.Equals("Hello"));
+ callback.called();
+ }
+ catch(Ice.OperationNotExistException)
+ {
+ // OK, talking to non-C# server.
+ }
}
+#endif
public virtual void check()
{
callback.check();
}
- private Callback callback = new Callback();
+ private CallbackBase callback = new CallbackBase();
}
- private class AMI_MyClass_opSerialStructCSharp : Test.AMI_MyClass_opSerialStructCSharp
- {
- public AMI_MyClass_opSerialStructCSharp()
- {
- }
-
- public override void ice_response(Serialize.Struct r, Serialize.Struct o)
- {
- test(o.o == null);
- test(o.o2 != null);
- test(((Serialize.Struct)(o.o2)).o == null);
- test(((Serialize.Struct)(o.o2)).o2 == o.o2);
- test(o.s == null);
- test(o.s2.Equals("Hello"));
- test(r.o == null);
- test(r.o2 != null);
- test(((Serialize.Struct)(r.o2)).o == null);
- test(((Serialize.Struct)(r.o2)).o2 == r.o2);
- test(r.s == null);
- test(r.s2.Equals("Hello"));
- callback.called();
- }
-
- public override void ice_exception(Ice.Exception ex)
- {
- test(ex is Ice.OperationNotExistException); // OK, talking to non-C# server.
- }
-
- public virtual void check()
- {
- callback.check();
- }
-
- private Callback callback = new Callback();
- }
-#endif
static int _length = 100;
@@ -2849,8 +1188,8 @@ public class TwowaysAMI
i[c] = (byte)c;
}
- AMI_MyClass_opAByteSI cb = new AMI_MyClass_opAByteSI(i);
- p.opAByteS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opAByteS(i, null, cb.opAByteSI, i);
cb.check();
}
@@ -2861,8 +1200,8 @@ public class TwowaysAMI
i.Add((byte)c);
}
- AMI_MyClass_opLByteSI cb = new AMI_MyClass_opLByteSI(i);
- p.opLByteS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opLByteS(i, null, cb.opLByteSI, i);
cb.check();
}
@@ -2873,8 +1212,8 @@ public class TwowaysAMI
i.AddLast((byte)c);
}
- AMI_MyClass_opKByteSI cb = new AMI_MyClass_opKByteSI(i);
- p.opKByteS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opKByteS(i, null, cb.opKByteSI, i);
cb.check();
}
@@ -2885,8 +1224,8 @@ public class TwowaysAMI
i.Enqueue((byte)c);
}
- AMI_MyClass_opQByteSI cb = new AMI_MyClass_opQByteSI(i);
- p.opQByteS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opQByteS(i, null, cb.opQByteSI, i);
cb.check();
}
@@ -2897,8 +1236,8 @@ public class TwowaysAMI
i.Push((byte)c);
}
- AMI_MyClass_opSByteSI cb = new AMI_MyClass_opSByteSI(i);
- p.opSByteS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opSByteS(i, null, cb.opSByteSI, i);
cb.check();
}
@@ -2909,8 +1248,8 @@ public class TwowaysAMI
i.Add((byte)c);
}
- AMI_MyClass_opCByteSI cb = new AMI_MyClass_opCByteSI(i);
- p.opCByteS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opCByteS(i, null, cb.opCByteSI, i);
cb.check();
}
@@ -2921,8 +1260,8 @@ public class TwowaysAMI
i[c] = c % 1 == 1;
}
- AMI_MyClass_opABoolSI cb = new AMI_MyClass_opABoolSI(i);
- p.opABoolS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opABoolS(i, null, cb.opABoolSI, i);
cb.check();
}
@@ -2933,8 +1272,8 @@ public class TwowaysAMI
i.Add(c % 1 == 1);
}
- AMI_MyClass_opLBoolSI cb = new AMI_MyClass_opLBoolSI(i);
- p.opLBoolS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opLBoolS(i, null, cb.opLBoolSI, i);
cb.check();
}
@@ -2945,8 +1284,8 @@ public class TwowaysAMI
i.AddLast(c % 1 == 1);
}
- AMI_MyClass_opKBoolSI cb = new AMI_MyClass_opKBoolSI(i);
- p.opKBoolS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opKBoolS(i, null, cb.opKBoolSI, i);
cb.check();
}
@@ -2957,8 +1296,8 @@ public class TwowaysAMI
i.Enqueue(c % 1 == 1);
}
- AMI_MyClass_opQBoolSI cb = new AMI_MyClass_opQBoolSI(i);
- p.opQBoolS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opQBoolS(i, null, cb.opQBoolSI, i);
cb.check();
}
@@ -2969,8 +1308,8 @@ public class TwowaysAMI
i.Push(c % 1 == 1);
}
- AMI_MyClass_opSBoolSI cb = new AMI_MyClass_opSBoolSI(i);
- p.opSBoolS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opSBoolS(i, null, cb.opSBoolSI, i);
cb.check();
}
@@ -2981,8 +1320,8 @@ public class TwowaysAMI
i.Add(c % 1 == 1);
}
- AMI_MyClass_opCBoolSI cb = new AMI_MyClass_opCBoolSI(i);
- p.opCBoolS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opCBoolS(i, null, cb.opCBoolSI, i);
cb.check();
}
@@ -2993,8 +1332,8 @@ public class TwowaysAMI
i[c] = (short)c;
}
- AMI_MyClass_opAShortSI cb = new AMI_MyClass_opAShortSI(i);
- p.opAShortS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opAShortS(i, null, cb.opAShortSI, i);
cb.check();
}
@@ -3005,8 +1344,8 @@ public class TwowaysAMI
i.Add((short)c);
}
- AMI_MyClass_opLShortSI cb = new AMI_MyClass_opLShortSI(i);
- p.opLShortS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opLShortS(i, null, cb.opLShortSI, i);
cb.check();
}
@@ -3017,8 +1356,8 @@ public class TwowaysAMI
i.AddLast((short)c);
}
- AMI_MyClass_opKShortSI cb = new AMI_MyClass_opKShortSI(i);
- p.opKShortS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opKShortS(i, null, cb.opKShortSI, i);
cb.check();
}
@@ -3029,8 +1368,8 @@ public class TwowaysAMI
i.Enqueue((short)c);
}
- AMI_MyClass_opQShortSI cb = new AMI_MyClass_opQShortSI(i);
- p.opQShortS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opQShortS(i, null, cb.opQShortSI, i);
cb.check();
}
@@ -3041,8 +1380,8 @@ public class TwowaysAMI
i.Push((short)c);
}
- AMI_MyClass_opSShortSI cb = new AMI_MyClass_opSShortSI(i);
- p.opSShortS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opSShortS(i, null, cb.opSShortSI, i);
cb.check();
}
@@ -3053,8 +1392,8 @@ public class TwowaysAMI
i.Add((short)c);
}
- AMI_MyClass_opCShortSI cb = new AMI_MyClass_opCShortSI(i);
- p.opCShortS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opCShortS(i, null, cb.opCShortSI, i);
cb.check();
}
@@ -3065,8 +1404,8 @@ public class TwowaysAMI
i[c] = (int)c;
}
- AMI_MyClass_opAIntSI cb = new AMI_MyClass_opAIntSI(i);
- p.opAIntS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opAIntS(i, null, cb.opAIntSI, i);
cb.check();
}
@@ -3077,8 +1416,8 @@ public class TwowaysAMI
i.Add((int)c);
}
- AMI_MyClass_opLIntSI cb = new AMI_MyClass_opLIntSI(i);
- p.opLIntS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opLIntS(i, null, cb.opLIntSI, i);
cb.check();
}
@@ -3089,8 +1428,8 @@ public class TwowaysAMI
i.AddLast((int)c);
}
- AMI_MyClass_opKIntSI cb = new AMI_MyClass_opKIntSI(i);
- p.opKIntS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opKIntS(i, null, cb.opKIntSI, i);
cb.check();
}
@@ -3101,8 +1440,8 @@ public class TwowaysAMI
i.Enqueue((int)c);
}
- AMI_MyClass_opQIntSI cb = new AMI_MyClass_opQIntSI(i);
- p.opQIntS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opQIntS(i, null, cb.opQIntSI, i);
cb.check();
}
@@ -3113,8 +1452,8 @@ public class TwowaysAMI
i.Push((int)c);
}
- AMI_MyClass_opSIntSI cb = new AMI_MyClass_opSIntSI(i);
- p.opSIntS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opSIntS(i, null, cb.opSIntSI, i);
cb.check();
}
@@ -3125,8 +1464,8 @@ public class TwowaysAMI
i.Add((int)c);
}
- AMI_MyClass_opCIntSI cb = new AMI_MyClass_opCIntSI(i);
- p.opCIntS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opCIntS(i, null, cb.opCIntSI, i);
cb.check();
}
@@ -3137,8 +1476,8 @@ public class TwowaysAMI
i[c] = (long)c;
}
- AMI_MyClass_opALongSI cb = new AMI_MyClass_opALongSI(i);
- p.opALongS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opALongS(i, null, cb.opALongSI, i);
cb.check();
}
@@ -3149,8 +1488,8 @@ public class TwowaysAMI
i.Add((long)c);
}
- AMI_MyClass_opLLongSI cb = new AMI_MyClass_opLLongSI(i);
- p.opLLongS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opLLongS(i, null, cb.opLLongSI, i);
cb.check();
}
@@ -3161,8 +1500,8 @@ public class TwowaysAMI
i.AddLast((long)c);
}
- AMI_MyClass_opKLongSI cb = new AMI_MyClass_opKLongSI(i);
- p.opKLongS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opKLongS(i, null, cb.opKLongSI, i);
cb.check();
}
@@ -3173,8 +1512,8 @@ public class TwowaysAMI
i.Enqueue((long)c);
}
- AMI_MyClass_opQLongSI cb = new AMI_MyClass_opQLongSI(i);
- p.opQLongS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opQLongS(i, null, cb.opQLongSI, i);
cb.check();
}
@@ -3185,8 +1524,8 @@ public class TwowaysAMI
i.Push((long)c);
}
- AMI_MyClass_opSLongSI cb = new AMI_MyClass_opSLongSI(i);
- p.opSLongS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opSLongS(i, null, cb.opSLongSI, i);
cb.check();
}
@@ -3197,8 +1536,8 @@ public class TwowaysAMI
i.Add((long)c);
}
- AMI_MyClass_opCLongSI cb = new AMI_MyClass_opCLongSI(i);
- p.opCLongS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opCLongS(i, null, cb.opCLongSI, i);
cb.check();
}
@@ -3209,8 +1548,8 @@ public class TwowaysAMI
i[c] = (float)c;
}
- AMI_MyClass_opAFloatSI cb = new AMI_MyClass_opAFloatSI(i);
- p.opAFloatS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opAFloatS(i, null, cb.opAFloatSI, i);
cb.check();
}
@@ -3221,8 +1560,8 @@ public class TwowaysAMI
i.Add((float)c);
}
- AMI_MyClass_opLFloatSI cb = new AMI_MyClass_opLFloatSI(i);
- p.opLFloatS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opLFloatS(i, null, cb.opLFloatSI, i);
cb.check();
}
@@ -3233,8 +1572,8 @@ public class TwowaysAMI
i.AddLast((float)c);
}
- AMI_MyClass_opKFloatSI cb = new AMI_MyClass_opKFloatSI(i);
- p.opKFloatS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opKFloatS(i, null, cb.opKFloatSI, i);
cb.check();
}
@@ -3245,8 +1584,8 @@ public class TwowaysAMI
i.Enqueue((float)c);
}
- AMI_MyClass_opQFloatSI cb = new AMI_MyClass_opQFloatSI(i);
- p.opQFloatS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opQFloatS(i, null, cb.opQFloatSI, i);
cb.check();
}
@@ -3257,8 +1596,8 @@ public class TwowaysAMI
i.Push((float)c);
}
- AMI_MyClass_opSFloatSI cb = new AMI_MyClass_opSFloatSI(i);
- p.opSFloatS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opSFloatS(i, null, cb.opSFloatSI, i);
cb.check();
}
@@ -3269,8 +1608,8 @@ public class TwowaysAMI
i.Add((float)c);
}
- AMI_MyClass_opCFloatSI cb = new AMI_MyClass_opCFloatSI(i);
- p.opCFloatS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opCFloatS(i, null, cb.opCFloatSI, i);
cb.check();
}
@@ -3281,8 +1620,8 @@ public class TwowaysAMI
i[c] = (double)c;
}
- AMI_MyClass_opADoubleSI cb = new AMI_MyClass_opADoubleSI(i);
- p.opADoubleS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opADoubleS(i, null, cb.opADoubleSI, i);
cb.check();
}
@@ -3293,8 +1632,8 @@ public class TwowaysAMI
i.Add((double)c);
}
- AMI_MyClass_opLDoubleSI cb = new AMI_MyClass_opLDoubleSI(i);
- p.opLDoubleS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opLDoubleS(i, null, cb.opLDoubleSI, i);
cb.check();
}
@@ -3305,8 +1644,8 @@ public class TwowaysAMI
i.AddLast((double)c);
}
- AMI_MyClass_opKDoubleSI cb = new AMI_MyClass_opKDoubleSI(i);
- p.opKDoubleS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opKDoubleS(i, null, cb.opKDoubleSI, i);
cb.check();
}
@@ -3317,8 +1656,8 @@ public class TwowaysAMI
i.Enqueue((double)c);
}
- AMI_MyClass_opQDoubleSI cb = new AMI_MyClass_opQDoubleSI(i);
- p.opQDoubleS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opQDoubleS(i, null, cb.opQDoubleSI, i);
cb.check();
}
@@ -3329,8 +1668,8 @@ public class TwowaysAMI
i.Push((double)c);
}
- AMI_MyClass_opSDoubleSI cb = new AMI_MyClass_opSDoubleSI(i);
- p.opSDoubleS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opSDoubleS(i, null, cb.opSDoubleSI, i);
cb.check();
}
@@ -3341,8 +1680,8 @@ public class TwowaysAMI
i.Add((double)c);
}
- AMI_MyClass_opCDoubleSI cb = new AMI_MyClass_opCDoubleSI(i);
- p.opCDoubleS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opCDoubleS(i, null, cb.opCDoubleSI, i);
cb.check();
}
@@ -3353,8 +1692,8 @@ public class TwowaysAMI
i[c] = c.ToString();
}
- AMI_MyClass_opAStringSI cb = new AMI_MyClass_opAStringSI(i);
- p.opAStringS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opAStringS(i, null, cb.opAStringSI, i);
cb.check();
}
@@ -3365,8 +1704,8 @@ public class TwowaysAMI
i.Add(c.ToString());
}
- AMI_MyClass_opLStringSI cb = new AMI_MyClass_opLStringSI(i);
- p.opLStringS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opLStringS(i, null, cb.opLStringSI, i);
cb.check();
}
@@ -3377,8 +1716,8 @@ public class TwowaysAMI
i.AddLast(c.ToString());
}
- AMI_MyClass_opKStringSI cb = new AMI_MyClass_opKStringSI(i);
- p.opKStringS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opKStringS(i, null, cb.opKStringSI, i);
cb.check();
}
@@ -3389,8 +1728,8 @@ public class TwowaysAMI
i.Enqueue(c.ToString());
}
- AMI_MyClass_opQStringSI cb = new AMI_MyClass_opQStringSI(i);
- p.opQStringS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opQStringS(i, null, cb.opQStringSI, i);
cb.check();
}
@@ -3401,8 +1740,8 @@ public class TwowaysAMI
i.Push(c.ToString());
}
- AMI_MyClass_opSStringSI cb = new AMI_MyClass_opSStringSI(i);
- p.opSStringS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opSStringS(i, null, cb.opSStringSI, i);
cb.check();
}
@@ -3413,8 +1752,8 @@ public class TwowaysAMI
i.Add(c.ToString());
}
- AMI_MyClass_opCStringSI cb = new AMI_MyClass_opCStringSI(i);
- p.opCStringS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opCStringS(i, null, cb.opCStringSI, i);
cb.check();
}
@@ -3425,8 +1764,8 @@ public class TwowaysAMI
i[c] = new CV(c);
}
- AMI_MyClass_opAObjectSI cb = new AMI_MyClass_opAObjectSI(i);
- p.opAObjectS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opAObjectS(i, null, cb.opAObjectSI, i);
cb.check();
}
@@ -3437,8 +1776,8 @@ public class TwowaysAMI
i.Add(new CV(c));
}
- AMI_MyClass_opLObjectSI cb = new AMI_MyClass_opLObjectSI(i);
- p.opLObjectS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opLObjectS(i, null, cb.opLObjectSI, i);
cb.check();
}
@@ -3449,8 +1788,8 @@ public class TwowaysAMI
i.Add(new CV(c));
}
- AMI_MyClass_opCObjectSI cb = new AMI_MyClass_opCObjectSI(i);
- p.opCObjectS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opCObjectS(i, null, cb.opCObjectSI, i);
cb.check();
}
@@ -3461,8 +1800,8 @@ public class TwowaysAMI
i[c] = communicator.stringToProxy(c.ToString());
}
- AMI_MyClass_opAObjectPrxSI cb = new AMI_MyClass_opAObjectPrxSI(i);
- p.opAObjectPrxS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opAObjectPrxS(i, null, cb.opAObjectPrxSI, i);
cb.check();
}
@@ -3473,8 +1812,8 @@ public class TwowaysAMI
i.Add(communicator.stringToProxy(c.ToString()));
}
- AMI_MyClass_opLObjectPrxSI cb = new AMI_MyClass_opLObjectPrxSI(i);
- p.opLObjectPrxS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opLObjectPrxS(i, null, cb.opLObjectPrxSI, i);
cb.check();
}
@@ -3485,8 +1824,8 @@ public class TwowaysAMI
i.AddLast(communicator.stringToProxy(c.ToString()));
}
- AMI_MyClass_opKObjectPrxSI cb = new AMI_MyClass_opKObjectPrxSI(i);
- p.opKObjectPrxS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opKObjectPrxS(i, null, cb.opKObjectPrxSI, i);
cb.check();
}
@@ -3497,8 +1836,8 @@ public class TwowaysAMI
i.Enqueue(communicator.stringToProxy(c.ToString()));
}
- AMI_MyClass_opQObjectPrxSI cb = new AMI_MyClass_opQObjectPrxSI(i);
- p.opQObjectPrxS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opQObjectPrxS(i, null, cb.opQObjectPrxSI, i);
cb.check();
}
@@ -3509,8 +1848,8 @@ public class TwowaysAMI
i.Push(communicator.stringToProxy(c.ToString()));
}
- AMI_MyClass_opSObjectPrxSI cb = new AMI_MyClass_opSObjectPrxSI(i);
- p.opSObjectPrxS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opSObjectPrxS(i, null, cb.opSObjectPrxSI, i);
cb.check();
}
@@ -3521,8 +1860,8 @@ public class TwowaysAMI
i.Add(communicator.stringToProxy(c.ToString()));
}
- AMI_MyClass_opCObjectPrxSI cb = new AMI_MyClass_opCObjectPrxSI(i);
- p.opCObjectPrxS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opCObjectPrxS(i, null, cb.opCObjectPrxSI, i);
cb.check();
}
@@ -3533,8 +1872,8 @@ public class TwowaysAMI
i[c].i = c;
}
- AMI_MyClass_opAStructSI cb = new AMI_MyClass_opAStructSI(i);
- p.opAStructS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opAStructS(i, null, cb.opAStructSI, i);
cb.check();
}
@@ -3545,8 +1884,8 @@ public class TwowaysAMI
i.Add(new S(c));
}
- AMI_MyClass_opLStructSI cb = new AMI_MyClass_opLStructSI(i);
- p.opLStructS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opLStructS(i, null, cb.opLStructSI, i);
cb.check();
}
@@ -3557,8 +1896,8 @@ public class TwowaysAMI
i.AddLast(new S(c));
}
- AMI_MyClass_opKStructSI cb = new AMI_MyClass_opKStructSI(i);
- p.opKStructS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opKStructS(i, null, cb.opKStructSI, i);
cb.check();
}
@@ -3569,8 +1908,8 @@ public class TwowaysAMI
i.Enqueue(new S(c));
}
- AMI_MyClass_opQStructSI cb = new AMI_MyClass_opQStructSI(i);
- p.opQStructS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opQStructS(i, null, cb.opQStructSI, i);
cb.check();
}
@@ -3581,8 +1920,8 @@ public class TwowaysAMI
i.Push(new S(c));
}
- AMI_MyClass_opSStructSI cb = new AMI_MyClass_opSStructSI(i);
- p.opSStructS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opSStructS(i, null, cb.opSStructSI, i);
cb.check();
}
@@ -3593,80 +1932,8 @@ public class TwowaysAMI
i.Add(new S(c));
}
- AMI_MyClass_opCStructSI cb = new AMI_MyClass_opCStructSI(i);
- p.opCStructS_async(cb, i);
- cb.check();
- }
-
- {
- SD[] i = new SD[_length];
- for(int c = 0; c < _length; ++c)
- {
- i[c] = new SD(c);
- }
-
- AMI_MyClass_opAStructSDI cb = new AMI_MyClass_opAStructSDI(i);
- p.opAStructSD_async(cb, i);
- cb.check();
- }
-
- {
- List<SD> i = new List<SD>();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(new SD(c));
- }
-
- AMI_MyClass_opLStructSDI cb = new AMI_MyClass_opLStructSDI(i);
- p.opLStructSD_async(cb, i);
- cb.check();
- }
-
- {
- LinkedList<SD> i = new LinkedList<SD>();
- for(int c = 0; c < _length; ++c)
- {
- i.AddLast(new SD(c));
- }
-
- AMI_MyClass_opKStructSDI cb = new AMI_MyClass_opKStructSDI(i);
- p.opKStructSD_async(cb, i);
- cb.check();
- }
-
- {
- Queue<SD> i = new Queue<SD>();
- for(int c = 0; c < _length; ++c)
- {
- i.Enqueue(new SD(c));
- }
-
- AMI_MyClass_opQStructSDI cb = new AMI_MyClass_opQStructSDI(i);
- p.opQStructSD_async(cb, i);
- cb.check();
- }
-
- {
- Stack<SD> i = new Stack<SD>();
- for(int c = 0; c < _length; ++c)
- {
- i.Push(new SD(c));
- }
-
- AMI_MyClass_opSStructSDI cb = new AMI_MyClass_opSStructSDI(i);
- p.opSStructSD_async(cb, i);
- cb.check();
- }
-
- {
- CStructSD i = new CStructSD();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(new SD(c));
- }
-
- AMI_MyClass_opCStructSDI cb = new AMI_MyClass_opCStructSDI(i);
- p.opCStructSD_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opCStructS(i, null, cb.opCStructSI, i);
cb.check();
}
@@ -3677,8 +1944,8 @@ public class TwowaysAMI
i[c] = new CV(c);
}
- AMI_MyClass_opACVSI cb = new AMI_MyClass_opACVSI(i);
- p.opACVS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opACVS(i, null, cb.opACVSI, i);
cb.check();
}
@@ -3689,8 +1956,8 @@ public class TwowaysAMI
i.Add(new CV(c));
}
- AMI_MyClass_opLCVSI cb = new AMI_MyClass_opLCVSI(i);
- p.opLCVS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opLCVS(i, null, cb.opLCVSI, i);
cb.check();
}
@@ -3701,8 +1968,8 @@ public class TwowaysAMI
i.Add(new CV(c));
}
- AMI_MyClass_opCCVSI cb = new AMI_MyClass_opCCVSI(i);
- p.opCCVS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opCCVS(i, null, cb.opCCVSI, i);
cb.check();
}
@@ -3713,8 +1980,8 @@ public class TwowaysAMI
i[c] = CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString()));
}
- AMI_MyClass_opACVPrxSI cb = new AMI_MyClass_opACVPrxSI(i);
- p.opACVPrxS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opACVPrxS(i, null, cb.opACVPrxSI, i);
cb.check();
}
@@ -3725,8 +1992,8 @@ public class TwowaysAMI
i.Add(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
}
- AMI_MyClass_opLCVPrxSI cb = new AMI_MyClass_opLCVPrxSI(i);
- p.opLCVPrxS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opLCVPrxS(i, null, cb.opLCVPrxSI, i);
cb.check();
}
@@ -3737,8 +2004,8 @@ public class TwowaysAMI
i.AddLast(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
}
- AMI_MyClass_opKCVPrxSI cb = new AMI_MyClass_opKCVPrxSI(i);
- p.opKCVPrxS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opKCVPrxS(i, null, cb.opKCVPrxSI, i);
cb.check();
}
@@ -3749,8 +2016,8 @@ public class TwowaysAMI
i.Enqueue(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
}
- AMI_MyClass_opQCVPrxSI cb = new AMI_MyClass_opQCVPrxSI(i);
- p.opQCVPrxS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opQCVPrxS(i, null, cb.opQCVPrxSI, i);
cb.check();
}
@@ -3761,8 +2028,8 @@ public class TwowaysAMI
i.Push(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
}
- AMI_MyClass_opSCVPrxSI cb = new AMI_MyClass_opSCVPrxSI(i);
- p.opSCVPrxS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opSCVPrxS(i, null, cb.opSCVPrxSI, i);
cb.check();
}
@@ -3773,8 +2040,8 @@ public class TwowaysAMI
i.Add(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
}
- AMI_MyClass_opCCVPrxSI cb = new AMI_MyClass_opCCVPrxSI(i);
- p.opCCVPrxS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opCCVPrxS(i, null, cb.opCCVPrxSI, i);
cb.check();
}
@@ -3785,8 +2052,8 @@ public class TwowaysAMI
i[c] = new CR(new CV(c));
}
- AMI_MyClass_opACRSI cb = new AMI_MyClass_opACRSI(i);
- p.opACRS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opACRS(i, null, cb.opACRSI, i);
cb.check();
}
@@ -3797,8 +2064,8 @@ public class TwowaysAMI
i.Add(new CR(new CV(c)));
}
- AMI_MyClass_opLCRSI cb = new AMI_MyClass_opLCRSI(i);
- p.opLCRS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opLCRS(i, null, cb.opLCRSI, i);
cb.check();
}
@@ -3809,8 +2076,8 @@ public class TwowaysAMI
i.Add(new CR(new CV(c)));
}
- AMI_MyClass_opCCRSI cb = new AMI_MyClass_opCCRSI(i);
- p.opCCRS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opCCRS(i, null, cb.opCCRSI, i);
cb.check();
}
@@ -3821,8 +2088,8 @@ public class TwowaysAMI
i[c] = (En)(c % 3);
}
- AMI_MyClass_opAEnSI cb = new AMI_MyClass_opAEnSI(i);
- p.opAEnS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opAEnS(i, null, cb.opAEnSI, i);
cb.check();
}
@@ -3833,8 +2100,8 @@ public class TwowaysAMI
i.Add((En)(c % 3));
}
- AMI_MyClass_opLEnSI cb = new AMI_MyClass_opLEnSI(i);
- p.opLEnS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opLEnS(i, null, cb.opLEnSI, i);
cb.check();
}
@@ -3845,8 +2112,8 @@ public class TwowaysAMI
i.AddLast((En)(c % 3));
}
- AMI_MyClass_opKEnSI cb = new AMI_MyClass_opKEnSI(i);
- p.opKEnS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opKEnS(i, null, cb.opKEnSI, i);
cb.check();
}
@@ -3857,8 +2124,8 @@ public class TwowaysAMI
i.Enqueue((En)(c % 3));
}
- AMI_MyClass_opQEnSI cb = new AMI_MyClass_opQEnSI(i);
- p.opQEnS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opQEnS(i, null, cb.opQEnSI, i);
cb.check();
}
@@ -3869,8 +2136,8 @@ public class TwowaysAMI
i.Push((En)(c % 3));
}
- AMI_MyClass_opSEnSI cb = new AMI_MyClass_opSEnSI(i);
- p.opSEnS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opSEnS(i, null, cb.opSEnSI, i);
cb.check();
}
@@ -3881,8 +2148,8 @@ public class TwowaysAMI
i.Add((En)(c % 3));
}
- AMI_MyClass_opCEnSI cb = new AMI_MyClass_opCEnSI(i);
- p.opCEnS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opCEnS(i, null, cb.opCEnSI, i);
cb.check();
}
@@ -3893,8 +2160,8 @@ public class TwowaysAMI
i.Add(c);
}
- AMI_MyClass_opCustomIntSI cb = new AMI_MyClass_opCustomIntSI(i);
- p.opCustomIntS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opCustomIntS(i, null, cb.opCustomIntSI, i);
cb.check();
}
@@ -3905,8 +2172,8 @@ public class TwowaysAMI
i.Add(new CV(c));
}
- AMI_MyClass_opCustomCVSI cb = new AMI_MyClass_opCustomCVSI(i);
- p.opCustomCVS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opCustomCVS(i, null, cb.opCustomCVSI, i);
cb.check();
}
@@ -3922,8 +2189,8 @@ public class TwowaysAMI
i.Add(inner);
}
- AMI_MyClass_opCustomIntSSI cb = new AMI_MyClass_opCustomIntSSI(i);
- p.opCustomIntSS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opCustomIntSS(i, null, cb.opCustomIntSSI, i);
cb.check();
}
@@ -3939,8 +2206,8 @@ public class TwowaysAMI
i.Add(inner);
}
- AMI_MyClass_opCustomCVSSI cb = new AMI_MyClass_opCustomCVSSI(i);
- p.opCustomCVSS_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opCustomCVSS(i, null, cb.opCustomCVSSI, i);
cb.check();
}
@@ -3948,8 +2215,8 @@ public class TwowaysAMI
{
Serialize.Small i = null;
- AMI_MyClass_opSerialSmallCSharpNull cb = new AMI_MyClass_opSerialSmallCSharpNull();
- p.opSerialSmallCSharp_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opSerialSmallCSharp(i, null, cb.opSerialSmallCSharpNullI, i);
cb.check();
}
@@ -3957,8 +2224,8 @@ public class TwowaysAMI
Serialize.Small i = new Serialize.Small();
i.i = 99;
- AMI_MyClass_opSerialSmallCSharp cb = new AMI_MyClass_opSerialSmallCSharp();
- p.opSerialSmallCSharp_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opSerialSmallCSharp(i, null, cb.opSerialSmallCSharpI, i);
cb.check();
}
@@ -3975,8 +2242,8 @@ public class TwowaysAMI
i.d9 = 9.0;
i.d10 = 10.0;
- AMI_MyClass_opSerialLargeCSharp cb = new AMI_MyClass_opSerialLargeCSharp();
- p.opSerialLargeCSharp_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opSerialLargeCSharp(i, null, cb.opSerialLargeCSharpI, i);
cb.check();
}
@@ -3987,8 +2254,8 @@ public class TwowaysAMI
i.s = null;
i.s2 = "Hello";
- AMI_MyClass_opSerialStructCSharp cb = new AMI_MyClass_opSerialStructCSharp();
- p.opSerialStructCSharp_async(cb, i);
+ Callback cb = new Callback();
+ p.begin_opSerialStructCSharp(i, null, cb.opSerialStructCSharpI, i);
cb.check();
}
#endif
diff --git a/cs/test/Ice/seqMapping/TwowaysNewAMI.cs b/cs/test/Ice/seqMapping/TwowaysNewAMI.cs
deleted file mode 100644
index 63c3fdcec67..00000000000
--- a/cs/test/Ice/seqMapping/TwowaysNewAMI.cs
+++ /dev/null
@@ -1,2263 +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.
-//
-// **********************************************************************
-
-using System;
-using System.Diagnostics;
-using System.Threading;
-using System.Collections.Generic;
-using Test;
-
-public class TwowaysNewAMI
-{
- private static void test(bool b)
- {
- if(!b)
- {
- throw new System.SystemException();
- }
- }
-
- private class CallbackBase
- {
- internal CallbackBase()
- {
- _called = false;
- }
-
- public virtual void check()
- {
- lock(this)
- {
- while(!_called)
- {
- System.Threading.Monitor.Wait(this);
- }
-
- _called = false;
- }
- }
-
- public virtual void called()
- {
- lock(this)
- {
- Debug.Assert(!_called);
- _called = true;
- System.Threading.Monitor.Pulse(this);
- }
- }
-
- private bool _called;
- }
-
- private class Callback
- {
- public void opAByteSI(Ice.AsyncResult result)
- {
- byte[] i = (byte[])result.AsyncState;
- byte[] o;
- byte[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAByteS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opLByteSI(Ice.AsyncResult result)
- {
- List<byte> i = (List<byte>)result.AsyncState;
- List<byte> o;
- List<byte> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLByteS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opKByteSI(Ice.AsyncResult result)
- {
- LinkedList<byte> i = (LinkedList<byte>)result.AsyncState;
- LinkedList<byte> o;
- LinkedList<byte> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKByteS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opQByteSI(Ice.AsyncResult result)
- {
- Queue<byte> i = (Queue<byte>)result.AsyncState;
- Queue<byte> o;
- Queue<byte> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQByteS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opSByteSI(Ice.AsyncResult result)
- {
- Stack<byte> i = (Stack<byte>)result.AsyncState;
- Stack<byte> o;
- Stack<byte> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSByteS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opCByteSI(Ice.AsyncResult result)
- {
- CByteS i = (CByteS)result.AsyncState;
- CByteS o;
- CByteS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCByteS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opABoolSI(Ice.AsyncResult result)
- {
- bool[] i = (bool[])result.AsyncState;
- bool[] o;
- bool[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opABoolS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opLBoolSI(Ice.AsyncResult result)
- {
- List<bool> i = (List<bool>)result.AsyncState;
- List<bool> o;
- List<bool> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLBoolS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opKBoolSI(Ice.AsyncResult result)
- {
- LinkedList<bool> i = (LinkedList<bool>)result.AsyncState;
- LinkedList<bool> o;
- LinkedList<bool> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKBoolS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opQBoolSI(Ice.AsyncResult result)
- {
- Queue<bool> i = (Queue<bool>)result.AsyncState;
- Queue<bool> o;
- Queue<bool> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQBoolS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opSBoolSI(Ice.AsyncResult result)
- {
- Stack<bool> i = (Stack<bool>)result.AsyncState;
- Stack<bool> o;
- Stack<bool> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSBoolS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opCBoolSI(Ice.AsyncResult result)
- {
- CBoolS i = (CBoolS)result.AsyncState;
- CBoolS o;
- CBoolS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCBoolS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opAShortSI(Ice.AsyncResult result)
- {
- short[] i = (short[])result.AsyncState;
- short[] o;
- short[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAShortS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opLShortSI(Ice.AsyncResult result)
- {
- List<short> i = (List<short>)result.AsyncState;
- List<short> o;
- List<short> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLShortS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opKShortSI(Ice.AsyncResult result)
- {
- LinkedList<short> i = (LinkedList<short>)result.AsyncState;
- LinkedList<short> o;
- LinkedList<short> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKShortS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opQShortSI(Ice.AsyncResult result)
- {
- Queue<short> i = (Queue<short>)result.AsyncState;
- Queue<short> o;
- Queue<short> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQShortS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opSShortSI(Ice.AsyncResult result)
- {
- Stack<short> i = (Stack<short>)result.AsyncState;
- Stack<short> o;
- Stack<short> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSShortS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opCShortSI(Ice.AsyncResult result)
- {
- CShortS i = (CShortS)result.AsyncState;
- CShortS o;
- CShortS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCShortS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opAIntSI(Ice.AsyncResult result)
- {
- int[] i = (int[])result.AsyncState;
- int[] o;
- int[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAIntS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opLIntSI(Ice.AsyncResult result)
- {
- List<int> i = (List<int>)result.AsyncState;
- List<int> o;
- List<int> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLIntS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opKIntSI(Ice.AsyncResult result)
- {
- LinkedList<int> i = (LinkedList<int>)result.AsyncState;
- LinkedList<int> o;
- LinkedList<int> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKIntS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opQIntSI(Ice.AsyncResult result)
- {
- Queue<int> i = (Queue<int>)result.AsyncState;
- Queue<int> o;
- Queue<int> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQIntS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opSIntSI(Ice.AsyncResult result)
- {
- Stack<int> i = (Stack<int>)result.AsyncState;
- Stack<int> o;
- Stack<int> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSIntS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opCIntSI(Ice.AsyncResult result)
- {
- CIntS i = (CIntS)result.AsyncState;
- CIntS o;
- CIntS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCIntS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opALongSI(Ice.AsyncResult result)
- {
- long[] i = (long[])result.AsyncState;
- long[] o;
- long[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opALongS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opLLongSI(Ice.AsyncResult result)
- {
- List<long> i = (List<long>)result.AsyncState;
- List<long> o;
- List<long> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLLongS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opKLongSI(Ice.AsyncResult result)
- {
- LinkedList<long> i = (LinkedList<long>)result.AsyncState;
- LinkedList<long> o;
- LinkedList<long> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKLongS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opQLongSI(Ice.AsyncResult result)
- {
- Queue<long> i = (Queue<long>)result.AsyncState;
- Queue<long> o;
- Queue<long> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQLongS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opSLongSI(Ice.AsyncResult result)
- {
- Stack<long> i = (Stack<long>)result.AsyncState;
- Stack<long> o;
- Stack<long> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSLongS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opCLongSI(Ice.AsyncResult result)
- {
- CLongS i = (CLongS)result.AsyncState;
- CLongS o;
- CLongS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCLongS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opAFloatSI(Ice.AsyncResult result)
- {
- float[] i = (float[])result.AsyncState;
- float[] o;
- float[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAFloatS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opLFloatSI(Ice.AsyncResult result)
- {
- List<float> i = (List<float>)result.AsyncState;
- List<float> o;
- List<float> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLFloatS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opKFloatSI(Ice.AsyncResult result)
- {
- LinkedList<float> i = (LinkedList<float>)result.AsyncState;
- LinkedList<float> o;
- LinkedList<float> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKFloatS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opQFloatSI(Ice.AsyncResult result)
- {
- Queue<float> i = (Queue<float>)result.AsyncState;
- Queue<float> o;
- Queue<float> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQFloatS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opSFloatSI(Ice.AsyncResult result)
- {
- Stack<float> i = (Stack<float>)result.AsyncState;
- Stack<float> o;
- Stack<float> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSFloatS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opCFloatSI(Ice.AsyncResult result)
- {
- CFloatS i = (CFloatS)result.AsyncState;
- CFloatS o;
- CFloatS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCFloatS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opADoubleSI(Ice.AsyncResult result)
- {
- double[] i = (double[])result.AsyncState;
- double[] o;
- double[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opADoubleS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opLDoubleSI(Ice.AsyncResult result)
- {
- List<double> i = (List<double>)result.AsyncState;
- List<double> o;
- List<double> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLDoubleS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opKDoubleSI(Ice.AsyncResult result)
- {
- LinkedList<double> i = (LinkedList<double>)result.AsyncState;
- LinkedList<double> o;
- LinkedList<double> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKDoubleS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opQDoubleSI(Ice.AsyncResult result)
- {
- Queue<double> i = (Queue<double>)result.AsyncState;
- Queue<double> o;
- Queue<double> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQDoubleS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opSDoubleSI(Ice.AsyncResult result)
- {
- Stack<double> i = (Stack<double>)result.AsyncState;
- Stack<double> o;
- Stack<double> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSDoubleS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opCDoubleSI(Ice.AsyncResult result)
- {
- CDoubleS i = (CDoubleS)result.AsyncState;
- CDoubleS o;
- CDoubleS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCDoubleS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opAStringSI(Ice.AsyncResult result)
- {
- string[] i = (string[])result.AsyncState;
- string[] o;
- string[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAStringS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opLStringSI(Ice.AsyncResult result)
- {
- List<string> i = (List<string>)result.AsyncState;
- List<string> o;
- List<string> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLStringS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opKStringSI(Ice.AsyncResult result)
- {
- LinkedList<string> i = (LinkedList<string>)result.AsyncState;
- LinkedList<string> o;
- LinkedList<string> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKStringS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opQStringSI(Ice.AsyncResult result)
- {
- Queue<string> i = (Queue<string>)result.AsyncState;
- Queue<string> o;
- Queue<string> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQStringS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opSStringSI(Ice.AsyncResult result)
- {
- Stack<string> i = (Stack<string>)result.AsyncState;
- Stack<string> o;
- Stack<string> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSStringS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opCStringSI(Ice.AsyncResult result)
- {
- CStringS i = (CStringS)result.AsyncState;
- CStringS o;
- CStringS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCStringS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opAObjectSI(Ice.AsyncResult result)
- {
- Ice.Object[] i = (Ice.Object[])result.AsyncState;
- Ice.Object[] o;
- Ice.Object[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAObjectS(out o, result);
- System.Collections.IEnumerator eo = o.GetEnumerator();
- System.Collections.IEnumerator er = r.GetEnumerator();
- foreach(CV obj in i)
- {
- eo.MoveNext();
- er.MoveNext();
- test(obj.i == ((CV)eo.Current).i);
- test(obj.i == ((CV)er.Current).i);
- }
- callback.called();
- }
-
- public void opLObjectSI(Ice.AsyncResult result)
- {
- List<Ice.Object> i = (List<Ice.Object>)result.AsyncState;
- List<Ice.Object> o;
- List<Ice.Object> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLObjectS(out o, result);
- IEnumerator<Ice.Object> eo = o.GetEnumerator();
- IEnumerator<Ice.Object> er = r.GetEnumerator();
- foreach(CV obj in i)
- {
- eo.MoveNext();
- er.MoveNext();
- test(obj.i == ((CV)eo.Current).i);
- test(obj.i == ((CV)er.Current).i);
- }
- callback.called();
- }
-
- public void opCObjectSI(Ice.AsyncResult result)
- {
- CObjectS i = (CObjectS)result.AsyncState;
- CObjectS o;
- CObjectS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCObjectS(out o, result);
- IEnumerator<Ice.Object> eo = o.GetEnumerator();
- IEnumerator<Ice.Object> er = r.GetEnumerator();
- foreach(CV obj in i)
- {
- eo.MoveNext();
- er.MoveNext();
- test(obj.i == ((CV)eo.Current).i);
- test(obj.i == ((CV)er.Current).i);
- }
- callback.called();
- }
-
- public void opAObjectPrxSI(Ice.AsyncResult result)
- {
- Ice.ObjectPrx[] i = (Ice.ObjectPrx[])result.AsyncState;
- Ice.ObjectPrx[] o;
- Ice.ObjectPrx[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAObjectPrxS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opLObjectPrxSI(Ice.AsyncResult result)
- {
- List<Ice.ObjectPrx> i = (List<Ice.ObjectPrx>)result.AsyncState;
- List<Ice.ObjectPrx> o;
- List<Ice.ObjectPrx> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLObjectPrxS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opKObjectPrxSI(Ice.AsyncResult result)
- {
- LinkedList<Ice.ObjectPrx> i = (LinkedList<Ice.ObjectPrx>)result.AsyncState;
- LinkedList<Ice.ObjectPrx> o;
- LinkedList<Ice.ObjectPrx> r =
- MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKObjectPrxS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opQObjectPrxSI(Ice.AsyncResult result)
- {
- Queue<Ice.ObjectPrx> i = (Queue<Ice.ObjectPrx>)result.AsyncState;
- Queue<Ice.ObjectPrx> o;
- Queue<Ice.ObjectPrx> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQObjectPrxS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opSObjectPrxSI(Ice.AsyncResult result)
- {
- Stack<Ice.ObjectPrx> i = (Stack<Ice.ObjectPrx>)result.AsyncState;
- Stack<Ice.ObjectPrx> o;
- Stack<Ice.ObjectPrx> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSObjectPrxS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opCObjectPrxSI(Ice.AsyncResult result)
- {
- CObjectPrxS i = (CObjectPrxS)result.AsyncState;
- CObjectPrxS o;
- CObjectPrxS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCObjectPrxS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opAStructSI(Ice.AsyncResult result)
- {
- S[] i = (S[])result.AsyncState;
- S[] o;
- S[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAStructS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opLStructSI(Ice.AsyncResult result)
- {
- List<S> i = (List<S>)result.AsyncState;
- List<S> o;
- List<S> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLStructS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opKStructSI(Ice.AsyncResult result)
- {
- LinkedList<S> i = (LinkedList<S>)result.AsyncState;
- LinkedList<S> o;
- LinkedList<S> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKStructS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opQStructSI(Ice.AsyncResult result)
- {
- Queue<S> i = (Queue<S>)result.AsyncState;
- Queue<S> o;
- Queue<S> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQStructS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opSStructSI(Ice.AsyncResult result)
- {
- Stack<S> i = (Stack<S>)result.AsyncState;
- Stack<S> o;
- Stack<S> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSStructS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opCStructSI(Ice.AsyncResult result)
- {
- CStructS i = (CStructS)result.AsyncState;
- CStructS o;
- CStructS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCStructS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opAStructSDI(Ice.AsyncResult result)
- {
- SD[] i = (SD[])result.AsyncState;
- SD[] o;
- SD[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAStructSD(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opLStructSDI(Ice.AsyncResult result)
- {
- List<SD> i = (List<SD>)result.AsyncState;
- List<SD> o;
- List<SD> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLStructSD(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opKStructSDI(Ice.AsyncResult result)
- {
- LinkedList<SD> i = (LinkedList<SD>)result.AsyncState;
- LinkedList<SD> o;
- LinkedList<SD> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKStructSD(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opQStructSDI(Ice.AsyncResult result)
- {
- Queue<SD> i = (Queue<SD>)result.AsyncState;
- Queue<SD> o;
- Queue<SD> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQStructSD(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opSStructSDI(Ice.AsyncResult result)
- {
- Stack<SD> i = (Stack<SD>)result.AsyncState;
- Stack<SD> o;
- Stack<SD> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSStructSD(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opCStructSDI(Ice.AsyncResult result)
- {
- CStructSD i = (CStructSD)result.AsyncState;
- CStructSD o;
- CStructSD r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCStructSD(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opACVSI(Ice.AsyncResult result)
- {
- CV[] i = (CV[])result.AsyncState;
- CV[] o;
- CV[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opACVS(out o, result);
- System.Collections.IEnumerator eo = o.GetEnumerator();
- System.Collections.IEnumerator er = r.GetEnumerator();
- foreach(CV obj in i)
- {
- eo.MoveNext();
- er.MoveNext();
- test(obj.i == ((CV)eo.Current).i);
- test(obj.i == ((CV)er.Current).i);
- }
- callback.called();
- }
-
- public void opLCVSI(Ice.AsyncResult result)
- {
- List<CV> i = (List<CV>)result.AsyncState;
- List<CV> o;
- List<CV> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLCVS(out o, result);
- IEnumerator<CV> eo = o.GetEnumerator();
- IEnumerator<CV> er = r.GetEnumerator();
- foreach(CV obj in i)
- {
- eo.MoveNext();
- er.MoveNext();
- test(obj.i == ((CV)eo.Current).i);
- test(obj.i == ((CV)er.Current).i);
- }
- callback.called();
- }
-
- public void opCCVSI(Ice.AsyncResult result)
- {
- CCVS i = (CCVS)result.AsyncState;
- CCVS o;
- CCVS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCCVS(out o, result);
- IEnumerator<CV> eo = (IEnumerator<CV>)o.GetEnumerator();
- IEnumerator<CV> er = (IEnumerator<CV>)r.GetEnumerator();
- foreach(CV obj in i)
- {
- eo.MoveNext();
- er.MoveNext();
- test(obj.i == ((CV)eo.Current).i);
- test(obj.i == ((CV)er.Current).i);
- }
- callback.called();
- }
-
- public void opACVPrxSI(Ice.AsyncResult result)
- {
- CVPrx[] i = (CVPrx[])result.AsyncState;
- CVPrx[] o;
- CVPrx[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opACVPrxS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opLCVPrxSI(Ice.AsyncResult result)
- {
- List<CVPrx> i = (List<CVPrx>)result.AsyncState;
- List<CVPrx> o;
- List<CVPrx> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLCVPrxS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opKCVPrxSI(Ice.AsyncResult result)
- {
- LinkedList<CVPrx> i = (LinkedList<CVPrx>)result.AsyncState;
- LinkedList<CVPrx> o;
- LinkedList<CVPrx> r =
- MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKCVPrxS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opQCVPrxSI(Ice.AsyncResult result)
- {
- Queue<CVPrx> i = (Queue<CVPrx>)result.AsyncState;
- Queue<CVPrx> o;
- Queue<CVPrx> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQCVPrxS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opSCVPrxSI(Ice.AsyncResult result)
- {
- Stack<CVPrx> i = (Stack<CVPrx>)result.AsyncState;
- Stack<CVPrx> o;
- Stack<CVPrx> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSCVPrxS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opCCVPrxSI(Ice.AsyncResult result)
- {
- CCVPrxS i = (CCVPrxS)result.AsyncState;
- CCVPrxS o;
- CCVPrxS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCCVPrxS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opACRSI(Ice.AsyncResult result)
- {
- CR[] i = (CR[])result.AsyncState;
- CR[] o;
- CR[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opACRS(out o, result);
- System.Collections.IEnumerator eo = o.GetEnumerator();
- System.Collections.IEnumerator er = r.GetEnumerator();
- foreach(CR obj in i)
- {
- eo.MoveNext();
- er.MoveNext();
- test(obj.v.i == ((CR)eo.Current).v.i);
- test(obj.v.i == ((CR)er.Current).v.i);
- }
- callback.called();
- }
-
- public void opLCRSI(Ice.AsyncResult result)
- {
- List<CR> i = (List<CR>)result.AsyncState;
- List<CR> o;
- List<CR> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLCRS(out o, result);
- IEnumerator<CR> eo = o.GetEnumerator();
- IEnumerator<CR> er = r.GetEnumerator();
- foreach(CR obj in i)
- {
- eo.MoveNext();
- er.MoveNext();
- test(obj.v.i == ((CR)eo.Current).v.i);
- test(obj.v.i == ((CR)er.Current).v.i);
- }
- callback.called();
- }
-
- public void opCCRSI(Ice.AsyncResult result)
- {
- CCRS i = (CCRS)result.AsyncState;
- CCRS o;
- CCRS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCCRS(out o, result);
- IEnumerator<CR> eo = (IEnumerator<CR>)o.GetEnumerator();
- IEnumerator<CR> er = (IEnumerator<CR>)r.GetEnumerator();
- foreach(CR obj in i)
- {
- eo.MoveNext();
- er.MoveNext();
- test(obj.v.i == ((CR)eo.Current).v.i);
- test(obj.v.i == ((CR)er.Current).v.i);
- }
- callback.called();
- }
-
- public void opAEnSI(Ice.AsyncResult result)
- {
- En[] i = (En[])result.AsyncState;
- En[] o;
- En[] r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAEnS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opLEnSI(Ice.AsyncResult result)
- {
- List<En> i = (List<En>)result.AsyncState;
- List<En> o;
- List<En> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLEnS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opKEnSI(Ice.AsyncResult result)
- {
- LinkedList<En> i = (LinkedList<En>)result.AsyncState;
- LinkedList<En> o;
- LinkedList<En> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKEnS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opQEnSI(Ice.AsyncResult result)
- {
- Queue<En> i = (Queue<En>)result.AsyncState;
- Queue<En> o;
- Queue<En> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQEnS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opSEnSI(Ice.AsyncResult result)
- {
- Stack<En> i = (Stack<En>)result.AsyncState;
- Stack<En> o;
- Stack<En> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSEnS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opCEnSI(Ice.AsyncResult result)
- {
- CEnS i = (CEnS)result.AsyncState;
- CEnS o;
- CEnS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCEnS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opCustomIntSI(Ice.AsyncResult result)
- {
- Custom<int> i = (Custom<int>)result.AsyncState;
- Custom<int> o;
- Custom<int> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCustomIntS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opCustomCVSI(Ice.AsyncResult result)
- {
- Custom<CV> i = (Custom<CV>)result.AsyncState;
- Custom<CV> o;
- Custom<CV> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCustomCVS(out o, result);
- IEnumerator<CV> eo = (IEnumerator<CV>)o.GetEnumerator();
- IEnumerator<CV> er = (IEnumerator<CV>)r.GetEnumerator();
- foreach(CV obj in i)
- {
- eo.MoveNext();
- er.MoveNext();
- if(obj == null)
- {
- test(eo.Current == null);
- test(er.Current == null);
- }
- else
- {
- test(obj.i == ((CV)eo.Current).i);
- test(obj.i == ((CV)er.Current).i);
- }
- }
- callback.called();
- }
-
- public void opCustomIntSSI(Ice.AsyncResult result)
- {
- Custom<Custom<int>> i = (Custom<Custom<int>>)result.AsyncState;
- Custom<Custom<int>> o;
- Custom<Custom<int>> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCustomIntSS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opCustomCVSSI(Ice.AsyncResult result)
- {
- Custom<Custom<CV>> i = (Custom<Custom<CV>>)result.AsyncState;
- Custom<Custom<CV>> o;
- Custom<Custom<CV>> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCustomCVSS(out o, result);
- IEnumerator<Custom<CV>> eo = (IEnumerator<Custom<CV>>)o.GetEnumerator();
- IEnumerator<Custom<CV>> er = (IEnumerator<Custom<CV>>)r.GetEnumerator();
- foreach(Custom<CV> s in i)
- {
- eo.MoveNext();
- er.MoveNext();
- IEnumerator<CV> io = (IEnumerator<CV>)eo.Current.GetEnumerator();
- IEnumerator<CV> ir = (IEnumerator<CV>)er.Current.GetEnumerator();
- foreach(CV obj in s)
- {
- io.MoveNext();
- ir.MoveNext();
- if(obj == null)
- {
- test(io.Current == null);
- test(ir.Current == null);
- }
- else
- {
- test(obj.i == io.Current.i);
- test(obj.i == ir.Current.i);
- }
- }
- }
- callback.called();
- }
-
-#if !COMPACT && !SILVERLIGHT
- public void opSerialSmallCSharpNullI(Ice.AsyncResult result)
- {
- try
- {
- Serialize.Small o;
- Serialize.Small r =
- MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSerialSmallCSharp(out o, result);
- test(o == null);
- test(r == null);
- callback.called();
- }
- catch(Ice.OperationNotExistException)
- {
- // OK, talking to non-C# server.
- }
- }
-
- public void opSerialSmallCSharpI(Ice.AsyncResult result)
- {
- try
- {
- Serialize.Small o;
- Serialize.Small r =
- MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSerialSmallCSharp(out o, result);
- test(o.i == 99);
- test(r.i == 99);
- callback.called();
- }
- catch(Ice.OperationNotExistException)
- {
- // OK, talking to non-C# server.
- }
- }
-
- public void opSerialLargeCSharpI(Ice.AsyncResult result)
- {
- try
- {
- Serialize.Large o;
- Serialize.Large r =
- MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSerialLargeCSharp(out o, result);
- 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();
- }
- catch(Ice.OperationNotExistException)
- {
- // OK, talking to non-C# server.
- }
- }
-
- public void opSerialStructCSharpI(Ice.AsyncResult result)
- {
- try
- {
- Serialize.Struct o;
- Serialize.Struct r =
- MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSerialStructCSharp(out o, result);
- test(o.o == null);
- test(o.o2 != null);
- test(((Serialize.Struct)(o.o2)).o == null);
- test(((Serialize.Struct)(o.o2)).o2 == o.o2);
- test(o.s == null);
- test(o.s2.Equals("Hello"));
- test(r.o == null);
- test(r.o2 != null);
- test(((Serialize.Struct)(r.o2)).o == null);
- test(((Serialize.Struct)(r.o2)).o2 == r.o2);
- test(r.s == null);
- test(r.s2.Equals("Hello"));
- callback.called();
- }
- catch(Ice.OperationNotExistException)
- {
- // OK, talking to non-C# server.
- }
- }
-#endif
-
- public virtual void check()
- {
- callback.check();
- }
-
- private CallbackBase callback = new CallbackBase();
- }
-
-
- static int _length = 100;
-
- internal static void twowaysAMI(Ice.Communicator communicator, Test.MyClassPrx p)
- {
- {
- byte[] i = new byte[_length];
- for(int c = 0; c < _length; ++c)
- {
- i[c] = (byte)c;
- }
-
- Callback cb = new Callback();
- p.begin_opAByteS(i, null, cb.opAByteSI, i);
- cb.check();
- }
-
- {
- List<byte> i = new List<byte>();
- for(int c = 0; c < _length; ++c)
- {
- i.Add((byte)c);
- }
-
- Callback cb = new Callback();
- p.begin_opLByteS(i, null, cb.opLByteSI, i);
- cb.check();
- }
-
- {
- LinkedList<byte> i = new LinkedList<byte>();
- for(int c = 0; c < _length; ++c)
- {
- i.AddLast((byte)c);
- }
-
- Callback cb = new Callback();
- p.begin_opKByteS(i, null, cb.opKByteSI, i);
- cb.check();
- }
-
- {
- Queue<byte> i = new Queue<byte>();
- for(int c = 0; c < _length; ++c)
- {
- i.Enqueue((byte)c);
- }
-
- Callback cb = new Callback();
- p.begin_opQByteS(i, null, cb.opQByteSI, i);
- cb.check();
- }
-
- {
- Stack<byte> i = new Stack<byte>();
- for(int c = 0; c < _length; ++c)
- {
- i.Push((byte)c);
- }
-
- Callback cb = new Callback();
- p.begin_opSByteS(i, null, cb.opSByteSI, i);
- cb.check();
- }
-
- {
- CByteS i = new CByteS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add((byte)c);
- }
-
- Callback cb = new Callback();
- p.begin_opCByteS(i, null, cb.opCByteSI, i);
- cb.check();
- }
-
- {
- bool[] i = new bool[_length];
- for(int c = 0; c < _length; ++c)
- {
- i[c] = c % 1 == 1;
- }
-
- Callback cb = new Callback();
- p.begin_opABoolS(i, null, cb.opABoolSI, i);
- cb.check();
- }
-
- {
- List<bool> i = new List<bool>();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(c % 1 == 1);
- }
-
- Callback cb = new Callback();
- p.begin_opLBoolS(i, null, cb.opLBoolSI, i);
- cb.check();
- }
-
- {
- LinkedList<bool> i = new LinkedList<bool>();
- for(int c = 0; c < _length; ++c)
- {
- i.AddLast(c % 1 == 1);
- }
-
- Callback cb = new Callback();
- p.begin_opKBoolS(i, null, cb.opKBoolSI, i);
- cb.check();
- }
-
- {
- Queue<bool> i = new Queue<bool>();
- for(int c = 0; c < _length; ++c)
- {
- i.Enqueue(c % 1 == 1);
- }
-
- Callback cb = new Callback();
- p.begin_opQBoolS(i, null, cb.opQBoolSI, i);
- cb.check();
- }
-
- {
- Stack<bool> i = new Stack<bool>();
- for(int c = 0; c < _length; ++c)
- {
- i.Push(c % 1 == 1);
- }
-
- Callback cb = new Callback();
- p.begin_opSBoolS(i, null, cb.opSBoolSI, i);
- cb.check();
- }
-
- {
- CBoolS i = new CBoolS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(c % 1 == 1);
- }
-
- Callback cb = new Callback();
- p.begin_opCBoolS(i, null, cb.opCBoolSI, i);
- cb.check();
- }
-
- {
- short[] i = new short[_length];
- for(int c = 0; c < _length; ++c)
- {
- i[c] = (short)c;
- }
-
- Callback cb = new Callback();
- p.begin_opAShortS(i, null, cb.opAShortSI, i);
- cb.check();
- }
-
- {
- List<short> i = new List<short>();
- for(int c = 0; c < _length; ++c)
- {
- i.Add((short)c);
- }
-
- Callback cb = new Callback();
- p.begin_opLShortS(i, null, cb.opLShortSI, i);
- cb.check();
- }
-
- {
- LinkedList<short> i = new LinkedList<short>();
- for(int c = 0; c < _length; ++c)
- {
- i.AddLast((short)c);
- }
-
- Callback cb = new Callback();
- p.begin_opKShortS(i, null, cb.opKShortSI, i);
- cb.check();
- }
-
- {
- Queue<short> i = new Queue<short>();
- for(int c = 0; c < _length; ++c)
- {
- i.Enqueue((short)c);
- }
-
- Callback cb = new Callback();
- p.begin_opQShortS(i, null, cb.opQShortSI, i);
- cb.check();
- }
-
- {
- Stack<short> i = new Stack<short>();
- for(int c = 0; c < _length; ++c)
- {
- i.Push((short)c);
- }
-
- Callback cb = new Callback();
- p.begin_opSShortS(i, null, cb.opSShortSI, i);
- cb.check();
- }
-
- {
- CShortS i = new CShortS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add((short)c);
- }
-
- Callback cb = new Callback();
- p.begin_opCShortS(i, null, cb.opCShortSI, i);
- cb.check();
- }
-
- {
- int[] i = new int[_length];
- for(int c = 0; c < _length; ++c)
- {
- i[c] = (int)c;
- }
-
- Callback cb = new Callback();
- p.begin_opAIntS(i, null, cb.opAIntSI, i);
- cb.check();
- }
-
- {
- List<int> i = new List<int>();
- for(int c = 0; c < _length; ++c)
- {
- i.Add((int)c);
- }
-
- Callback cb = new Callback();
- p.begin_opLIntS(i, null, cb.opLIntSI, i);
- cb.check();
- }
-
- {
- LinkedList<int> i = new LinkedList<int>();
- for(int c = 0; c < _length; ++c)
- {
- i.AddLast((int)c);
- }
-
- Callback cb = new Callback();
- p.begin_opKIntS(i, null, cb.opKIntSI, i);
- cb.check();
- }
-
- {
- Queue<int> i = new Queue<int>();
- for(int c = 0; c < _length; ++c)
- {
- i.Enqueue((int)c);
- }
-
- Callback cb = new Callback();
- p.begin_opQIntS(i, null, cb.opQIntSI, i);
- cb.check();
- }
-
- {
- Stack<int> i = new Stack<int>();
- for(int c = 0; c < _length; ++c)
- {
- i.Push((int)c);
- }
-
- Callback cb = new Callback();
- p.begin_opSIntS(i, null, cb.opSIntSI, i);
- cb.check();
- }
-
- {
- CIntS i = new CIntS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add((int)c);
- }
-
- Callback cb = new Callback();
- p.begin_opCIntS(i, null, cb.opCIntSI, i);
- cb.check();
- }
-
- {
- long[] i = new long[_length];
- for(int c = 0; c < _length; ++c)
- {
- i[c] = (long)c;
- }
-
- Callback cb = new Callback();
- p.begin_opALongS(i, null, cb.opALongSI, i);
- cb.check();
- }
-
- {
- List<long> i = new List<long>();
- for(int c = 0; c < _length; ++c)
- {
- i.Add((long)c);
- }
-
- Callback cb = new Callback();
- p.begin_opLLongS(i, null, cb.opLLongSI, i);
- cb.check();
- }
-
- {
- LinkedList<long> i = new LinkedList<long>();
- for(int c = 0; c < _length; ++c)
- {
- i.AddLast((long)c);
- }
-
- Callback cb = new Callback();
- p.begin_opKLongS(i, null, cb.opKLongSI, i);
- cb.check();
- }
-
- {
- Queue<long> i = new Queue<long>();
- for(int c = 0; c < _length; ++c)
- {
- i.Enqueue((long)c);
- }
-
- Callback cb = new Callback();
- p.begin_opQLongS(i, null, cb.opQLongSI, i);
- cb.check();
- }
-
- {
- Stack<long> i = new Stack<long>();
- for(int c = 0; c < _length; ++c)
- {
- i.Push((long)c);
- }
-
- Callback cb = new Callback();
- p.begin_opSLongS(i, null, cb.opSLongSI, i);
- cb.check();
- }
-
- {
- CLongS i = new CLongS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add((long)c);
- }
-
- Callback cb = new Callback();
- p.begin_opCLongS(i, null, cb.opCLongSI, i);
- cb.check();
- }
-
- {
- float[] i = new float[_length];
- for(int c = 0; c < _length; ++c)
- {
- i[c] = (float)c;
- }
-
- Callback cb = new Callback();
- p.begin_opAFloatS(i, null, cb.opAFloatSI, i);
- cb.check();
- }
-
- {
- List<float> i = new List<float>();
- for(int c = 0; c < _length; ++c)
- {
- i.Add((float)c);
- }
-
- Callback cb = new Callback();
- p.begin_opLFloatS(i, null, cb.opLFloatSI, i);
- cb.check();
- }
-
- {
- LinkedList<float> i = new LinkedList<float>();
- for(int c = 0; c < _length; ++c)
- {
- i.AddLast((float)c);
- }
-
- Callback cb = new Callback();
- p.begin_opKFloatS(i, null, cb.opKFloatSI, i);
- cb.check();
- }
-
- {
- Queue<float> i = new Queue<float>();
- for(int c = 0; c < _length; ++c)
- {
- i.Enqueue((float)c);
- }
-
- Callback cb = new Callback();
- p.begin_opQFloatS(i, null, cb.opQFloatSI, i);
- cb.check();
- }
-
- {
- Stack<float> i = new Stack<float>();
- for(int c = 0; c < _length; ++c)
- {
- i.Push((float)c);
- }
-
- Callback cb = new Callback();
- p.begin_opSFloatS(i, null, cb.opSFloatSI, i);
- cb.check();
- }
-
- {
- CFloatS i = new CFloatS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add((float)c);
- }
-
- Callback cb = new Callback();
- p.begin_opCFloatS(i, null, cb.opCFloatSI, i);
- cb.check();
- }
-
- {
- double[] i = new double[_length];
- for(int c = 0; c < _length; ++c)
- {
- i[c] = (double)c;
- }
-
- Callback cb = new Callback();
- p.begin_opADoubleS(i, null, cb.opADoubleSI, i);
- cb.check();
- }
-
- {
- List<double> i = new List<double>();
- for(int c = 0; c < _length; ++c)
- {
- i.Add((double)c);
- }
-
- Callback cb = new Callback();
- p.begin_opLDoubleS(i, null, cb.opLDoubleSI, i);
- cb.check();
- }
-
- {
- LinkedList<double> i = new LinkedList<double>();
- for(int c = 0; c < _length; ++c)
- {
- i.AddLast((double)c);
- }
-
- Callback cb = new Callback();
- p.begin_opKDoubleS(i, null, cb.opKDoubleSI, i);
- cb.check();
- }
-
- {
- Queue<double> i = new Queue<double>();
- for(int c = 0; c < _length; ++c)
- {
- i.Enqueue((double)c);
- }
-
- Callback cb = new Callback();
- p.begin_opQDoubleS(i, null, cb.opQDoubleSI, i);
- cb.check();
- }
-
- {
- Stack<double> i = new Stack<double>();
- for(int c = 0; c < _length; ++c)
- {
- i.Push((double)c);
- }
-
- Callback cb = new Callback();
- p.begin_opSDoubleS(i, null, cb.opSDoubleSI, i);
- cb.check();
- }
-
- {
- CDoubleS i = new CDoubleS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add((double)c);
- }
-
- Callback cb = new Callback();
- p.begin_opCDoubleS(i, null, cb.opCDoubleSI, i);
- cb.check();
- }
-
- {
- string[] i = new string[_length];
- for(int c = 0; c < _length; ++c)
- {
- i[c] = c.ToString();
- }
-
- Callback cb = new Callback();
- p.begin_opAStringS(i, null, cb.opAStringSI, i);
- cb.check();
- }
-
- {
- List<string> i = new List<string>();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(c.ToString());
- }
-
- Callback cb = new Callback();
- p.begin_opLStringS(i, null, cb.opLStringSI, i);
- cb.check();
- }
-
- {
- LinkedList<string> i = new LinkedList<string>();
- for(int c = 0; c < _length; ++c)
- {
- i.AddLast(c.ToString());
- }
-
- Callback cb = new Callback();
- p.begin_opKStringS(i, null, cb.opKStringSI, i);
- cb.check();
- }
-
- {
- Queue<string> i = new Queue<string>();
- for(int c = 0; c < _length; ++c)
- {
- i.Enqueue(c.ToString());
- }
-
- Callback cb = new Callback();
- p.begin_opQStringS(i, null, cb.opQStringSI, i);
- cb.check();
- }
-
- {
- Stack<string> i = new Stack<string>();
- for(int c = 0; c < _length; ++c)
- {
- i.Push(c.ToString());
- }
-
- Callback cb = new Callback();
- p.begin_opSStringS(i, null, cb.opSStringSI, i);
- cb.check();
- }
-
- {
- CStringS i = new CStringS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(c.ToString());
- }
-
- Callback cb = new Callback();
- p.begin_opCStringS(i, null, cb.opCStringSI, i);
- cb.check();
- }
-
- {
- Ice.Object[] i = new Ice.Object[_length];
- for(int c = 0; c < _length; ++c)
- {
- i[c] = new CV(c);
- }
-
- Callback cb = new Callback();
- p.begin_opAObjectS(i, null, cb.opAObjectSI, i);
- cb.check();
- }
-
- {
- List<Ice.Object> i = new List<Ice.Object>();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(new CV(c));
- }
-
- Callback cb = new Callback();
- p.begin_opLObjectS(i, null, cb.opLObjectSI, i);
- cb.check();
- }
-
- {
- CObjectS i = new CObjectS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(new CV(c));
- }
-
- Callback cb = new Callback();
- p.begin_opCObjectS(i, null, cb.opCObjectSI, i);
- cb.check();
- }
-
- {
- Ice.ObjectPrx[] i = new Ice.ObjectPrx[_length];
- for(int c = 0; c < _length; ++c)
- {
- i[c] = communicator.stringToProxy(c.ToString());
- }
-
- Callback cb = new Callback();
- p.begin_opAObjectPrxS(i, null, cb.opAObjectPrxSI, i);
- cb.check();
- }
-
- {
- List<Ice.ObjectPrx> i = new List<Ice.ObjectPrx>();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(communicator.stringToProxy(c.ToString()));
- }
-
- Callback cb = new Callback();
- p.begin_opLObjectPrxS(i, null, cb.opLObjectPrxSI, i);
- cb.check();
- }
-
- {
- LinkedList<Ice.ObjectPrx> i = new LinkedList<Ice.ObjectPrx>();
- for(int c = 0; c < _length; ++c)
- {
- i.AddLast(communicator.stringToProxy(c.ToString()));
- }
-
- Callback cb = new Callback();
- p.begin_opKObjectPrxS(i, null, cb.opKObjectPrxSI, i);
- cb.check();
- }
-
- {
- Queue<Ice.ObjectPrx> i = new Queue<Ice.ObjectPrx>();
- for(int c = 0; c < _length; ++c)
- {
- i.Enqueue(communicator.stringToProxy(c.ToString()));
- }
-
- Callback cb = new Callback();
- p.begin_opQObjectPrxS(i, null, cb.opQObjectPrxSI, i);
- cb.check();
- }
-
- {
- Stack<Ice.ObjectPrx> i = new Stack<Ice.ObjectPrx>();
- for(int c = 0; c < _length; ++c)
- {
- i.Push(communicator.stringToProxy(c.ToString()));
- }
-
- Callback cb = new Callback();
- p.begin_opSObjectPrxS(i, null, cb.opSObjectPrxSI, i);
- cb.check();
- }
-
- {
- CObjectPrxS i = new CObjectPrxS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(communicator.stringToProxy(c.ToString()));
- }
-
- Callback cb = new Callback();
- p.begin_opCObjectPrxS(i, null, cb.opCObjectPrxSI, i);
- cb.check();
- }
-
- {
- S[] i = new S[_length];
- for(int c = 0; c < _length; ++c)
- {
- i[c].i = c;
- }
-
- Callback cb = new Callback();
- p.begin_opAStructS(i, null, cb.opAStructSI, i);
- cb.check();
- }
-
- {
- List<S> i = new List<S>();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(new S(c));
- }
-
- Callback cb = new Callback();
- p.begin_opLStructS(i, null, cb.opLStructSI, i);
- cb.check();
- }
-
- {
- LinkedList<S> i = new LinkedList<S>();
- for(int c = 0; c < _length; ++c)
- {
- i.AddLast(new S(c));
- }
-
- Callback cb = new Callback();
- p.begin_opKStructS(i, null, cb.opKStructSI, i);
- cb.check();
- }
-
- {
- Queue<S> i = new Queue<S>();
- for(int c = 0; c < _length; ++c)
- {
- i.Enqueue(new S(c));
- }
-
- Callback cb = new Callback();
- p.begin_opQStructS(i, null, cb.opQStructSI, i);
- cb.check();
- }
-
- {
- Stack<S> i = new Stack<S>();
- for(int c = 0; c < _length; ++c)
- {
- i.Push(new S(c));
- }
-
- Callback cb = new Callback();
- p.begin_opSStructS(i, null, cb.opSStructSI, i);
- cb.check();
- }
-
- {
- CStructS i = new CStructS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(new S(c));
- }
-
- Callback cb = new Callback();
- p.begin_opCStructS(i, null, cb.opCStructSI, i);
- cb.check();
- }
-
- {
- CV[] i = new CV[_length];
- for(int c = 0; c < _length; ++c)
- {
- i[c] = new CV(c);
- }
-
- Callback cb = new Callback();
- p.begin_opACVS(i, null, cb.opACVSI, i);
- cb.check();
- }
-
- {
- List<CV> i = new List<CV>();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(new CV(c));
- }
-
- Callback cb = new Callback();
- p.begin_opLCVS(i, null, cb.opLCVSI, i);
- cb.check();
- }
-
- {
- CCVS i = new CCVS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(new CV(c));
- }
-
- Callback cb = new Callback();
- p.begin_opCCVS(i, null, cb.opCCVSI, i);
- cb.check();
- }
-
- {
- CVPrx[] i = new CVPrx[_length];
- for(int c = 0; c < _length; ++c)
- {
- i[c] = CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString()));
- }
-
- Callback cb = new Callback();
- p.begin_opACVPrxS(i, null, cb.opACVPrxSI, i);
- cb.check();
- }
-
- {
- List<CVPrx> i = new List<CVPrx>();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
- }
-
- Callback cb = new Callback();
- p.begin_opLCVPrxS(i, null, cb.opLCVPrxSI, i);
- cb.check();
- }
-
- {
- LinkedList<CVPrx> i = new LinkedList<CVPrx>();
- for(int c = 0; c < _length; ++c)
- {
- i.AddLast(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
- }
-
- Callback cb = new Callback();
- p.begin_opKCVPrxS(i, null, cb.opKCVPrxSI, i);
- cb.check();
- }
-
- {
- Queue<CVPrx> i = new Queue<CVPrx>();
- for(int c = 0; c < _length; ++c)
- {
- i.Enqueue(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
- }
-
- Callback cb = new Callback();
- p.begin_opQCVPrxS(i, null, cb.opQCVPrxSI, i);
- cb.check();
- }
-
- {
- Stack<CVPrx> i = new Stack<CVPrx>();
- for(int c = 0; c < _length; ++c)
- {
- i.Push(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
- }
-
- Callback cb = new Callback();
- p.begin_opSCVPrxS(i, null, cb.opSCVPrxSI, i);
- cb.check();
- }
-
- {
- CCVPrxS i = new CCVPrxS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
- }
-
- Callback cb = new Callback();
- p.begin_opCCVPrxS(i, null, cb.opCCVPrxSI, i);
- cb.check();
- }
-
- {
- CR[] i = new CR[_length];
- for(int c = 0; c < _length; ++c)
- {
- i[c] = new CR(new CV(c));
- }
-
- Callback cb = new Callback();
- p.begin_opACRS(i, null, cb.opACRSI, i);
- cb.check();
- }
-
- {
- List<CR> i = new List<CR>();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(new CR(new CV(c)));
- }
-
- Callback cb = new Callback();
- p.begin_opLCRS(i, null, cb.opLCRSI, i);
- cb.check();
- }
-
- {
- CCRS i = new CCRS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(new CR(new CV(c)));
- }
-
- Callback cb = new Callback();
- p.begin_opCCRS(i, null, cb.opCCRSI, i);
- cb.check();
- }
-
- {
- En[] i = new En[_length];
- for(int c = 0; c < _length; ++c)
- {
- i[c] = (En)(c % 3);
- }
-
- Callback cb = new Callback();
- p.begin_opAEnS(i, null, cb.opAEnSI, i);
- cb.check();
- }
-
- {
- List<En> i = new List<En>();
- for(int c = 0; c < _length; ++c)
- {
- i.Add((En)(c % 3));
- }
-
- Callback cb = new Callback();
- p.begin_opLEnS(i, null, cb.opLEnSI, i);
- cb.check();
- }
-
- {
- LinkedList<En> i = new LinkedList<En>();
- for(int c = 0; c < _length; ++c)
- {
- i.AddLast((En)(c % 3));
- }
-
- Callback cb = new Callback();
- p.begin_opKEnS(i, null, cb.opKEnSI, i);
- cb.check();
- }
-
- {
- Queue<En> i = new Queue<En>();
- for(int c = 0; c < _length; ++c)
- {
- i.Enqueue((En)(c % 3));
- }
-
- Callback cb = new Callback();
- p.begin_opQEnS(i, null, cb.opQEnSI, i);
- cb.check();
- }
-
- {
- Stack<En> i = new Stack<En>();
- for(int c = 0; c < _length; ++c)
- {
- i.Push((En)(c % 3));
- }
-
- Callback cb = new Callback();
- p.begin_opSEnS(i, null, cb.opSEnSI, i);
- cb.check();
- }
-
- {
- CEnS i = new CEnS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add((En)(c % 3));
- }
-
- Callback cb = new Callback();
- p.begin_opCEnS(i, null, cb.opCEnSI, i);
- cb.check();
- }
-
- {
- Custom<int> i = new Custom<int>();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(c);
- }
-
- Callback cb = new Callback();
- p.begin_opCustomIntS(i, null, cb.opCustomIntSI, i);
- cb.check();
- }
-
- {
- Custom<CV> i = new Custom<CV>();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(new CV(c));
- }
-
- Callback cb = new Callback();
- p.begin_opCustomCVS(i, null, cb.opCustomCVSI, i);
- cb.check();
- }
-
- {
- Custom<Custom<int>> i = new Custom<Custom<int>>();
- for(int c = 0; c < _length; ++c)
- {
- Custom<int> inner = new Custom<int>();
- for(int j = 0; j < c; ++j)
- {
- inner.Add(j);
- }
- i.Add(inner);
- }
-
- Callback cb = new Callback();
- p.begin_opCustomIntSS(i, null, cb.opCustomIntSSI, i);
- cb.check();
- }
-
- {
- Custom<Custom<CV>> i = new Custom<Custom<CV>>();
- for(int c = 0; c < _length; ++c)
- {
- Custom<CV> inner = new Custom<CV>();
- for(int j = 0; j < c; ++j)
- {
- inner.Add(new CV(j));
- }
- i.Add(inner);
- }
-
- Callback cb = new Callback();
- p.begin_opCustomCVSS(i, null, cb.opCustomCVSSI, i);
- cb.check();
- }
-
-#if !COMPACT && !SILVERLIGHT
- {
- Serialize.Small i = null;
-
- Callback cb = new Callback();
- p.begin_opSerialSmallCSharp(i, null, cb.opSerialSmallCSharpNullI, i);
- cb.check();
- }
-
- {
- Serialize.Small i = new Serialize.Small();
- i.i = 99;
-
- Callback cb = new Callback();
- p.begin_opSerialSmallCSharp(i, null, cb.opSerialSmallCSharpI, i);
- cb.check();
- }
-
- {
- Serialize.Large i = new Serialize.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 cb = new Callback();
- p.begin_opSerialLargeCSharp(i, null, cb.opSerialLargeCSharpI, i);
- cb.check();
- }
-
- {
- Serialize.Struct i = new Serialize.Struct();
- i.o = null;
- i.o2 = i;
- i.s = null;
- i.s2 = "Hello";
-
- Callback cb = new Callback();
- p.begin_opSerialStructCSharp(i, null, cb.opSerialStructCSharpI, i);
- cb.check();
- }
-#endif
- }
-}
diff --git a/cs/test/Ice/slicing/exceptions/Test.ice b/cs/test/Ice/slicing/exceptions/Test.ice
index e5d0e55ade5..95d1d76e576 100644
--- a/cs/test/Ice/slicing/exceptions/Test.ice
+++ b/cs/test/Ice/slicing/exceptions/Test.ice
@@ -59,7 +59,7 @@ interface Relay
void unknownPreservedAsKnownPreserved() throws KnownPreserved;
};
-["ami", "format:sliced"]
+["format:sliced"]
interface TestIntf
{
void baseAsBase() throws Base;
diff --git a/cs/test/Ice/slicing/exceptions/TestAMD.ice b/cs/test/Ice/slicing/exceptions/TestAMD.ice
index 4f0999d273e..34348fc43a0 100644
--- a/cs/test/Ice/slicing/exceptions/TestAMD.ice
+++ b/cs/test/Ice/slicing/exceptions/TestAMD.ice
@@ -59,7 +59,7 @@ interface Relay
void unknownPreservedAsKnownPreserved() throws KnownPreserved;
};
-["ami", "amd", "format:sliced"]
+["amd", "format:sliced"]
interface TestIntf
{
void baseAsBase() throws Base;
diff --git a/cs/test/Ice/slicing/objects/Test.ice b/cs/test/Ice/slicing/objects/Test.ice
index 0416493b279..2f5ef710f4a 100644
--- a/cs/test/Ice/slicing/objects/Test.ice
+++ b/cs/test/Ice/slicing/objects/Test.ice
@@ -102,7 +102,7 @@ exception PreservedException
{
};
-["ami", "format:sliced"]
+["format:sliced"]
interface TestIntf
{
Object SBaseAsObject();
diff --git a/cs/test/Ice/slicing/objects/TestAMD.ice b/cs/test/Ice/slicing/objects/TestAMD.ice
index 255567a656f..d588e1192e5 100644
--- a/cs/test/Ice/slicing/objects/TestAMD.ice
+++ b/cs/test/Ice/slicing/objects/TestAMD.ice
@@ -97,7 +97,7 @@ exception PreservedException
{
};
-["ami", "amd", "format:sliced"]
+["amd", "format:sliced"]
interface TestIntf
{
Object SBaseAsObject();
diff --git a/cs/test/Slice/keyword/Key.ice b/cs/test/Slice/keyword/Key.ice
index c06e8f8670b..592ff00806b 100644
--- a/cs/test/Slice/keyword/Key.ice
+++ b/cs/test/Slice/keyword/Key.ice
@@ -33,7 +33,7 @@ interface decimal
class delegate
{
int if;
- ["ami"] void foo(case* else, out int event);
+ void foo(case* else, out int event);
};
class explicit extends delegate implements decimal, case
@@ -55,7 +55,6 @@ class optionalMembers
optional(8) explicit* null;
};
-["ami"]
interface optionalParams
{
optional(1) break for(optional(2) as goto,
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
diff --git a/js/test/Ice/exceptions/Test.ice b/js/test/Ice/exceptions/Test.ice
index 3725971d7c2..c4c71afb81d 100644
--- a/js/test/Ice/exceptions/Test.ice
+++ b/js/test/Ice/exceptions/Test.ice
@@ -40,7 +40,7 @@ exception D
int dMem;
};
-["ami"] interface Thrower
+interface Thrower
{
void shutdown();
bool supportsUndeclaredExceptions();
@@ -68,7 +68,7 @@ exception D
void throwAfterException() throws A;
};
-["ami"] interface WrongOperation
+interface WrongOperation
{
void noSuchOperation();
};
diff --git a/js/test/Ice/operations/Test.ice b/js/test/Ice/operations/Test.ice
index 57afcf3b3d6..5027b5de6b6 100644
--- a/js/test/Ice/operations/Test.ice
+++ b/js/test/Ice/operations/Test.ice
@@ -73,7 +73,7 @@ dictionary<string, MyEnum> StringMyEnumD;
dictionary<MyEnum, string> MyEnumStringD;
dictionary<MyStruct, MyEnum> MyStructMyEnumD;
-["ami"] class MyClass
+class MyClass
{
void shutdown();
@@ -171,7 +171,7 @@ dictionary<MyStruct, MyEnum> MyStructMyEnumD;
["nonmutating"] idempotent void opNonmutating();
};
-["ami"] class MyDerivedClass extends MyClass
+class MyDerivedClass extends MyClass
{
void opDerived();
};
diff --git a/js/test/Ice/slicing/objects/Test.ice b/js/test/Ice/slicing/objects/Test.ice
index 0b3d7685e7c..73085cf1a5f 100644
--- a/js/test/Ice/slicing/objects/Test.ice
+++ b/js/test/Ice/slicing/objects/Test.ice
@@ -107,7 +107,7 @@ exception PreservedException
{
};
-["ami", "format:sliced"]
+["format:sliced"]
interface TestIntf
{
Object SBaseAsObject();
diff --git a/perf/src/Ice/latency/Latency.ice b/perf/src/Ice/latency/Latency.ice
index 800cd1d027b..98a9fb3783f 100644
--- a/perf/src/Ice/latency/Latency.ice
+++ b/perf/src/Ice/latency/Latency.ice
@@ -15,13 +15,13 @@ sequence<byte> ByteSeq;
class Latency
{
- ["ami"] void ping();
+ void ping();
//
// A simple latency test with a payload. The payload size is set
// programmatically.
//
- ["ami"] void withData(ByteSeq payLoad);
+ void withData(ByteSeq payLoad);
void shutdown();
};
diff --git a/php/test/Ice/exceptions/Test.ice b/php/test/Ice/exceptions/Test.ice
index e4c2eb74586..c062413374a 100644
--- a/php/test/Ice/exceptions/Test.ice
+++ b/php/test/Ice/exceptions/Test.ice
@@ -40,7 +40,7 @@ exception D
int dMem;
};
-["ami"] interface Thrower
+interface Thrower
{
void shutdown();
bool supportsUndeclaredExceptions();
@@ -62,7 +62,7 @@ exception D
idempotent void throwLocalExceptionIdempotent();
};
-["ami"] interface WrongOperation
+interface WrongOperation
{
void noSuchOperation();
};
diff --git a/php/test/Ice/operations/Test.ice b/php/test/Ice/operations/Test.ice
index 5929e79fe25..d2cd6a03245 100644
--- a/php/test/Ice/operations/Test.ice
+++ b/php/test/Ice/operations/Test.ice
@@ -62,7 +62,7 @@ dictionary<string, string> StringStringD;
dictionary<string, MyEnum> StringMyEnumD;
dictionary<MyEnum, string> MyEnumStringD;
-["ami"] class MyClass
+class MyClass
{
void shutdown();
@@ -152,7 +152,7 @@ dictionary<MyEnum, string> MyEnumStringD;
["nonmutating"] idempotent void opNonmutating();
};
-["ami"] class MyDerivedClass extends MyClass
+class MyDerivedClass extends MyClass
{
void opDerived();
};
diff --git a/php/test/Ice/optional/Test.ice b/php/test/Ice/optional/Test.ice
index b3829b6b801..8590067c4f5 100644
--- a/php/test/Ice/optional/Test.ice
+++ b/php/test/Ice/optional/Test.ice
@@ -171,7 +171,6 @@ class F extends E
optional(1) A af;
};
-["ami"]
class Initial
{
void shutdown();
diff --git a/protobuf/test/cpp/Test.ice b/protobuf/test/cpp/Test.ice
index ad337be770f..cdcc754e927 100644
--- a/protobuf/test/cpp/Test.ice
+++ b/protobuf/test/cpp/Test.ice
@@ -19,7 +19,7 @@ module Test
["cpp:type:test::Message"] sequence<byte> Message;
-["ami"] class MyClass
+class MyClass
{
void shutdown();
diff --git a/protobuf/test/java/Test.ice b/protobuf/test/java/Test.ice
index 9bdc7a4aeba..933d60578e9 100644
--- a/protobuf/test/java/Test.ice
+++ b/protobuf/test/java/Test.ice
@@ -16,7 +16,7 @@ module Test
["java:protobuf:test.TestPB.Message"] sequence<byte> Message;
-["ami"] class MyClass
+class MyClass
{
void shutdown();
diff --git a/protobuf/test/py/Test.ice b/protobuf/test/py/Test.ice
index c3b0c46a794..6cfde9737a4 100644
--- a/protobuf/test/py/Test.ice
+++ b/protobuf/test/py/Test.ice
@@ -16,7 +16,7 @@ module Test
["python:protobuf:Test_pb2.Message"] sequence<byte> Message;
-["ami"] class MyClass
+class MyClass
{
void shutdown();
diff --git a/py/test/Ice/exceptions/AllTests.py b/py/test/Ice/exceptions/AllTests.py
index 9c3f347a6d5..e49b2dfcc9c 100644
--- a/py/test/Ice/exceptions/AllTests.py
+++ b/py/test/Ice/exceptions/AllTests.py
@@ -53,235 +53,6 @@ class CallbackBase:
self._cond.notify()
self._cond.release()
-class AMI_Thrower_throwAasAI(CallbackBase):
- def ice_response(self):
- test(False)
-
- def ice_exception(self, ex):
- try:
- raise ex
- except Test.A as ex:
- test(ex.aMem == 1)
- except:
- test(False)
- self.called()
-
-class AMI_Thrower_throwAasAObjectNotExistI(CallbackBase):
- def __init__(self, communicator):
- CallbackBase.__init__(self)
- self._communicator = communicator
-
- def ice_response(self):
- test(False)
-
- def ice_exception(self, ex):
- try:
- raise ex
- except Ice.ObjectNotExistException as ex:
- id = self._communicator.stringToIdentity("does not exist")
- test(ex.id == id)
- except:
- test(False)
- self.called()
-
-class AMI_Thrower_throwAasAFacetNotExistI(CallbackBase):
- def ice_response(self):
- test(False)
-
- def ice_exception(self, ex):
- try:
- raise ex
- except Ice.FacetNotExistException as ex:
- test(ex.facet == "no such facet")
- except:
- test(False)
- self.called()
-
-class AMI_Thrower_throwAorDasAorDI(CallbackBase):
- def ice_response(self):
- test(False)
-
- def ice_exception(self, ex):
- try:
- raise ex
- except Test.A as ex:
- test(ex.aMem == 1)
- except Test.D as ex:
- test(ex.dMem == -1)
- except:
- test(False)
- self.called()
-
-class AMI_Thrower_throwBasAI(CallbackBase):
- def ice_response(self):
- test(False)
-
- def ice_exception(self, ex):
- try:
- raise ex
- except Test.B as ex:
- test(ex.aMem == 1)
- test(ex.bMem == 2)
- except:
- test(False)
- self.called()
-
-class AMI_Thrower_throwCasAI(CallbackBase):
- def ice_response(self):
- test(False)
-
- def ice_exception(self, ex):
- try:
- raise ex
- except Test.C as ex:
- test(ex.aMem == 1)
- test(ex.bMem == 2)
- test(ex.cMem == 3)
- except:
- test(False)
- self.called()
-
-class AMI_Thrower_throwBasBI(CallbackBase):
- def ice_response(self):
- test(False)
-
- def ice_exception(self, ex):
- try:
- raise ex
- except Test.B as ex:
- test(ex.aMem == 1)
- test(ex.bMem == 2)
- except:
- test(False)
- self.called()
-
-class AMI_Thrower_throwCasBI(CallbackBase):
- def ice_response(self):
- test(False)
-
- def ice_exception(self, ex):
- try:
- raise ex
- except Test.C as ex:
- test(ex.aMem == 1)
- test(ex.bMem == 2)
- test(ex.cMem == 3)
- except:
- test(False)
- self.called()
-
-class AMI_Thrower_throwCasCI(CallbackBase):
- def ice_response(self):
- test(False)
-
- def ice_exception(self, ex):
- try:
- raise ex
- except Test.C as ex:
- test(ex.aMem == 1)
- test(ex.bMem == 2)
- test(ex.cMem == 3)
- except:
- test(False)
- self.called()
-
-class AMI_Thrower_throwModAI(CallbackBase):
- def ice_response(self):
- test(False)
-
- def ice_exception(self, ex):
- try:
- raise ex
- except Test.Mod.A as ex:
- test(ex.aMem == 1)
- test(ex.a2Mem == 2)
- except Ice.OperationNotExistException:
- #
- # This operation is not supported in Java.
- #
- pass
- except:
- test(False)
- self.called()
-
-class AMI_Thrower_throwUndeclaredAI(CallbackBase):
- def ice_response(self):
- test(False)
-
- def ice_exception(self, ex):
- try:
- raise ex
- except Ice.UnknownUserException:
- pass
- except:
- test(False)
- self.called()
-
-class AMI_Thrower_throwUndeclaredBI(CallbackBase):
- def ice_response(self):
- test(False)
-
- def ice_exception(self, ex):
- try:
- raise ex
- except Ice.UnknownUserException:
- pass
- except:
- test(False)
- self.called()
-
-class AMI_Thrower_throwUndeclaredCI(CallbackBase):
- def ice_response(self):
- test(False)
-
- def ice_exception(self, ex):
- try:
- raise ex
- except Ice.UnknownUserException:
- pass
- except:
- test(False)
- self.called()
-
-class AMI_Thrower_throwLocalExceptionI(CallbackBase):
- def ice_response(self):
- test(False)
-
- def ice_exception(self, ex):
- try:
- raise ex
- except Ice.UnknownLocalException:
- pass
- except:
- test(False)
- self.called()
-
-class AMI_Thrower_throwNonIceExceptionI(CallbackBase):
- def ice_response(self):
- test(False)
-
- def ice_exception(self, ex):
- try:
- raise ex
- except Ice.UnknownException:
- pass
- except:
- test(False)
- self.called()
-
-class AMI_WrongOperation_noSuchOperationI(CallbackBase):
- def ice_response(self):
- test(False)
-
- def ice_exception(self, ex):
- try:
- raise ex
- except Ice.OperationNotExistException as ex:
- test(ex.operation == "noSuchOperation")
- except:
- test(False)
- self.called()
-
class Callback(CallbackBase):
def __init__(self, communicator=None):
CallbackBase.__init__(self)
@@ -838,126 +609,7 @@ def allTests(communicator):
print("ok")
- sys.stdout.write("catching exact types with AMI... ")
- sys.stdout.flush()
-
- cb = 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()
-
- cb = AMI_Thrower_throwAorDasAorDI()
- thrower.throwAorDasAorD_async(cb, 1)
- cb.check()
-
- cb = AMI_Thrower_throwAorDasAorDI()
- thrower.throwAorDasAorD_async(cb, -1)
- cb.check()
-
- cb = AMI_Thrower_throwBasBI()
- thrower.throwBasB_async(cb, 1, 2)
- cb.check()
-
- cb = 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()
-
- cb = AMI_Thrower_throwModAI()
- thrower.throwModA_async(cb, 1, 2)
- cb.check()
-
- print("ok")
-
- sys.stdout.write("catching derived types... ")
- sys.stdout.flush()
-
- cb = AMI_Thrower_throwBasAI()
- thrower.throwBasA_async(cb, 1, 2)
- cb.check()
-
- cb = AMI_Thrower_throwCasAI()
- thrower.throwCasA_async(cb, 1, 2, 3)
- cb.check()
-
- cb = AMI_Thrower_throwCasBI()
- thrower.throwCasB_async(cb, 1, 2, 3)
- cb.check()
-
- print("ok")
-
- if thrower.supportsUndeclaredExceptions():
- sys.stdout.write("catching unknown user exception with AMI... ")
- sys.stdout.flush()
-
- cb = AMI_Thrower_throwUndeclaredAI()
- thrower.throwUndeclaredA_async(cb, 1)
- cb.check()
-
- cb = AMI_Thrower_throwUndeclaredBI()
- thrower.throwUndeclaredB_async(cb, 1, 2)
- cb.check()
-
- cb = AMI_Thrower_throwUndeclaredCI()
- thrower.throwUndeclaredC_async(cb, 1, 2, 3)
- cb.check()
-
- print("ok")
-
- sys.stdout.write("catching object not exist exception with AMI... ")
- sys.stdout.flush()
-
- id = communicator.stringToIdentity("does not exist")
- thrower2 = Test.ThrowerPrx.uncheckedCast(thrower.ice_identity(id))
- cb = AMI_Thrower_throwAasAObjectNotExistI(communicator)
- thrower2.throwAasA_async(cb, 1)
- cb.check()
-
- print("ok")
-
- sys.stdout.write("catching facet not exist exception with AMI... ")
- sys.stdout.flush()
-
- thrower2 = Test.ThrowerPrx.uncheckedCast(thrower, "no such facet")
- cb = AMI_Thrower_throwAasAFacetNotExistI()
- thrower2.throwAasA_async(cb, 1)
- cb.check()
-
- print("ok")
-
- sys.stdout.write("catching operation not exist exception with AMI... ")
- sys.stdout.flush()
-
- cb = AMI_WrongOperation_noSuchOperationI()
- thrower4 = Test.WrongOperationPrx.uncheckedCast(thrower)
- thrower4.noSuchOperation_async(cb)
- cb.check()
-
- print("ok")
-
- sys.stdout.write("catching unknown local exception with AMI... ")
- sys.stdout.flush()
-
- cb = AMI_Thrower_throwLocalExceptionI()
- thrower.throwLocalException_async(cb)
- cb.check()
-
- print("ok")
-
- sys.stdout.write("catching unknown non-Ice exception with AMI... ")
- sys.stdout.flush()
-
- cb = AMI_Thrower_throwNonIceExceptionI()
- thrower.throwNonIceException_async(cb)
- cb.check()
-
- print("ok")
-
- sys.stdout.write("catching exact types with new AMI mapping... ")
+ sys.stdout.write("catching exact types with AMI mapping... ")
sys.stdout.flush()
cb = Callback()
@@ -986,7 +638,7 @@ def allTests(communicator):
print("ok")
- sys.stdout.write("catching derived types with new AMI mapping... ")
+ sys.stdout.write("catching derived types with AMI mapping... ")
sys.stdout.flush()
cb = Callback()
@@ -1004,7 +656,7 @@ def allTests(communicator):
print("ok")
if thrower.supportsUndeclaredExceptions():
- sys.stdout.write("catching unknown user exception with new AMI mapping... ")
+ sys.stdout.write("catching unknown user exception with AMI mapping... ")
sys.stdout.flush()
cb = Callback()
@@ -1021,7 +673,7 @@ def allTests(communicator):
print("ok")
- sys.stdout.write("catching object not exist exception with new AMI mapping... ")
+ sys.stdout.write("catching object not exist exception with AMI mapping... ")
sys.stdout.flush()
id = communicator.stringToIdentity("does not exist")
@@ -1032,7 +684,7 @@ def allTests(communicator):
print("ok")
- sys.stdout.write("catching facet not exist exception with new AMI mapping... ")
+ sys.stdout.write("catching facet not exist exception with AMI mapping... ")
sys.stdout.flush()
thrower2 = Test.ThrowerPrx.uncheckedCast(thrower, "no such facet")
@@ -1042,7 +694,7 @@ def allTests(communicator):
print("ok")
- sys.stdout.write("catching operation not exist exception with new AMI mapping... ")
+ sys.stdout.write("catching operation not exist exception with AMI mapping... ")
sys.stdout.flush()
cb = Callback()
@@ -1052,7 +704,7 @@ def allTests(communicator):
print("ok")
- sys.stdout.write("catching unknown local exception with new AMI mapping... ")
+ sys.stdout.write("catching unknown local exception with AMI mapping... ")
sys.stdout.flush()
cb = Callback()
@@ -1065,7 +717,7 @@ def allTests(communicator):
print("ok")
- sys.stdout.write("catching unknown non-Ice exception with new AMI mapping... ")
+ sys.stdout.write("catching unknown non-Ice exception with AMI mapping... ")
sys.stdout.flush()
cb = Callback()
diff --git a/py/test/Ice/exceptions/Test.ice b/py/test/Ice/exceptions/Test.ice
index 3806f9d8e20..93f6014afc6 100644
--- a/py/test/Ice/exceptions/Test.ice
+++ b/py/test/Ice/exceptions/Test.ice
@@ -48,7 +48,7 @@ module Mod
};
};
-["ami"] interface Thrower
+interface Thrower
{
void shutdown();
bool supportsUndeclaredExceptions();
@@ -78,7 +78,7 @@ module Mod
void throwAfterException() throws A;
};
-["ami"] interface WrongOperation
+interface WrongOperation
{
void noSuchOperation();
};
diff --git a/py/test/Ice/exceptions/TestAMD.ice b/py/test/Ice/exceptions/TestAMD.ice
index 38c500bef22..860a9a15cf1 100644
--- a/py/test/Ice/exceptions/TestAMD.ice
+++ b/py/test/Ice/exceptions/TestAMD.ice
@@ -45,7 +45,7 @@ module Mod
};
-["ami", "amd"] interface Thrower
+["amd"] interface Thrower
{
void shutdown();
bool supportsUndeclaredExceptions();
@@ -73,7 +73,7 @@ module Mod
void throwAfterException() throws A;
};
-["ami", "amd"] interface WrongOperation
+["amd"] interface WrongOperation
{
void noSuchOperation();
};
diff --git a/py/test/Ice/operations/AllTests.py b/py/test/Ice/operations/AllTests.py
index 62005a92cbc..e9533aa4ae1 100644
--- a/py/test/Ice/operations/AllTests.py
+++ b/py/test/Ice/operations/AllTests.py
@@ -37,21 +37,11 @@ def allTests(communicator):
TwowaysAMI.twowaysAMI(communicator, cl)
print("ok")
- sys.stdout.write("testing twoway operations with new AMI mapping... ")
- sys.stdout.flush()
- TwowaysNewAMI.twowaysNewAMI(communicator, cl)
- print("ok")
-
sys.stdout.write("testing oneway operations with AMI... ")
sys.stdout.flush()
OnewaysAMI.onewaysAMI(communicator, cl)
print("ok")
- sys.stdout.write("testing oneway operations with new AMI mapping... ")
- sys.stdout.flush()
- OnewaysNewAMI.onewaysNewAMI(communicator, cl)
- print("ok")
-
sys.stdout.write("testing batch oneway operations... ")
sys.stdout.flush()
BatchOneways.batchOneways(cl)
diff --git a/py/test/Ice/operations/OnewaysAMI.py b/py/test/Ice/operations/OnewaysAMI.py
index e96ed5f6183..671c1f1853d 100644
--- a/py/test/Ice/operations/OnewaysAMI.py
+++ b/py/test/Ice/operations/OnewaysAMI.py
@@ -7,7 +7,7 @@
#
# **********************************************************************
-import Ice, Test, math, threading
+import Ice, Test, threading
def test(b):
if not b:
@@ -33,86 +33,53 @@ class CallbackBase:
self._cond.notify()
self._cond.release()
-class AMI_MyClass_opVoidI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self):
+class Callback(CallbackBase):
+ def sent(self, sentSynchronously):
self.called()
- def ice_exception(self, ex):
+ def noException(self, ex):
test(False)
-class AMI_MyClass_opIdempotentI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self):
- self.called()
-
- def ice_exception(self, ex):
- test(False)
+def onewaysAMI(communicator, proxy):
-class AMI_MyClass_opNonmutatingI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
+ p = Test.MyClassPrx.uncheckedCast(proxy.ice_oneway())
- def ice_response(self):
- self.called()
+ cb = Callback()
+ p.begin_ice_ping(None, cb.noException, cb.sent)
+ cb.check()
- def ice_exception(self, ex):
+ try:
+ p.begin_ice_isA(Test.MyClass.ice_staticId())
test(False)
+ except RuntimeError:
+ pass
-class AMI_MyClass_opVoidExI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self):
+ try:
+ p.begin_ice_id()
test(False)
+ except RuntimeError:
+ pass
- def ice_exception(self, ex):
- test(isinstance(ex, Ice.NoEndpointException))
- self.called()
-
-class AMI_MyClass_opByteExI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self, r, b):
+ try:
+ p.begin_ice_ids()
test(False)
+ except RuntimeError:
+ pass
- def ice_exception(self, ex):
- test(isinstance(ex, Ice.TwowayOnlyException))
- self.called()
-
-def onewaysAMI(communicator, p):
-
- p = Test.MyClassPrx.uncheckedCast(p.ice_oneway())
-
- cb = 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)
-
- cb = AMI_MyClass_opIdempotentI()
- p.opIdempotent_async(cb)
+ cb = Callback()
+ p.begin_opVoid(None, cb.noException, cb.sent)
+ cb.check()
- cb = AMI_MyClass_opNonmutatingI()
- p.opNonmutating_async(cb)
+ cb = Callback()
+ p.begin_opIdempotent(None, cb.noException, cb.sent)
+ cb.check()
- # Check that a call to a void operation raises NoEndpointException
- # in the ice_exception() callback instead of at the point of call.
- indirect = Test.MyClassPrx.uncheckedCast(p.ice_adapterId("dummy"))
- cb = AMI_MyClass_opVoidExI()
- try:
- indirect.opVoid_async(cb)
- except Ice.Exception:
- test(False)
+ cb = Callback()
+ p.begin_opNonmutating(None, cb.noException, cb.sent)
cb.check()
- cb = AMI_MyClass_opByteExI()
try:
- p.opByte_async(cb, 0, 0)
- except Ice.Exception:
+ p.begin_opByte(0xff, 0x0f)
test(False)
- cb.check()
+ except RuntimeError:
+ pass
diff --git a/py/test/Ice/operations/OnewaysNewAMI.py b/py/test/Ice/operations/OnewaysNewAMI.py
deleted file mode 100644
index 7ca1eac45dd..00000000000
--- a/py/test/Ice/operations/OnewaysNewAMI.py
+++ /dev/null
@@ -1,85 +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.
-#
-# **********************************************************************
-
-import Ice, Test, threading
-
-def test(b):
- if not b:
- raise RuntimeError('test assertion failed')
-
-class CallbackBase:
- def __init__(self):
- self._called = False
- self._cond = threading.Condition()
-
- def check(self):
- self._cond.acquire()
- try:
- while not self._called:
- self._cond.wait()
- self._called = False
- finally:
- self._cond.release()
-
- def called(self):
- self._cond.acquire()
- self._called = True
- self._cond.notify()
- self._cond.release()
-
-class Callback(CallbackBase):
- def sent(self, sentSynchronously):
- self.called()
-
- def noException(self, ex):
- test(False)
-
-def onewaysNewAMI(communicator, proxy):
-
- p = Test.MyClassPrx.uncheckedCast(proxy.ice_oneway())
-
- cb = Callback()
- p.begin_ice_ping(None, cb.noException, cb.sent)
- cb.check()
-
- try:
- p.begin_ice_isA(Test.MyClass.ice_staticId())
- test(False)
- except RuntimeError:
- pass
-
- try:
- p.begin_ice_id()
- test(False)
- except RuntimeError:
- pass
-
- try:
- p.begin_ice_ids()
- test(False)
- except RuntimeError:
- pass
-
- cb = Callback()
- p.begin_opVoid(None, cb.noException, cb.sent)
- cb.check()
-
- cb = Callback()
- p.begin_opIdempotent(None, cb.noException, cb.sent)
- cb.check()
-
- cb = Callback()
- p.begin_opNonmutating(None, cb.noException, cb.sent)
- cb.check()
-
- try:
- p.begin_opByte(0xff, 0x0f)
- test(False)
- except RuntimeError:
- pass
diff --git a/py/test/Ice/operations/Test.ice b/py/test/Ice/operations/Test.ice
index 5baa8bde82e..7839b36cd28 100644
--- a/py/test/Ice/operations/Test.ice
+++ b/py/test/Ice/operations/Test.ice
@@ -73,7 +73,7 @@ dictionary<string, MyEnum> StringMyEnumD;
dictionary<MyEnum, string> MyEnumStringD;
dictionary<MyStruct, MyEnum> MyStructMyEnumD;
-["ami"] class MyClass
+class MyClass
{
void shutdown();
@@ -169,7 +169,7 @@ dictionary<MyStruct, MyEnum> MyStructMyEnumD;
["nonmutating"] idempotent void opNonmutating();
};
-["ami"] class MyDerivedClass extends MyClass
+class MyDerivedClass extends MyClass
{
void opDerived();
};
diff --git a/py/test/Ice/operations/TestAMD.ice b/py/test/Ice/operations/TestAMD.ice
index 97ff66d4402..6866d6fb72b 100644
--- a/py/test/Ice/operations/TestAMD.ice
+++ b/py/test/Ice/operations/TestAMD.ice
@@ -71,7 +71,7 @@ dictionary<string, MyEnum> StringMyEnumD;
dictionary<MyEnum, string> MyEnumStringD;
dictionary<MyStruct, MyEnum> MyStructMyEnumD;
-["ami", "amd"] class MyClass
+["amd"] class MyClass
{
void shutdown();
@@ -167,7 +167,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/py/test/Ice/operations/TwowaysAMI.py b/py/test/Ice/operations/TwowaysAMI.py
index f92dc3513ce..618e3de769a 100644
--- a/py/test/Ice/operations/TwowaysAMI.py
+++ b/py/test/Ice/operations/TwowaysAMI.py
@@ -33,119 +33,63 @@ class CallbackBase:
self._cond.notify()
self._cond.release()
-class AMI_MyClass_opVoidI(CallbackBase):
- def __init__(self):
+class Callback(CallbackBase):
+ def __init__(self, communicator=None):
CallbackBase.__init__(self)
+ self._communicator = communicator
- def ice_response(self):
+ def ping(self):
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opVoidExI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
+ def isA(self, r):
+ test(r)
+ self.called()
- def ice_response(self):
- test(False)
+ def id(self, id):
+ test(id == "::Test::MyDerivedClass")
+ self.called()
- def ice_exception(self, ex):
- test(isinstance(ex, Ice.NoEndpointException))
+ def ids(self, ids):
+ test(len(ids) == 3)
self.called()
-class AMI_MyClass_opByteI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
+ def opVoid(self):
+ self.called()
- def ice_response(self, r, b):
+ def opByte(self, r, b):
test(b == 0xf0)
test(r == 0xff)
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opByteExI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self, r, b):
- test(False)
-
- def ice_exception(self, ex):
- test(isinstance(ex, Ice.NoEndpointException))
- self.called()
-
-class AMI_MyClass_opBoolI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self, r, b):
+ def opBool(self, r, b):
test(b)
test(not r)
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opShortIntLongI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self, r, s, i, l):
+ def opShortIntLong(self, r, s, i, l):
test(s == 10)
test(i == 11)
test(l == 12)
test(r == 12)
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opFloatDoubleI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self, r, f, d):
+ def opFloatDouble(self, r, f, d):
test(f - 3.14 < 0.001)
test(d == 1.1E10)
test(r == 1.1E10)
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opStringI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self, r, s):
+ def opString(self, r, s):
test(s == "world hello")
test(r == "hello world")
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opMyEnumI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self, r, e):
+ def opMyEnum(self, r, e):
test(e == Test.MyEnum.enum2)
test(r == Test.MyEnum.enum3)
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opMyClassI(CallbackBase):
- def __init__(self, communicator):
- CallbackBase.__init__(self)
- self._communicator = communicator
-
- def ice_response(self, r, c1, c2):
+ def opMyClass(self, r, c1, c2):
test(c1.ice_getIdentity() == self._communicator.stringToIdentity("test"))
test(c2.ice_getIdentity() == self._communicator.stringToIdentity("noSuchIdentity"))
test(r.ice_getIdentity() == self._communicator.stringToIdentity("test"))
@@ -160,16 +104,7 @@ class AMI_MyClass_opMyClassI(CallbackBase):
pass
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opStructI(CallbackBase):
-
- def __init__(self, communicator):
- CallbackBase.__init__(self)
- self._communicator = communicator
-
- def ice_response(self, rso, so):
+ def opStruct(self, rso, so):
test(rso.p == None)
test(rso.e == Test.MyEnum.enum2)
test(rso.s.s == "def")
@@ -180,14 +115,7 @@ class AMI_MyClass_opStructI(CallbackBase):
so.p.opVoid()
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opByteSI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self, rso, bso):
+ def opByteS(self, rso, bso):
test(len(bso) == 4)
test(len(rso) == 8)
if sys.version_info[0] == 2:
@@ -218,14 +146,7 @@ class AMI_MyClass_opByteSI(CallbackBase):
test(rso[7] == 0xf4)
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opBoolSI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self, rso, bso):
+ def opBoolS(self, rso, bso):
test(len(bso) == 4)
test(bso[0])
test(bso[1])
@@ -237,14 +158,7 @@ class AMI_MyClass_opBoolSI(CallbackBase):
test(rso[2])
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opShortIntLongSI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self, rso, sso, iso, lso):
+ def opShortIntLongS(self, rso, sso, iso, lso):
test(len(sso) == 3)
test(sso[0] == 1)
test(sso[1] == 2)
@@ -267,14 +181,7 @@ class AMI_MyClass_opShortIntLongSI(CallbackBase):
test(rso[2] == 20)
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opFloatDoubleSI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self, rso, fso, dso):
+ def opFloatDoubleS(self, rso, fso, dso):
test(len(fso) == 2)
test(fso[0] - 3.14 < 0.001)
test(fso[1] - 1.11 < 0.001)
@@ -290,14 +197,7 @@ class AMI_MyClass_opFloatDoubleSI(CallbackBase):
test(rso[4] - 1.11 < 0.001)
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opStringSI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self, rso, sso):
+ def opStringS(self, rso, sso):
test(len(sso) == 4)
test(sso[0] == "abc")
test(sso[1] == "de")
@@ -309,14 +209,7 @@ class AMI_MyClass_opStringSI(CallbackBase):
test(rso[2] == "abc")
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opByteSSI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self, rso, bso):
+ def opByteSS(self, rso, bso):
test(len(bso) == 2)
test(len(bso[0]) == 1)
test(len(bso[1]) == 3)
@@ -351,14 +244,7 @@ class AMI_MyClass_opByteSSI(CallbackBase):
test(rso[3][1] == 0xf1)
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opBoolSSI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self, rso, bso):
+ def opBoolSS(self, rso, bso):
test(len(bso) == 4);
test(len(bso[0]) == 1);
test(bso[0][0]);
@@ -381,11 +267,7 @@ class AMI_MyClass_opBoolSSI(CallbackBase):
test(rso[2][0]);
self.called();
-class AMI_MyClass_opShortIntLongSSI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self, rso, sso, iso, lso):
+ def opShortIntLongSS(self, rso, sso, iso, lso):
test(len(rso) == 1);
test(len(rso[0]) == 2);
test(rso[0][0] == 496);
@@ -413,11 +295,7 @@ class AMI_MyClass_opShortIntLongSSI(CallbackBase):
test(lso[1][1] == 1729);
self.called();
-class AMI_MyClass_opFloatDoubleSSI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self, rso, fso, dso):
+ def opFloatDoubleSS(self, rso, fso, dso):
test(len(fso) == 3)
test(len(fso[0]) == 1)
test(fso[0][0] - 3.14 < 0.001)
@@ -440,14 +318,7 @@ class AMI_MyClass_opFloatDoubleSSI(CallbackBase):
test(rso[1][2] == 1.3E10)
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opStringSSI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self, rso, sso):
+ def opStringSS(self, rso, sso):
test(len(sso) == 5)
test(len(sso[0]) == 1)
test(sso[0][0] == "abc")
@@ -465,14 +336,7 @@ class AMI_MyClass_opStringSSI(CallbackBase):
test(len(rso[2]) == 0)
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opByteBoolDI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self, ro, do):
+ def opByteBoolD(self, ro, do):
di1 = {10: True, 100: False}
test(do == di1)
test(len(ro) == 4)
@@ -482,14 +346,7 @@ class AMI_MyClass_opByteBoolDI(CallbackBase):
test(ro[101])
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opShortIntDI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self, ro, do):
+ def opShortIntD(self, ro, do):
di1 = {110: -1, 1100: 123123}
test(do == di1)
test(len(ro) == 4)
@@ -499,14 +356,7 @@ class AMI_MyClass_opShortIntDI(CallbackBase):
test(ro[1101] == 0)
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opLongFloatDI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self, ro, do):
+ def opLongFloatD(self, ro, do):
di1 = {999999110: -1.1, 999999111: 123123.2}
for k in do:
test(math.fabs(do[k] - di1[k]) < 0.01)
@@ -517,14 +367,7 @@ class AMI_MyClass_opLongFloatDI(CallbackBase):
test(ro[999999130] - 0.5 < 0.01)
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opStringStringDI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self, ro, do):
+ def opStringStringD(self, ro, do):
di1 = {'foo': 'abc -1.1', 'bar': 'abc 123123.2'}
test(do == di1)
test(len(ro) == 4)
@@ -534,14 +377,7 @@ class AMI_MyClass_opStringStringDI(CallbackBase):
test(ro["BAR"] == "abc 0.5")
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opStringMyEnumDI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self, ro, do):
+ def opStringMyEnumD(self, ro, do):
di1 = {'abc': Test.MyEnum.enum1, '': Test.MyEnum.enum2}
test(do == di1)
test(len(ro) == 4)
@@ -551,14 +387,7 @@ class AMI_MyClass_opStringMyEnumDI(CallbackBase):
test(ro["Hello!!"] == Test.MyEnum.enum2)
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opMyEnumStringDI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self, ro, do):
+ def opMyEnumStringD(self, ro, do):
di1 = {Test.MyEnum.enum1: 'abc'}
test(do == di1)
test(len(ro) == 3)
@@ -567,14 +396,7 @@ class AMI_MyClass_opMyEnumStringDI(CallbackBase):
test(ro[Test.MyEnum.enum3] == "qwerty")
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opMyStructMyEnumDI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self, ro, do):
+ def opMyStructMyEnumD(self, ro, do):
s11 = Test.MyStruct()
s11.i = 1
s11.j = 1
@@ -596,179 +418,80 @@ class AMI_MyClass_opMyStructMyEnumDI(CallbackBase):
test(ro[s23] == Test.MyEnum.enum2)
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opIntSI(CallbackBase):
- def __init__(self, l):
- CallbackBase.__init__(self)
- self._l = l
-
- def ice_response(self, r):
- test(len(r) == self._l)
- for j in range(0, self._l):
+ def opIntS(self, r):
+ for j in range(0, len(r)):
test(r[j] == -j)
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opContextEqualI(CallbackBase):
- def __init__(self, d):
- CallbackBase.__init__(self)
- self._d = d
-
- def ice_response(self, r):
- test(r == self._d)
- self.called()
-
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opContextNotEqualI(CallbackBase):
- def __init__(self, d):
- CallbackBase.__init__(self)
- self._d = d
-
- def ice_response(self, r):
- test(r != self._d)
- self.called()
-
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opIdempotentI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self):
+ def opIdempotent(self):
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyClass_opNonmutatingI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self):
+ def opNonmutating(self):
self.called()
- def ice_exception(self, ex):
- test(False)
-
-class AMI_MyDerivedClass_opDerivedI(CallbackBase):
- def __init__(self):
- CallbackBase.__init__(self)
-
- def ice_response(self):
+ def opDerived(self):
self.called()
- def ice_exception(self, ex):
+ def exCB(self, ex):
test(False)
def twowaysAMI(communicator, p):
- # Check that a call to a void operation raises NoEndpointException
- # in the ice_exception() callback instead of at the point of call.
- indirect = Test.MyClassPrx.uncheckedCast(p.ice_adapterId("dummy"))
- cb = AMI_MyClass_opVoidExI()
- try:
- test(not indirect.opVoid_async(cb))
- except Ice.Exception:
- test(False)
+ cb = Callback()
+ p.begin_ice_ping(cb.ping, cb.exCB)
cb.check()
- # Check that a call to a twoway operation raises NoEndpointException
- # in the ice_exception() callback instead of at the point of call.
- indirect = Test.MyClassPrx.uncheckedCast(p.ice_adapterId("dummy"))
- cb = AMI_MyClass_opByteExI()
- try:
- test(not indirect.opByte_async(cb, 0, 0))
- except Ice.Exception:
- test(False)
+ cb = Callback()
+ p.begin_ice_isA(Test.MyClass.ice_staticId(), cb.isA, cb.exCB)
cb.check()
- #
- # opVoid
- #
- cb = AMI_MyClass_opVoidI()
- p.opVoid_async(cb)
+ cb = Callback()
+ p.begin_ice_id(cb.id, cb.exCB)
cb.check()
- # Let's check if we can reuse the same callback object for another call.
- p.opVoid_async(cb)
+
+ cb = Callback()
+ p.begin_ice_ids(cb.ids, cb.exCB)
cb.check()
- # Check that CommunicatorDestroyedException is raised directly.
- initData = Ice.InitializationData()
- initData.properties = communicator.getProperties().clone()
- ic = Ice.initialize(initData)
- obj = ic.stringToProxy(p.ice_toString())
- p2 = Test.MyClassPrx.checkedCast(obj)
+ r = p.begin_opVoid()
+ p.end_opVoid(r)
- ic.destroy()
+ cb = Callback()
+ p.begin_opVoid(cb.opVoid, cb.exCB)
+ cb.check()
- cb = AMI_MyClass_opVoidI()
- try:
- test(not p2.opVoid_async(cb))
- test(False)
- except Ice.CommunicatorDestroyedException:
- pass # Expected.
+ r = p.begin_opByte(0xff, 0x0f)
+ (ret, p3) = p.end_opByte(r)
+ test(p3 == 0xf0)
+ test(ret == 0xff)
- #
- # opByte
- #
- cb = AMI_MyClass_opByteI()
- p.opByte_async(cb, 0xff, 0x0f)
+ cb = Callback()
+ p.begin_opByte(0xff, 0x0f, cb.opByte, cb.exCB)
cb.check()
- #
- # opBool
- #
- cb = AMI_MyClass_opBoolI()
- p.opBool_async(cb, True, False)
+ cb = Callback()
+ p.begin_opBool(True, False, cb.opBool, cb.exCB)
cb.check()
- #
- # opShortIntLong
- #
- cb = AMI_MyClass_opShortIntLongI()
- p.opShortIntLong_async(cb, 10, 11, 12)
+ cb = Callback()
+ p.begin_opShortIntLong(10, 11, 12, cb.opShortIntLong, cb.exCB)
cb.check()
- #
- # opFloatDouble
- #
- cb = AMI_MyClass_opFloatDoubleI()
- p.opFloatDouble_async(cb, 3.14, 1.1E10)
- cb.check()
- # Let's check if we can reuse the same callback object for another call.
- p.opFloatDouble_async(cb, 3.14, 1.1E10)
+ cb = Callback()
+ p.begin_opFloatDouble(3.14, 1.1E10, cb.opFloatDouble, cb.exCB)
cb.check()
- #
- # opString
- #
- cb = AMI_MyClass_opStringI()
- p.opString_async(cb, "hello", "world")
+ cb = Callback()
+ p.begin_opString("hello", "world", cb.opString, cb.exCB)
cb.check()
- #
- # opMyEnum
- #
- cb = AMI_MyClass_opMyEnumI()
- p.opMyEnum_async(cb, Test.MyEnum.enum2)
+ cb = Callback()
+ p.begin_opMyEnum(Test.MyEnum.enum2, cb.opMyEnum, cb.exCB)
cb.check()
- #
- # opMyClass
- #
- cb = AMI_MyClass_opMyClassI(communicator)
- p.opMyClass_async(cb, p)
+ cb = Callback(communicator)
+ p.begin_opMyClass(p, cb.opMyClass, cb.exCB)
cb.check()
- #
- # opStruct
- #
si1 = Test.Structure()
si1.p = p
si1.e = Test.MyEnum.enum3
@@ -780,175 +503,124 @@ def twowaysAMI(communicator, p):
si2.s = Test.AnotherStruct()
si2.s.s = "def"
- cb = AMI_MyClass_opStructI(communicator)
- p.opStruct_async(cb, si1, si2)
+ cb = Callback(communicator)
+ p.begin_opStruct(si1, si2, cb.opStruct, cb.exCB)
cb.check()
- #
- # opByteS
- #
bsi1 = (0x01, 0x11, 0x12, 0x22)
bsi2 = (0xf1, 0xf2, 0xf3, 0xf4)
- cb = AMI_MyClass_opByteSI()
- p.opByteS_async(cb, bsi1, bsi2)
+ cb = Callback()
+ p.begin_opByteS(bsi1, bsi2, cb.opByteS, cb.exCB)
cb.check()
- #
- # opBoolS
- #
bsi1 = (True, True, False)
bsi2 = (False,)
- cb = AMI_MyClass_opBoolSI()
- p.opBoolS_async(cb, bsi1, bsi2)
+ cb = Callback()
+ p.begin_opBoolS(bsi1, bsi2, cb.opBoolS, cb.exCB)
cb.check()
- #
- # opShortIntLongS
- #
ssi = (1, 2, 3)
isi = (5, 6, 7, 8)
lsi = (10, 30, 20)
- cb = AMI_MyClass_opShortIntLongSI()
- p.opShortIntLongS_async(cb, ssi, isi, lsi)
+ cb = Callback()
+ p.begin_opShortIntLongS(ssi, isi, lsi, cb.opShortIntLongS, cb.exCB)
cb.check()
- #
- # opFloatDoubleS
- #
fsi = (3.14, 1.11)
dsi = (1.1E10, 1.2E10, 1.3E10)
- cb = AMI_MyClass_opFloatDoubleSI()
- p.opFloatDoubleS_async(cb, fsi, dsi)
+ cb = Callback()
+ p.begin_opFloatDoubleS(fsi, dsi, cb.opFloatDoubleS, cb.exCB)
cb.check()
- #
- # opStringS
- #
ssi1 = ('abc', 'de', 'fghi')
ssi2 = ('xyz',)
- cb = AMI_MyClass_opStringSI()
- p.opStringS_async(cb, ssi1, ssi2)
+ cb = Callback()
+ p.begin_opStringS(ssi1, ssi2, cb.opStringS, cb.exCB)
cb.check()
- #
- # opByteSS
- #
bsi1 = ((0x01, 0x11, 0x12), (0xff,))
bsi2 = ((0x0e,), (0xf2, 0xf1))
- cb = AMI_MyClass_opByteSSI()
- p.opByteSS_async(cb, bsi1, bsi2)
+ cb = Callback()
+ p.begin_opByteSS(bsi1, bsi2, cb.opByteSS, cb.exCB)
cb.check()
- #
- # opBoolSS
- #
bsi1 = ((True,), (False,), (True, True),)
bsi2 = ((False, False, True),)
- cb = AMI_MyClass_opBoolSSI()
- p.opBoolSS_async(cb, bsi1, bsi2)
- cb.check()
+ cb = Callback()
+ p.begin_opBoolSS(bsi1, bsi2, cb.opBoolSS, cb.exCB)
+ cb.check();
- #
- # opShortIntLongSS
- #
ssi = ((1,2,5), (13,), ())
isi = ((24, 98), (42,))
lsi = ((496, 1729),)
- cb = AMI_MyClass_opShortIntLongSSI()
- p.opShortIntLongSS_async(cb, ssi, isi, lsi)
+ cb = Callback()
+ p.begin_opShortIntLongSS(ssi, isi, lsi, cb.opShortIntLongSS, cb.exCB)
cb.check()
- #
- # opFloatDoubleSS
- #
fsi = ((3.14,), (1.11,), ())
dsi = ((1.1E10, 1.2E10, 1.3E10),)
- cb = AMI_MyClass_opFloatDoubleSSI()
- p.opFloatDoubleSS_async(cb, fsi, dsi)
+ cb = Callback()
+ p.begin_opFloatDoubleSS(fsi, dsi, cb.opFloatDoubleSS, cb.exCB)
cb.check()
- #
- # opStringSS
- #
ssi1 = (('abc',), ('de', 'fghi'))
ssi2 = ((), (), ('xyz',))
- cb = AMI_MyClass_opStringSSI()
- p.opStringSS_async(cb, ssi1, ssi2)
+ cb = Callback()
+ p.begin_opStringSS(ssi1, ssi2, cb.opStringSS, cb.exCB)
cb.check()
- #
- # opByteBoolD
- #
di1 = {10: True, 100: False}
di2 = {10: True, 11: False, 101: True}
- cb = AMI_MyClass_opByteBoolDI()
- p.opByteBoolD_async(cb, di1, di2)
+ cb = Callback()
+ p.begin_opByteBoolD(di1, di2, cb.opByteBoolD, cb.exCB)
cb.check()
- #
- # opShortIntD
- #
di1 = {110: -1, 1100: 123123}
di2 = {110: -1, 111: -100, 1101: 0}
- cb = AMI_MyClass_opShortIntDI()
- p.opShortIntD_async(cb, di1, di2)
+ cb = Callback()
+ p.begin_opShortIntD(di1, di2, cb.opShortIntD, cb.exCB)
cb.check()
- #
- # opLongFloatD
- #
di1 = {999999110: -1.1, 999999111: 123123.2}
di2 = {999999110: -1.1, 999999120: -100.4, 999999130: 0.5}
- cb = AMI_MyClass_opLongFloatDI()
- p.opLongFloatD_async(cb, di1, di2)
+ cb = Callback()
+ p.begin_opLongFloatD(di1, di2, cb.opLongFloatD, cb.exCB)
cb.check()
- #
- # opStringStringD
- #
di1 = {'foo': 'abc -1.1', 'bar': 'abc 123123.2'}
di2 = {'foo': 'abc -1.1', 'FOO': 'abc -100.4', 'BAR': 'abc 0.5'}
- cb = AMI_MyClass_opStringStringDI()
- p.opStringStringD_async(cb, di1, di2)
+ cb = Callback()
+ p.begin_opStringStringD(di1, di2, cb.opStringStringD, cb.exCB)
cb.check()
- #
- # opStringMyEnumD
- #
di1 = {'abc': Test.MyEnum.enum1, '': Test.MyEnum.enum2}
di2 = {'abc': Test.MyEnum.enum1, 'qwerty': Test.MyEnum.enum3, 'Hello!!': Test.MyEnum.enum2}
- cb = AMI_MyClass_opStringMyEnumDI()
- p.opStringMyEnumD_async(cb, di1, di2)
+ cb = Callback()
+ p.begin_opStringMyEnumD(di1, di2, cb.opStringMyEnumD, cb.exCB)
cb.check()
- #
- # opMyEnumStringD
- #
di1 = {Test.MyEnum.enum1: 'abc'}
di2 = {Test.MyEnum.enum2: 'Hello!!', Test.MyEnum.enum3: 'qwerty'}
- cb = AMI_MyClass_opMyEnumStringDI()
- p.opMyEnumStringD_async(cb, di1, di2)
+ cb = Callback()
+ p.begin_opMyEnumStringD(di1, di2, cb.opMyEnumStringD, cb.exCB)
cb.check()
- #
- # opMyStructMyEnumD
- #
s11 = Test.MyStruct()
s11.i = 1
s11.j = 1
@@ -964,48 +636,40 @@ def twowaysAMI(communicator, p):
di1 = {s11: Test.MyEnum.enum1, s12: Test.MyEnum.enum2}
di2 = {s11: Test.MyEnum.enum1, s22: Test.MyEnum.enum3, s23: Test.MyEnum.enum2}
- cb = AMI_MyClass_opMyStructMyEnumDI()
- p.opMyStructMyEnumD_async(cb, di1, di2)
+ cb = Callback()
+ p.begin_opMyStructMyEnumD(di1, di2, cb.opMyStructMyEnumD, cb.exCB)
cb.check()
- #
- # opIntS
- #
lengths = ( 0, 1, 2, 126, 127, 128, 129, 253, 254, 255, 256, 257, 1000 )
for l in lengths:
s = []
for i in range(l):
s.append(i)
- cb = AMI_MyClass_opIntSI(l)
- p.opIntS_async(cb, s)
+ cb = Callback(l)
+ p.begin_opIntS(s, cb.opIntS, cb.exCB)
cb.check()
- #
- # opContext
- #
ctx = {'one': 'ONE', 'two': 'TWO', 'three': 'THREE'}
test(len(p.ice_getContext()) == 0)
- cb = AMI_MyClass_opContextNotEqualI(ctx)
- p.opContext_async(cb)
- cb.check()
+ r = p.begin_opContext()
+ c = p.end_opContext(r)
+ test(c != ctx)
test(len(p.ice_getContext()) == 0)
- cb = AMI_MyClass_opContextEqualI(ctx)
- p.opContext_async(cb, ctx)
- cb.check()
+ r = p.begin_opContext(_ctx=ctx)
+ c = p.end_opContext(r)
+ test(c == ctx)
p2 = Test.MyClassPrx.checkedCast(p.ice_context(ctx))
test(p2.ice_getContext() == ctx)
- cb = AMI_MyClass_opContextEqualI(ctx)
- p2.opContext_async(cb)
- cb.check()
+ r = p2.begin_opContext()
+ c = p2.end_opContext(r)
+ test(c == ctx)
- p2 = Test.MyClassPrx.checkedCast(p.ice_context(ctx))
- test(p2.ice_getContext() == ctx)
- cb = AMI_MyClass_opContextEqualI(ctx)
- p2.opContext_async(cb, ctx)
- cb.check()
+ r = p2.begin_opContext(_ctx=ctx)
+ c = p2.end_opContext(r)
+ test(c == ctx)
#
# Test implicit context propagation
@@ -1023,55 +687,47 @@ def twowaysAMI(communicator, p):
ic.getImplicitContext().setContext(ctx)
test(ic.getImplicitContext().getContext() == ctx)
-
- cb = AMI_MyClass_opContextEqualI(ctx)
- p3.opContext_async(cb)
- cb.check()
+ r = p3.begin_opContext()
+ c = p3.end_opContext(r)
+ test(c == ctx)
ic.getImplicitContext().put('zero', 'ZERO')
- ctx = ic.getImplicitContext().getContext()
- cb = AMI_MyClass_opContextEqualI(ctx)
- p3.opContext_async(cb)
- cb.check()
+ ctx = ic.getImplicitContext().getContext()
+ r = p3.begin_opContext()
+ c = p3.end_opContext(r)
+ test(c == ctx)
prxContext = {'one': 'UN', 'four': 'QUATRE'}
- combined = ctx
+ combined = {}
+ combined.update(ctx)
combined.update(prxContext)
test(combined['one'] == 'UN')
p3 = Test.MyClassPrx.uncheckedCast(p3.ice_context(prxContext))
ic.getImplicitContext().setContext({})
-
- cb = AMI_MyClass_opContextEqualI(prxContext)
- p3.opContext_async(cb)
- cb.check()
+ r = p3.begin_opContext()
+ c = p3.end_opContext(r)
+ test(c == prxContext)
ic.getImplicitContext().setContext(ctx)
-
- cb = AMI_MyClass_opContextEqualI(combined)
- p3.opContext_async(cb)
- cb.check()
+ r = p3.begin_opContext()
+ c = p3.end_opContext(r)
+ test(c == combined)
ic.destroy()
- #
- # opIdempotent
- #
- cb = AMI_MyClass_opIdempotentI()
- p.opIdempotent_async(cb)
+ cb = Callback()
+ p.begin_opIdempotent(cb.opIdempotent, cb.exCB)
cb.check()
- #
- # opNonmutating
- #
- cb = AMI_MyClass_opNonmutatingI()
- p.opNonmutating_async(cb)
+ cb = Callback()
+ p.begin_opNonmutating(cb.opNonmutating, cb.exCB)
cb.check()
derived = Test.MyDerivedClassPrx.checkedCast(p)
test(derived)
- cb = AMI_MyDerivedClass_opDerivedI()
- derived.opDerived_async(cb)
+ cb = Callback()
+ derived.begin_opDerived(cb.opDerived, cb.exCB)
cb.check()
diff --git a/py/test/Ice/operations/TwowaysNewAMI.py b/py/test/Ice/operations/TwowaysNewAMI.py
deleted file mode 100644
index 8fd1c73f79a..00000000000
--- a/py/test/Ice/operations/TwowaysNewAMI.py
+++ /dev/null
@@ -1,733 +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.
-#
-# **********************************************************************
-
-import Ice, Test, math, sys, threading
-
-def test(b):
- if not b:
- raise RuntimeError('test assertion failed')
-
-class CallbackBase:
- def __init__(self):
- self._called = False
- self._cond = threading.Condition()
-
- def check(self):
- self._cond.acquire()
- try:
- while not self._called:
- self._cond.wait()
- self._called = False
- finally:
- self._cond.release()
-
- def called(self):
- self._cond.acquire()
- self._called = True
- self._cond.notify()
- self._cond.release()
-
-class Callback(CallbackBase):
- def __init__(self, communicator=None):
- CallbackBase.__init__(self)
- self._communicator = communicator
-
- def ping(self):
- self.called()
-
- def isA(self, r):
- test(r)
- self.called()
-
- def id(self, id):
- test(id == "::Test::MyDerivedClass")
- self.called()
-
- def ids(self, ids):
- test(len(ids) == 3)
- self.called()
-
- def opVoid(self):
- self.called()
-
- def opByte(self, r, b):
- test(b == 0xf0)
- test(r == 0xff)
- self.called()
-
- def opBool(self, r, b):
- test(b)
- test(not r)
- self.called()
-
- def opShortIntLong(self, r, s, i, l):
- test(s == 10)
- test(i == 11)
- test(l == 12)
- test(r == 12)
- self.called()
-
- def opFloatDouble(self, r, f, d):
- test(f - 3.14 < 0.001)
- test(d == 1.1E10)
- test(r == 1.1E10)
- self.called()
-
- def opString(self, r, s):
- test(s == "world hello")
- test(r == "hello world")
- self.called()
-
- def opMyEnum(self, r, e):
- test(e == Test.MyEnum.enum2)
- test(r == Test.MyEnum.enum3)
- self.called()
-
- def opMyClass(self, r, c1, c2):
- test(c1.ice_getIdentity() == self._communicator.stringToIdentity("test"))
- test(c2.ice_getIdentity() == self._communicator.stringToIdentity("noSuchIdentity"))
- test(r.ice_getIdentity() == self._communicator.stringToIdentity("test"))
- # We can't do the callbacks below in serialize mode
- if self._communicator.getProperties().getPropertyAsInt("Ice.Client.ThreadPool.Serialize") == 0:
- r.opVoid()
- c1.opVoid()
- try:
- c2.opVoid()
- test(False)
- except Ice.ObjectNotExistException:
- pass
- self.called()
-
- def opStruct(self, rso, so):
- test(rso.p == None)
- test(rso.e == Test.MyEnum.enum2)
- test(rso.s.s == "def")
- test(so.e == Test.MyEnum.enum3)
- test(so.s.s == "a new string")
- # We can't do the callbacks below in serialize mode.
- if self._communicator.getProperties().getPropertyAsInt("Ice.ThreadPool.Client.Serialize") == 0:
- so.p.opVoid()
- self.called()
-
- def opByteS(self, rso, bso):
- test(len(bso) == 4)
- test(len(rso) == 8)
- if sys.version_info[0] == 2:
- test(bso[0] == '\x22')
- test(bso[1] == '\x12')
- test(bso[2] == '\x11')
- test(bso[3] == '\x01')
- test(rso[0] == '\x01')
- test(rso[1] == '\x11')
- test(rso[2] == '\x12')
- test(rso[3] == '\x22')
- test(rso[4] == '\xf1')
- test(rso[5] == '\xf2')
- test(rso[6] == '\xf3')
- test(rso[7] == '\xf4')
- else:
- test(bso[0] == 0x22)
- test(bso[1] == 0x12)
- test(bso[2] == 0x11)
- test(bso[3] == 0x01)
- test(rso[0] == 0x01)
- test(rso[1] == 0x11)
- test(rso[2] == 0x12)
- test(rso[3] == 0x22)
- test(rso[4] == 0xf1)
- test(rso[5] == 0xf2)
- test(rso[6] == 0xf3)
- test(rso[7] == 0xf4)
- self.called()
-
- def opBoolS(self, rso, bso):
- test(len(bso) == 4)
- test(bso[0])
- test(bso[1])
- test(not bso[2])
- test(not bso[3])
- test(len(rso) == 3)
- test(not rso[0])
- test(rso[1])
- test(rso[2])
- self.called()
-
- def opShortIntLongS(self, rso, sso, iso, lso):
- test(len(sso) == 3)
- test(sso[0] == 1)
- test(sso[1] == 2)
- test(sso[2] == 3)
- test(len(iso) == 4)
- test(iso[0] == 8)
- test(iso[1] == 7)
- test(iso[2] == 6)
- test(iso[3] == 5)
- test(len(lso) == 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(len(rso) == 3)
- test(rso[0] == 10)
- test(rso[1] == 30)
- test(rso[2] == 20)
- self.called()
-
- def opFloatDoubleS(self, rso, fso, dso):
- test(len(fso) == 2)
- test(fso[0] - 3.14 < 0.001)
- test(fso[1] - 1.11 < 0.001)
- test(len(dso) == 3)
- test(dso[0] == 1.3E10)
- test(dso[1] == 1.2E10)
- test(dso[2] == 1.1E10)
- test(len(rso) == 5)
- test(rso[0] == 1.1E10)
- test(rso[1] == 1.2E10)
- test(rso[2] == 1.3E10)
- test(rso[3] - 3.14 < 0.001)
- test(rso[4] - 1.11 < 0.001)
- self.called()
-
- def opStringS(self, rso, sso):
- test(len(sso) == 4)
- test(sso[0] == "abc")
- test(sso[1] == "de")
- test(sso[2] == "fghi")
- test(sso[3] == "xyz")
- test(len(rso) == 3)
- test(rso[0] == "fghi")
- test(rso[1] == "de")
- test(rso[2] == "abc")
- self.called()
-
- def opByteSS(self, rso, bso):
- test(len(bso) == 2)
- test(len(bso[0]) == 1)
- test(len(bso[1]) == 3)
- test(len(rso) == 4)
- test(len(rso[0]) == 3)
- test(len(rso[1]) == 1)
- test(len(rso[2]) == 1)
- test(len(rso[3]) == 2)
- if sys.version_info[0] == 2:
- test(bso[0][0] == '\xff')
- test(bso[1][0] == '\x01')
- test(bso[1][1] == '\x11')
- test(bso[1][2] == '\x12')
- test(rso[0][0] == '\x01')
- test(rso[0][1] == '\x11')
- test(rso[0][2] == '\x12')
- test(rso[1][0] == '\xff')
- test(rso[2][0] == '\x0e')
- test(rso[3][0] == '\xf2')
- test(rso[3][1] == '\xf1')
- else:
- test(bso[0][0] == 0xff)
- test(bso[1][0] == 0x01)
- test(bso[1][1] == 0x11)
- test(bso[1][2] == 0x12)
- test(rso[0][0] == 0x01)
- test(rso[0][1] == 0x11)
- test(rso[0][2] == 0x12)
- test(rso[1][0] == 0xff)
- test(rso[2][0] == 0x0e)
- test(rso[3][0] == 0xf2)
- test(rso[3][1] == 0xf1)
- self.called()
-
- def opBoolSS(self, rso, bso):
- test(len(bso) == 4);
- test(len(bso[0]) == 1);
- test(bso[0][0]);
- test(len(bso[1]) == 1);
- test(not bso[1][0]);
- test(len(bso[2]) == 2);
- test(bso[2][0]);
- test(bso[2][1]);
- test(len(bso[3]) == 3);
- test(not bso[3][0]);
- test(not bso[3][1]);
- test(bso[3][2]);
- test(len(rso) == 3);
- test(len(rso[0]) == 2);
- test(rso[0][0]);
- test(rso[0][1]);
- test(len(rso[1]) == 1);
- test(not rso[1][0]);
- test(len(rso[2]) == 1);
- test(rso[2][0]);
- self.called();
-
- def opShortIntLongSS(self, rso, sso, iso, lso):
- test(len(rso) == 1);
- test(len(rso[0]) == 2);
- test(rso[0][0] == 496);
- test(rso[0][1] == 1729);
- test(len(sso) == 3);
- test(len(sso[0]) == 3);
- test(sso[0][0] == 1);
- test(sso[0][1] == 2);
- test(sso[0][2] == 5);
- test(len(sso[1]) == 1);
- test(sso[1][0] == 13);
- test(len(sso[2]) == 0);
- test(len(iso) == 2);
- test(len(iso[0]) == 1);
- test(iso[0][0] == 42);
- test(len(iso[1]) == 2);
- test(iso[1][0] == 24);
- test(iso[1][1] == 98);
- test(len(lso) == 2);
- test(len(lso[0]) == 2);
- test(lso[0][0] == 496);
- test(lso[0][1] == 1729);
- test(len(lso[1]) == 2);
- test(lso[1][0] == 496);
- test(lso[1][1] == 1729);
- self.called();
-
- def opFloatDoubleSS(self, rso, fso, dso):
- test(len(fso) == 3)
- test(len(fso[0]) == 1)
- test(fso[0][0] - 3.14 < 0.001)
- test(len(fso[1]) == 1)
- test(fso[1][0] - 1.11 < 0.001)
- test(len(fso[2]) == 0)
- test(len(dso) == 1)
- test(len(dso[0]) == 3)
- test(dso[0][0] == 1.1E10)
- test(dso[0][1] == 1.2E10)
- test(dso[0][2] == 1.3E10)
- test(len(rso) == 2)
- test(len(rso[0]) == 3)
- test(rso[0][0] == 1.1E10)
- test(rso[0][1] == 1.2E10)
- test(rso[0][2] == 1.3E10)
- test(len(rso[1]) == 3)
- test(rso[1][0] == 1.1E10)
- test(rso[1][1] == 1.2E10)
- test(rso[1][2] == 1.3E10)
- self.called()
-
- def opStringSS(self, rso, sso):
- test(len(sso) == 5)
- test(len(sso[0]) == 1)
- test(sso[0][0] == "abc")
- test(len(sso[1]) == 2)
- test(sso[1][0] == "de")
- test(sso[1][1] == "fghi")
- test(len(sso[2]) == 0)
- test(len(sso[3]) == 0)
- test(len(sso[4]) == 1)
- test(sso[4][0] == "xyz")
- test(len(rso) == 3)
- test(len(rso[0]) == 1)
- test(rso[0][0] == "xyz")
- test(len(rso[1]) == 0)
- test(len(rso[2]) == 0)
- self.called()
-
- def opByteBoolD(self, ro, do):
- di1 = {10: True, 100: False}
- test(do == di1)
- test(len(ro) == 4)
- test(ro[10])
- test(not ro[11])
- test(not ro[100])
- test(ro[101])
- self.called()
-
- def opShortIntD(self, ro, do):
- di1 = {110: -1, 1100: 123123}
- test(do == di1)
- test(len(ro) == 4)
- test(ro[110] == -1)
- test(ro[111] == -100)
- test(ro[1100] == 123123)
- test(ro[1101] == 0)
- self.called()
-
- def opLongFloatD(self, ro, do):
- di1 = {999999110: -1.1, 999999111: 123123.2}
- for k in do:
- test(math.fabs(do[k] - di1[k]) < 0.01)
- test(len(ro) == 4)
- test(ro[999999110] - -1.1 < 0.01)
- test(ro[999999120] - -100.4 < 0.01)
- test(ro[999999111] - 123123.2 < 0.01)
- test(ro[999999130] - 0.5 < 0.01)
- self.called()
-
- def opStringStringD(self, ro, do):
- di1 = {'foo': 'abc -1.1', 'bar': 'abc 123123.2'}
- test(do == di1)
- test(len(ro) == 4)
- test(ro["foo"] == "abc -1.1")
- test(ro["FOO"] == "abc -100.4")
- test(ro["bar"] == "abc 123123.2")
- test(ro["BAR"] == "abc 0.5")
- self.called()
-
- def opStringMyEnumD(self, ro, do):
- di1 = {'abc': Test.MyEnum.enum1, '': Test.MyEnum.enum2}
- test(do == di1)
- test(len(ro) == 4)
- test(ro["abc"] == Test.MyEnum.enum1)
- test(ro["qwerty"] == Test.MyEnum.enum3)
- test(ro[""] == Test.MyEnum.enum2)
- test(ro["Hello!!"] == Test.MyEnum.enum2)
- self.called()
-
- def opMyEnumStringD(self, ro, do):
- di1 = {Test.MyEnum.enum1: 'abc'}
- test(do == di1)
- test(len(ro) == 3)
- test(ro[Test.MyEnum.enum1] == "abc")
- test(ro[Test.MyEnum.enum2] == "Hello!!")
- test(ro[Test.MyEnum.enum3] == "qwerty")
- self.called()
-
- def opMyStructMyEnumD(self, ro, do):
- s11 = Test.MyStruct()
- s11.i = 1
- s11.j = 1
- s12 = Test.MyStruct()
- s12.i = 1
- s12.j = 2
- s22 = Test.MyStruct()
- s22.i = 2
- s22.j = 2
- s23 = Test.MyStruct()
- s23.i = 2
- s23.j = 3
- di1 = {s11: Test.MyEnum.enum1, s12: Test.MyEnum.enum2}
- test(do == di1)
- test(len(ro) == 4)
- test(ro[s11] == Test.MyEnum.enum1)
- test(ro[s12] == Test.MyEnum.enum2)
- test(ro[s22] == Test.MyEnum.enum3)
- test(ro[s23] == Test.MyEnum.enum2)
- self.called()
-
- def opIntS(self, r):
- for j in range(0, len(r)):
- test(r[j] == -j)
- self.called()
-
- def opIdempotent(self):
- self.called()
-
- def opNonmutating(self):
- self.called()
-
- def opDerived(self):
- self.called()
-
- def exCB(self, ex):
- test(False)
-
-def twowaysNewAMI(communicator, p):
- cb = Callback()
- p.begin_ice_ping(cb.ping, cb.exCB)
- cb.check()
-
- cb = Callback()
- p.begin_ice_isA(Test.MyClass.ice_staticId(), cb.isA, cb.exCB)
- cb.check()
-
- cb = Callback()
- p.begin_ice_id(cb.id, cb.exCB)
- cb.check()
-
- cb = Callback()
- p.begin_ice_ids(cb.ids, cb.exCB)
- cb.check()
-
- r = p.begin_opVoid()
- p.end_opVoid(r)
-
- cb = Callback()
- p.begin_opVoid(cb.opVoid, cb.exCB)
- cb.check()
-
- r = p.begin_opByte(0xff, 0x0f)
- (ret, p3) = p.end_opByte(r)
- test(p3 == 0xf0)
- test(ret == 0xff)
-
- cb = Callback()
- p.begin_opByte(0xff, 0x0f, cb.opByte, cb.exCB)
- cb.check()
-
- cb = Callback()
- p.begin_opBool(True, False, cb.opBool, cb.exCB)
- cb.check()
-
- cb = Callback()
- p.begin_opShortIntLong(10, 11, 12, cb.opShortIntLong, cb.exCB)
- cb.check()
-
- cb = Callback()
- p.begin_opFloatDouble(3.14, 1.1E10, cb.opFloatDouble, cb.exCB)
- cb.check()
-
- cb = Callback()
- p.begin_opString("hello", "world", cb.opString, cb.exCB)
- cb.check()
-
- cb = Callback()
- p.begin_opMyEnum(Test.MyEnum.enum2, cb.opMyEnum, cb.exCB)
- cb.check()
-
- cb = Callback(communicator)
- p.begin_opMyClass(p, cb.opMyClass, cb.exCB)
- cb.check()
-
- si1 = Test.Structure()
- si1.p = p
- si1.e = Test.MyEnum.enum3
- si1.s = Test.AnotherStruct()
- si1.s.s = "abc"
- si2 = Test.Structure()
- si2.p = None
- si2.e = Test.MyEnum.enum2
- si2.s = Test.AnotherStruct()
- si2.s.s = "def"
-
- cb = Callback(communicator)
- p.begin_opStruct(si1, si2, cb.opStruct, cb.exCB)
- cb.check()
-
- bsi1 = (0x01, 0x11, 0x12, 0x22)
- bsi2 = (0xf1, 0xf2, 0xf3, 0xf4)
-
- cb = Callback()
- p.begin_opByteS(bsi1, bsi2, cb.opByteS, cb.exCB)
- cb.check()
-
- bsi1 = (True, True, False)
- bsi2 = (False,)
-
- cb = Callback()
- p.begin_opBoolS(bsi1, bsi2, cb.opBoolS, cb.exCB)
- cb.check()
-
- ssi = (1, 2, 3)
- isi = (5, 6, 7, 8)
- lsi = (10, 30, 20)
-
- cb = Callback()
- p.begin_opShortIntLongS(ssi, isi, lsi, cb.opShortIntLongS, cb.exCB)
- cb.check()
-
- fsi = (3.14, 1.11)
- dsi = (1.1E10, 1.2E10, 1.3E10)
-
- cb = Callback()
- p.begin_opFloatDoubleS(fsi, dsi, cb.opFloatDoubleS, cb.exCB)
- cb.check()
-
- ssi1 = ('abc', 'de', 'fghi')
- ssi2 = ('xyz',)
-
- cb = Callback()
- p.begin_opStringS(ssi1, ssi2, cb.opStringS, cb.exCB)
- cb.check()
-
- bsi1 = ((0x01, 0x11, 0x12), (0xff,))
- bsi2 = ((0x0e,), (0xf2, 0xf1))
-
- cb = Callback()
- p.begin_opByteSS(bsi1, bsi2, cb.opByteSS, cb.exCB)
- cb.check()
-
- bsi1 = ((True,), (False,), (True, True),)
- bsi2 = ((False, False, True),)
-
- cb = Callback()
- p.begin_opBoolSS(bsi1, bsi2, cb.opBoolSS, cb.exCB)
- cb.check();
-
- ssi = ((1,2,5), (13,), ())
- isi = ((24, 98), (42,))
- lsi = ((496, 1729),)
-
- cb = Callback()
- p.begin_opShortIntLongSS(ssi, isi, lsi, cb.opShortIntLongSS, cb.exCB)
- cb.check()
-
- fsi = ((3.14,), (1.11,), ())
- dsi = ((1.1E10, 1.2E10, 1.3E10),)
-
- cb = Callback()
- p.begin_opFloatDoubleSS(fsi, dsi, cb.opFloatDoubleSS, cb.exCB)
- cb.check()
-
- ssi1 = (('abc',), ('de', 'fghi'))
- ssi2 = ((), (), ('xyz',))
-
- cb = Callback()
- p.begin_opStringSS(ssi1, ssi2, cb.opStringSS, cb.exCB)
- cb.check()
-
- di1 = {10: True, 100: False}
- di2 = {10: True, 11: False, 101: True}
-
- cb = Callback()
- p.begin_opByteBoolD(di1, di2, cb.opByteBoolD, cb.exCB)
- cb.check()
-
- di1 = {110: -1, 1100: 123123}
- di2 = {110: -1, 111: -100, 1101: 0}
-
- cb = Callback()
- p.begin_opShortIntD(di1, di2, cb.opShortIntD, cb.exCB)
- cb.check()
-
- di1 = {999999110: -1.1, 999999111: 123123.2}
- di2 = {999999110: -1.1, 999999120: -100.4, 999999130: 0.5}
-
- cb = Callback()
- p.begin_opLongFloatD(di1, di2, cb.opLongFloatD, cb.exCB)
- cb.check()
-
- di1 = {'foo': 'abc -1.1', 'bar': 'abc 123123.2'}
- di2 = {'foo': 'abc -1.1', 'FOO': 'abc -100.4', 'BAR': 'abc 0.5'}
-
- cb = Callback()
- p.begin_opStringStringD(di1, di2, cb.opStringStringD, cb.exCB)
- cb.check()
-
- di1 = {'abc': Test.MyEnum.enum1, '': Test.MyEnum.enum2}
- di2 = {'abc': Test.MyEnum.enum1, 'qwerty': Test.MyEnum.enum3, 'Hello!!': Test.MyEnum.enum2}
-
- cb = Callback()
- p.begin_opStringMyEnumD(di1, di2, cb.opStringMyEnumD, cb.exCB)
- cb.check()
-
- di1 = {Test.MyEnum.enum1: 'abc'}
- di2 = {Test.MyEnum.enum2: 'Hello!!', Test.MyEnum.enum3: 'qwerty'}
-
- cb = Callback()
- p.begin_opMyEnumStringD(di1, di2, cb.opMyEnumStringD, cb.exCB)
- cb.check()
-
- s11 = Test.MyStruct()
- s11.i = 1
- s11.j = 1
- s12 = Test.MyStruct()
- s12.i = 1
- s12.j = 2
- s22 = Test.MyStruct()
- s22.i = 2
- s22.j = 2
- s23 = Test.MyStruct()
- s23.i = 2
- s23.j = 3
- di1 = {s11: Test.MyEnum.enum1, s12: Test.MyEnum.enum2}
- di2 = {s11: Test.MyEnum.enum1, s22: Test.MyEnum.enum3, s23: Test.MyEnum.enum2}
-
- cb = Callback()
- p.begin_opMyStructMyEnumD(di1, di2, cb.opMyStructMyEnumD, cb.exCB)
- cb.check()
-
- lengths = ( 0, 1, 2, 126, 127, 128, 129, 253, 254, 255, 256, 257, 1000 )
- for l in lengths:
- s = []
- for i in range(l):
- s.append(i)
- cb = Callback(l)
- p.begin_opIntS(s, cb.opIntS, cb.exCB)
- cb.check()
-
- ctx = {'one': 'ONE', 'two': 'TWO', 'three': 'THREE'}
-
- test(len(p.ice_getContext()) == 0)
- r = p.begin_opContext()
- c = p.end_opContext(r)
- test(c != ctx)
-
- test(len(p.ice_getContext()) == 0)
- r = p.begin_opContext(_ctx=ctx)
- c = p.end_opContext(r)
- test(c == ctx)
-
- p2 = Test.MyClassPrx.checkedCast(p.ice_context(ctx))
- test(p2.ice_getContext() == ctx)
- r = p2.begin_opContext()
- c = p2.end_opContext(r)
- test(c == ctx)
-
- r = p2.begin_opContext(_ctx=ctx)
- c = p2.end_opContext(r)
- test(c == ctx)
-
- #
- # Test implicit context propagation
- #
- impls = ( 'Shared', 'PerThread' )
- for i in impls:
- initData = Ice.InitializationData()
- initData.properties = communicator.getProperties().clone()
- initData.properties.setProperty('Ice.ImplicitContext', i)
- ic = Ice.initialize(data=initData)
-
- ctx = {'one': 'ONE', 'two': 'TWO', 'three': 'THREE'}
-
- p3 = Test.MyClassPrx.uncheckedCast(ic.stringToProxy("test:default -p 12010"))
-
- ic.getImplicitContext().setContext(ctx)
- test(ic.getImplicitContext().getContext() == ctx)
- r = p3.begin_opContext()
- c = p3.end_opContext(r)
- test(c == ctx)
-
- ic.getImplicitContext().put('zero', 'ZERO')
-
- ctx = ic.getImplicitContext().getContext()
- r = p3.begin_opContext()
- c = p3.end_opContext(r)
- test(c == ctx)
-
- prxContext = {'one': 'UN', 'four': 'QUATRE'}
-
- combined = {}
- combined.update(ctx)
- combined.update(prxContext)
- test(combined['one'] == 'UN')
-
- p3 = Test.MyClassPrx.uncheckedCast(p3.ice_context(prxContext))
- ic.getImplicitContext().setContext({})
- r = p3.begin_opContext()
- c = p3.end_opContext(r)
- test(c == prxContext)
-
- ic.getImplicitContext().setContext(ctx)
- r = p3.begin_opContext()
- c = p3.end_opContext(r)
- test(c == combined)
-
- ic.destroy()
-
- cb = Callback()
- p.begin_opIdempotent(cb.opIdempotent, cb.exCB)
- cb.check()
-
- cb = Callback()
- p.begin_opNonmutating(cb.opNonmutating, cb.exCB)
- cb.check()
-
- derived = Test.MyDerivedClassPrx.checkedCast(p)
- test(derived)
- cb = Callback()
- derived.begin_opDerived(cb.opDerived, cb.exCB)
- cb.check()
diff --git a/py/test/Ice/optional/Test.ice b/py/test/Ice/optional/Test.ice
index 3024fb8f23e..1b81ff320a4 100644
--- a/py/test/Ice/optional/Test.ice
+++ b/py/test/Ice/optional/Test.ice
@@ -178,7 +178,6 @@ class Recursive {
optional(0) RecursiveSeq value;
};
-["ami"]
class Initial
{
void shutdown();
diff --git a/py/test/Ice/optional/TestAMD.ice b/py/test/Ice/optional/TestAMD.ice
index 44a91bc4cdd..24fb8564401 100644
--- a/py/test/Ice/optional/TestAMD.ice
+++ b/py/test/Ice/optional/TestAMD.ice
@@ -178,7 +178,7 @@ class Recursive {
optional(0) RecursiveSeq value;
};
-["ami", "amd"]
+["amd"]
class Initial
{
void shutdown();
diff --git a/py/test/Slice/keyword/Client.py b/py/test/Slice/keyword/Client.py
index 9775c7f3c1a..d4f6ebc73c6 100755
--- a/py/test/Slice/keyword/Client.py
+++ b/py/test/Slice/keyword/Client.py
@@ -58,11 +58,10 @@ def testtypes():
d = _and.execPrx.uncheckedCast(None)
assert "_finally" in dir(_and.execPrx)
d1 = execI()
- e = _and.forPrx.uncheckedCast(None)
- assert "foo_async" in dir(_and.forPrx)
+
e1 = forI()
f = _and.ifPrx.uncheckedCast(None)
- assert "foo_async" in dir(_and.ifPrx)
+
assert "_finally" in dir(_and.ifPrx)
assert "_elif" in dir(_and.ifPrx)
f1 = ifI()
diff --git a/py/test/Slice/keyword/Key.ice b/py/test/Slice/keyword/Key.ice
index 572f2cfbc59..cce06c92576 100644
--- a/py/test/Slice/keyword/Key.ice
+++ b/py/test/Slice/keyword/Key.ice
@@ -32,7 +32,7 @@ module and
class for
{
int lambda;
- ["ami"] void foo(exec* from, out int global);
+ void foo(exec* from, out int global);
};
class if extends for implements exec, del
diff --git a/rb/test/Ice/binding/Test.ice b/rb/test/Ice/binding/Test.ice
index bc618c7a6fd..658f3b2636e 100644
--- a/rb/test/Ice/binding/Test.ice
+++ b/rb/test/Ice/binding/Test.ice
@@ -14,7 +14,7 @@ module Test
interface TestIntf
{
- ["ami"] string getAdapterName();
+ string getAdapterName();
};
interface RemoteObjectAdapter
diff --git a/rb/test/Ice/exceptions/Test.ice b/rb/test/Ice/exceptions/Test.ice
index 4750af75676..0df35ebacb9 100644
--- a/rb/test/Ice/exceptions/Test.ice
+++ b/rb/test/Ice/exceptions/Test.ice
@@ -49,7 +49,7 @@ module Mod
};
-["ami"] interface Thrower
+interface Thrower
{
void shutdown();
bool supportsUndeclaredExceptions();
@@ -76,7 +76,7 @@ module Mod
idempotent void throwLocalExceptionIdempotent();
};
-["ami"] interface WrongOperation
+interface WrongOperation
{
void noSuchOperation();
};
diff --git a/rb/test/Ice/operations/Test.ice b/rb/test/Ice/operations/Test.ice
index 3a2fc4fc10c..37ff3c5ef66 100644
--- a/rb/test/Ice/operations/Test.ice
+++ b/rb/test/Ice/operations/Test.ice
@@ -73,7 +73,7 @@ dictionary<string, MyEnum> StringMyEnumD;
dictionary<MyEnum, string> MyEnumStringD;
dictionary<MyStruct, MyEnum> MyStructMyEnumD;
-["ami"] class MyClass
+class MyClass
{
void shutdown();
@@ -167,7 +167,7 @@ dictionary<MyStruct, MyEnum> MyStructMyEnumD;
["nonmutating"] idempotent void opNonmutating();
};
-["ami"] class MyDerivedClass extends MyClass
+class MyDerivedClass extends MyClass
{
void opDerived();
};
diff --git a/rb/test/Ice/optional/Test.ice b/rb/test/Ice/optional/Test.ice
index e6582a20d4d..d988f8e21c2 100644
--- a/rb/test/Ice/optional/Test.ice
+++ b/rb/test/Ice/optional/Test.ice
@@ -178,7 +178,6 @@ class Recursive {
optional(0) RecursiveSeq value;
};
-["ami"]
class Initial
{
void shutdown();
diff --git a/rb/test/Ice/timeout/Test.ice b/rb/test/Ice/timeout/Test.ice
index 9446c7c6a0e..4fc6fd980fe 100644
--- a/rb/test/Ice/timeout/Test.ice
+++ b/rb/test/Ice/timeout/Test.ice
@@ -16,9 +16,9 @@ sequence<byte> ByteSeq;
interface Timeout
{
- ["ami"] void op();
- ["ami"] void sendData(ByteSeq seq);
- ["ami"] void sleep(int to);
+ void op();
+ void sendData(ByteSeq seq);
+ void sleep(int to);
void holdAdapter(int to);
diff --git a/slice/Ice/ConnectionF.ice b/slice/Ice/ConnectionF.ice
index 34432b361cd..4fa823e42e1 100644
--- a/slice/Ice/ConnectionF.ice
+++ b/slice/Ice/ConnectionF.ice
@@ -15,6 +15,7 @@ module Ice
{
local class ConnectionInfo;
+local class WSConnectionInfo;
local interface Connection;
};
diff --git a/slice/Ice/EndpointF.ice b/slice/Ice/EndpointF.ice
index 6ea1cab28f8..569949beca4 100644
--- a/slice/Ice/EndpointF.ice
+++ b/slice/Ice/EndpointF.ice
@@ -15,8 +15,10 @@ module Ice
{
local class EndpointInfo;
+//local class IPEndpointInfo;
local class TCPEndpointInfo;
local class UDPEndpointInfo;
+local class WSEndpointInfo;
local interface Endpoint;
/**
diff --git a/slice/IceGrid/Admin.ice b/slice/IceGrid/Admin.ice
index f76459cc0c6..5a1e435d188 100644
--- a/slice/IceGrid/Admin.ice
+++ b/slice/IceGrid/Admin.ice
@@ -471,7 +471,7 @@ interface Admin
* doesn't exist.
*
**/
- ["ami"] void syncApplicationWithoutRestart(ApplicationDescriptor descriptor)
+ void syncApplicationWithoutRestart(ApplicationDescriptor descriptor)
throws AccessDeniedException, DeploymentException, ApplicationNotExistException;
/**
@@ -495,7 +495,7 @@ interface Admin
* doesn't exist.
*
**/
- ["ami"] void updateApplicationWithoutRestart(ApplicationUpdateDescriptor descriptor)
+ void updateApplicationWithoutRestart(ApplicationUpdateDescriptor descriptor)
throws AccessDeniedException, DeploymentException, ApplicationNotExistException;
/**