我正在开发一个 Corba 应用程序。我的 IDL 界面如下所示:
interface Transaction {
???????? addResource(in TransactionResource resource);
};
我希望当客户端为 Transaction 引用对象调用 addResource 方法时,能够将 Proxy.newProxyInstance(....) 的返回值返回给客户端。
addResource 实现的示例:
public ?????? addResource(TransactionResource resource) {
// creation of a proxy.
java.lang.Object o = Proxy.newProxyInstance(ManageDemand.class.getClassLoader() , new Class[] {ManageDemand.class}, new MyInvocationHandler());
return o;
}
我想将“o”返回给客户,我该怎么做?
addResource() 方法返回值的类型是什么?是 org.omg.CORBA.Object 吗?或其他类型?