Posted by: smallonely | December 2, 2003

[CORBA] POA 介面 – (2) the POA mapping

其實POA給我的感覺也有點像是一個 Factory-like 的patten
他負責做以下的事情:

// 物件活動函數
ObjectId activate_object (in Servant p_servant)
raises ServantAlreadyActive, WrongPolicy);
//這個函數將在 POA 上註冊用servant表示的物件實現,返回的 ObjectId 可接著
被 id_to_reference 函數用來得到與這個物件實現相關聯的物件引用。
void activate_object_with_id (in ObjectId,
in Servant p_servant)
raises (ServantAlreadyActive, ObjectAlreadyActive, WrongPolicy);
void deactivate_object (in ObjectId id)
raises (ObjectNotActive, WrongPolicy);

// 引用建立函數
Object create_reference (in CORBA::RepositoryId repid)
raises (WrongPolicy);
Object create_reference_with_id (in ObjectId id,
in CORBA::RepositoryId repid)
raises (WrongPolicy);

// 本體映射函數
ObjectId servant_to_id (in Servant p_servant)
raises (ServantNotActive, WrongPolicy);
Object servant_to_reference (in Servant p_servant)
raises (ServantNotActive, WrongPolicy);
Servant reference_to_servant (in Object reference)
raises (ObjectNotActive, WrongAdapter, WrongPolicy);
ObjectId reference_to_id (in Object reference)
raises (WrongAdapter, WrongPolicy);
Servant id_to_servant (in ObjectId oid)
raises (ObjectNotActive, WrongPolicy);
Object id_to_reference (in ObjectId oid)
raises (ObjectNotActive, WrongPolicy);

Servant
Servants are language dependent. Their structure and their use is completely
mapping dependent.


翻遍日記將千言萬語 找一個字代替

夫兵者不祥之器物或惡之故有道者不處君子居則貴左用兵則貴右兵者不祥之器非君子
之器不得已相簿 http://wretch.twbbs.org/album 速度超快 50MB 網路相簿於天下
矣吉事尚左凶事尚右偏將軍居左上將軍居右言以喪禮處之殺人之眾以哀悲泣之戰勝以
喪禮處之道常無名樸雖小天下莫能臣侯王若能守之萬物將自賓天地相合以降甘露民莫
之令而自均始制有名名亦既有夫亦將知止知止可以不殆譬道pcs.csie.nctu.edu.tw海






—–


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: