Borland(R) Enterprise Server VisiBroker(R) プログラマーズリファレンス
class ExtendedClosure : public VISClosure { public: interceptor::RequestInfo reqInfo; CORBA::MarshalInBuffer_ptr payload; };
このクラスはVISClosureの派生クラスであり,read-only属性のRequestInfoを格納しています。
struct RequestInfo { CORBA::Boolean response_expected; CORBA::ULong request_id; };
ServerRequestInterceptorに渡されたClosureオブジェクトをキャストし,ClientRequestInterceptorをそのサブクラスであるExtendedClosureにキャストできます。ExtendedClosureを使用してRequestInfoを抽出し,また,そのRequestInfoからrequest_idとresponse_expectedを抽出できます。request_idは,リクエストに割り当てられた一意の識別子です。response_expectedフラグは,リクエストが一方向呼び出しであるかどうかを識別します。
CORBA::Boolean response_expected = ((ExtendedClosure) closure).reqInfo.response_expected; CORBA::ULong request_id = ((ExtendedClosure)closure).reqInfo.request_id;
詳細については,examples/interceptor/client_serverにある例を参照してください。
All Rights Reserved. Copyright (C) 2012, 2015, Hitachi, Ltd.
COPYRIGHT (C) 1992-2004 Borland Software Corporation. All rights reserved.