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.

推 型 提 供 者 和 接 收 者 的 实 例表 15.1连 接 提 供 者 到 EventChannel随 着 所 连 接 的 对 象 是 提 供 者 或 者 是 接 收 者 以 及 所 使 用 的 通 信 模 型 的 不 同 , 执 行 这 些步 骤 的 方 法 会 有 所 不 同 。 下 表 显 示 的 是 适 用 于 提 供 者 的 方 法 。步 骤 推 型 提 供 者 拉 型 提 供 者限 制 到 EventChannel (C++) CosEventChannelAdmin::EventChannel::_narrow(orb::resolve_initial_references("EventService"))CosEventChannelAdmin::EventChannel::_narrow(orb::resolve_initial_references("EventService"))限 制 到 EventChannel (C++)EventChannelHelper.narrow(orb.resolve_initial_references("EventService"))下 表 显 示 的 是 适 用 于 接 收 者 的 方 法 。EventChannelHelper.narrow(orb.resolve_initial_references("EventService"))取 得 提 供 者 Admin EventChannel::for_suppliers() EventChannel::for_suppliers()取 得 接 收 者 代 理SupplierAdmin::obtain_push_consumer SupplierAdmin::obtain_pull_consumer()()添 加 提 供 者 到 EventChannelProxyPushConsumer::connect_push_supplier()ProxyPullConsumer::connect_pull_supplier()数 据 传 递 ProxyPushConsumer::push() Implements pull() and try_pull()表 15.2连 接 接 收 者 到 EventChannel步 骤 推 型 接 收 者 拉 型 接 收 者限 制 到 EventChannel (C++) CosEventChannelAdmin::EventChannel::_narrow(orb::resolve_initial_references("EventService"))CosEventChannelAdmin::EventChannel::_narrow(orb::resolve_initial_references("EventService"))限 制 到 EventChannel (Java)EventChannelHelper.narrow(orb.resolve_initial_references("EventService"))EventChannelHelper.narrow(orb.resolve_initial_references("EventService"))取 得 ConsumerAdmin EventChannel::for_consumers() EventChannel::for_consumers()取 得 提 供 者 代 理ConsumerAdmin::obtain_push_supplier ConsumerAdmin::obtain_pull_supplier()()添 加 接 收 者 到 EventChannelProxyPushSupplier::connect_push_consumer()ProxyPushSupplier::connect_pull_consumer()数 据 传 递 Implements push() ProxyPushSupplier::pull() andtry_pull()推 型 提 供 者 和 接 收 者 的 实 例本 节 包 括 两 个 小 节 。 第 一 小 节 描 述 C++ 下 的 推 型 提 供 者 和 接 收 者 应 用 实 例 。 第 二小 节 描 述 Java 下 的 推 型 提 供 者 和 接 收 者 应 用 实 例 。C++ 下 的 推 型 提 供 者 和 接 收 者本 节 描 述 推 型 提 供 者 和 接 收 者 应 用 实 例 。 在 执 行 过 程 中 , 提 供 者 应 用 提 示 用 户 输 入数 据 , 然 后 将 数 据 推 向 接 收 者 应 用 。 接 收 者 应 用 接 收 数 据 并 将 数 据 写 到 屏 幕 上 。15-6 <strong>VisiBroker</strong> 开 发 者 指 南

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

Saved successfully!

Ooh no, something went wrong!