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.

接 口 引 用void disconnect_pull_supplier();如 果 通 道 已 销 毁 , 则 此 方 法 将 去 激 活 拉 型 服 务 器 。PushSupplier此 接 口 用 于 派 生 使 用 通 信 的 推 式 模 型 的 提 供 者 对 象 。 当 通 道 已 被 销 毁 时 ,EventChannel 使 用 disconnect_push_supplier 来 断 开 提 供 者 。module CosEventComm {exception Disconnected();interface PushSupplier {void disconnect_push_supplier();};};应 该 实 现 PushSupplier 以 便 它 可 以 不 断 地 将 数 据 “ 推 ” 给 接 收 者 。 在PushModel 实 例 中 , 一 旦 创 建 了 一 个 PushModel 对 象 ( 一 个 PushSupplier派 生 的 对 象 ), 它 就 启 动 一 个 新 的 线 程 , 此 线 程 将 不 时 调 用ProxyPushConsumer 上 的 push(CORBA.Any) 。 推 出 的 数 据 是 Any 类 型 , 其 中 插入 了 一 个 消 息 字 串 ( 带 编 号 的 Hello 字 串 )。在 推 型 提 供 者 的 派 生 类 中 所 必 须 使 用 的 唯 一 方 法 是 disconnect_pull_consumer, 此方 法 用 于 将 PullConsumer 从 EventChannel 上 断 开 。 例 如 , 在 PushView 实例 中 ,Push 接 收 者 PushConsumer 使 用 此 方 法 来 断 开 ProxyPushSupplier。使 用 事 件 服 务 15-29

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

Saved successfully!

Ooh no, something went wrong!