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.

接 收 器 实 例表 21.1InterceptorManagerControl 对 象 的 字 串 值值POALifeCycleActiveObjectLifeCycleServerRequest>IORCreationServiceResolver对 应 的 接 收 器 接 口POALifeCycleInterceptorActiveObjectLifeCycleInterceptorServerRequestInterceptorIORCreationInterceptorServiceResolverInterceptor3 创 建 自 己 接 收 器 的 实 例 。4 通 过 调 用 add 方 法 向 管 理 器 对 象 注 册 接 收 器 对 象 。5 运 行 客 户 端 和 服 务 器 程 序 时 装 载 接 收 器 对 象 。创 建 接 收 器 对 象最 后 , 需 要 实 现 创 建 接 收 器 实 例 和 向 <strong>VisiBroker</strong> <strong>Edition</strong> ORB 注 册 这 些 实 例 的 工厂 类 。 工 厂 类 必 须 实 现 ServiceLoader 接 口 (Java)。Java:注 :package com.inprise.vbroker.interceptor;public interface ServiceLoader {// 调 用 ORB.init() 时 ORB 会 调 用 此 方 法 。public abstract void init(org.omg.CORBA.ORB orb);// 在 调 用 ORB.init() 之 后 且 控 制 未 返 回 给 用 户 时// 调 用 。 可 用 于 禁 用 某 些 仅 供// 其 它 服 务 单 元 使 用 的 资 源 。public abstract void init_complete(org.omg.CORBA.ORB orb);// orb 正 在 被 关 闭 时 调 用 。public abstract void shutdown(org.omg.CORBA.ORB orb);}也 可 以 创 建 新 的 接 收 器 实 例 , 并 从 其 它 接 收 器 向 <strong>VisiBroker</strong> ORB 注 册 这 些 实 例( 如 下 例 所 示 )。装 载 接 收 器Java:要 装 载 接 收 器 , 必 须 设 置 vbroker.orb.dynamicLibs 属 性 。 此 属 性 可 以 在 属 性 文 件中 设 置 ( 参 见 “ 设 置 属 性 ”), 也 可 以 使 用 -D 选 项 传 递 到 <strong>VisiBroker</strong> <strong>Edition</strong>ORB 中 。接 收 器 实 例以 下 接 收 器 实 例 使 用 了 ( 第 20 章 " 使 用 可 移 植 接 收 器 " 中 所 列 ) 所 有 接 收 器 API方 法 , 目 的 是 让 您 了 解 如 何 使 用 这 些 方 法 以 及 调 用 的 条 件 。21-6 <strong>VisiBroker</strong> 开 发 者 指 南

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

Saved successfully!

Ooh no, something went wrong!