ServerRequestオブジェクトは,オブジェクトインプリメンテーションのinvokeメソッドへパラメタとして引き渡されます。ServerRequestオブジェクトはオペレーション要求を示し,リクエストされたオペレーションの名前,パラメタリスト,およびコンテキストを取得するメソッドを提供します。また,呼び出し側へ返す結果を設定するメソッドと例外を反映させるメソッドも提供します。
class CORBA::ServerRequest {
public:
. . .
CORBA::Context_ptr ctx();
// POA spec methods
const char *operation() const ;
void arguments(CORBA::NVList_ptr param);
void set_result(const CORBA::Any& a) ;
void set_exception(const CORBA::Any& a);
};
package org.omg.CORBA;
public abstract class ServerRequest {
public java.lang.String operation();
public void arguments(org.omg.CORBA.NVList args);
public void set_result(org.omg.CORBA.Any result);
public void set_exception(org.omg.CORBA.Any except);
public abstract org.omg.CORBA.Context ctx();
// the following methods are deprecated
public java.lang.String op_name(); // use operation()
public void params(org.omg.CORBA.NVList params);
// use arguments()
public void result(org.omg.CORBA.Any result); // use set_result()
public abstract void except(org.omg.CORBA.Any except);
// use set_exception()
}
C++の場合,arguments,set_result,またはset_exceptionの各メソッドへ引き渡したすべての引数は,VisiBroker ORBの所有になります。これらの引数用のメモリはVisiBroker ORBによって解放されるので,ユーザで解放しないでください。