12.07.2015 Views

VisiBroker Edition

VisiBroker Edition

VisiBroker Edition

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

可 移 植 接 收 器 和 信 息 接 口● 终 止 拦 截 点 为 :send_reply、 send_exception 和 send_other。 在 任 何 给 定 的 请求 / 回 答 序 列 上 , 有 且 只 有 其 中 一 个 拦 截 点 可 以 被 调 用 ;● 中 间 拦 截 点 是 receive_request。 它 在 receive_request_service_contexts 之后 而 在 终 止 拦 截 点 之 前 被 调 用 ;● 出 现 违 例 时 , 不 可 以 调 用 receive_request ;● 当 且 仅 当 send_request 或 send_poll 成 功 执 行 时 , 才 可 以 调 用 一 个 终 止 拦 截 点 。● 如 果 一 个 请 求 因 为 ORB 关 闭 而 被 取 消 , 则 用 具 有 次 要 代 码 (minor code) 4(ORB 已 关 闭 ) 的 系 统 违 例 BAD_INV_ORDER 来 调 用 send_exception。● 如 果 一 个 请 求 因 为 其 它 原 因 而 被 取 消 , 则 用 具 有 次 要 代 码 (minor code) 3 的系 统 违 例 TRANSIENT 来 调 用 send_exception。成 功 的 调 用拦 截 点 的 顺 序 :receive_request_service_contexts、receive_request、send_reply : 始 发 点 后 面 跟 着 中 间 点 ,中 间 点 后 面 跟 着 终 止 点IOR 接 收 器IORInterceptorC++:IORInterceptor 允 许 应 用 给 对 象 引 用 增 加 与 描 述 服 务 器 或 对 象 的 ORB 服 务 相 关 的功 能 的 信 息 , 以 便 使 客 户 中 的 <strong>VisiBroker</strong> <strong>Edition</strong> ORB 服 务 实 现 正 常 运 行 。 这 是通 过 调 用 拦 截 点 establish_components 来 实 现 的 。 IORInfo 的 一 个 实 例 被 传 递 到 拦截 点 。 要 取 得 关 于 IORInfo 的 详 情 , 请 参 阅 程 序 员 参 考 。package org.omg.PortableInterceptor;public interface IORInterceptorextends Interceptor, org.omg.CORBA.portable.IDLEntity,org.omg.CORBA.LocalInterface{public void establish_components(IORInfo info);public void components_established(IORInfo info);public void adapter_manager_state_changed(int id, short state);public void adapter_state_changed(ObjectReferenceTemplate[] templates, short state);}IORInterceptor 类 :class _VISEXPORT IORInterceptor: public virtual Interceptor{public:virtual void establish_components(IORInfo_ptr _info) = 0;virtual void components_established(IORInfo_ptr _info) = 0;virtual void adapter_manager_state_changed(CORBA::Long _id, CORBA::Short _state) = 0;virtual void adapter_state_changed(const ObjectReferenceTemplateSeq& _templates,20-6 <strong>VisiBroker</strong> 开 发 者 指 南

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!