Hitachi

VisiBroker Version 5 Borland(R) Enterprise Server VisiBroker(R) デベロッパーズガイド


19.2.4 Portable Interceptor Current

PortableInterceptor::Currentオブジェクト(以降,PICurrentと呼びます)は,スレッドコンテキスト情報をリクエストコンテキストに転送するためにポータブルインタセプタが使用するスロットのテーブルです。PICurrentの使用は必須ではありませんが,インタセプトポイントでクライアントのスレッドコンテキスト情報が必要である場合は,この情報を転送するためにPICurrentを使用できます。PICurrentは次に示す呼び出しによって取得されます。

Javaの場合
ORB.resolve_initial_references ("PICurrent");
C++の場合
ORB->resolve_initial_references ("PICurrent");
コードサンプル19-9 PortableInterceptor::Currentクラス(C++)
class _VISEXPORT Current:public virtual CORBA::Current,
      public virtual CORBA_Object
{
   public:
      virtual CORBA::Any*get_slot(CORBA::ULong _id);
      virtual void set_slot(CORBA::ULong _id,
              const CORBA::Any&_data);
};
コードサンプル19-10 PortableInterceptor.Currentインタフェース(Java)
package org.omg.PortableInterceptor;
 
public interface Current
   extends org.omg.CORBA.CurrentOperations,
      org.omg.CORBA.portable.IDLEntity
{
   public org.omg.CORBA.Any get_slot(int id)throws InvalidSlot;
   public void set_slot(int id,org.omg.CORBA.Any data)throws
          InvalidSlot;
}