diff options
author | Jose <jose@zeroc.com> | 2014-09-24 21:06:55 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2014-09-24 21:06:55 +0200 |
commit | b1087d646fa93c4208dd227d0c9df323ff7c858b (patch) | |
tree | 48532138bffdfac0dc5c818593d9c1958cfeeeb5 /cpp/src | |
parent | PHP dependency fixes (diff) | |
download | ice-b1087d646fa93c4208dd227d0c9df323ff7c858b.tar.bz2 ice-b1087d646fa93c4208dd227d0c9df323ff7c858b.tar.xz ice-b1087d646fa93c4208dd227d0c9df323ff7c858b.zip |
Fixed (ICE-5511) - Consider removing the deprecated AMI mapping
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/IceGrid/Internal.ice | 2 | ||||
-rw-r--r-- | cpp/src/Slice/Parser.cpp | 4 | ||||
-rw-r--r-- | cpp/src/Slice/PythonUtil.cpp | 28 | ||||
-rw-r--r-- | cpp/src/Slice/RubyUtil.cpp | 21 | ||||
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 157 | ||||
-rw-r--r-- | cpp/src/slice2cs/Gen.cpp | 129 | ||||
-rw-r--r-- | cpp/src/slice2java/Gen.cpp | 156 |
7 files changed, 6 insertions, 491 deletions
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(); |