Interstage Application Server アプリケーション作成ガイド (イベントサービス編)
目次 索引 前ページ次ページ

第6章 アプリケーションの開発(C++言語)> 6.1 アプリケーションの作成方法

6.1.2 サーバアプリケーションの作成方法

 サーバアプリケーションを作成する場合、以下の図に示すようにアプリケーションをmain実装部、メソッド実装部に分ける必要があります。なお、メソッド実装部は動的ライブラリとして作成する必要があります。
 例えば、Pushモデルのコンシューマの場合、main部はイベントチャネルに接続するまでの部分で、pushメソッドの部分がメソッド実装部になります。

 アプリケーションを翻訳する場合に使用するインクルードファイルについては、“インクルードファイル”を参照してください。

main実装部

 main実装部に結合するスタブライブラリについては、“スタブライブラリ”を参照してください。


 CORBAサービスに必要なライブラリについては、“アプリケーション作成ガイド(CORBAサービス編)”を参照してください。

 サーバアプリケーションのインプリメンテーション情報として、インプリメンテーションリポジトリに以下の定義情報(インタフェースリポジトリIDとの対応付け)を設定します。なお、インプリメンテーションリポジトリは、OD_impl_instコマンドの-axオプションを使用して登録します。

(1)インタフェースリポジトリID = (2)動的ライブラリ名

(1)インタフェースリポジトリID

 実装するインタフェースに対応したインタフェースリポジトリIDを指定します。

 

通信モデル

サプライヤ

コンシューマ

イベントサービス

Push

IDL:CosEventComm/PushSupplier:1.0

IDL:CosEventComm/PushConsumer:1.0

Pull

IDL:CosEventComm/PullSupplier:1.0

IDL:CosEventComm/PullConsumer:1.0

Mixed

IDL:CosEventComm/PushSupplier:1.0

IDL:CosEventComm/PullConsumer:1.0

ノーティフィケーションサービス

Mixed
(any)

IDL:CosEventComm/PushSupplier:1.0

IDL:CosEventComm/PullConsumer:1.0

Mixed
(StructuredEvent)

IDL:CosNotifyComm/StructuredPushSupplier:1.0

IDL:CosNotifyComm/StructuredPullConsumer:1.0

(2)動的ライブラリ名

 動的ライブラリとして作成したメソッド実装部のオブジェクト名を指定します。
 Solaris OEシステムおよびLinuxシステムの場合は、絶対パスで指定してください。

メソッド実装部

 サーバアプリケーションは以下のメソッドを実装することができます。

 

通信モデル

サプライヤ

コンシューマ

イベントサービス

Push

CosEventComm_PushSupplier_impl::disconnect_push_supplier()

CosEventComm_PushConsumer_impl::push()
CosEventComm_PushConsumer_impl::disconnect_push_consumer()

Pull

CosEventComm_PullSupplier_impl::pull()
CosEventComm_PullSupplier_impl::try_pull()
CosEventComm_PullSupplier_impl::disconnect_pull_supplier()

CosEventComm_PullConsumer_impl::disconnect_pull_consumer()

Mixed

CosEventComm_PushSupplier_impl::disconnect_push_supplier()

CosEventComm_PullConsumer_impl::disconnect_pull_consumer()

ノーティフィケーションサービス

Mixed

CosEventComm_PushSupplier_impl::disconnect_push_supplier()
CosNotifyComm_StructuredPushSupplier_impl::disconnect_
 structured_push_supplier()

CosEventComm_PullConsumer_impl::disconnect_pull_consumer()
CosNotifyComm_StructuredPullConsumer_impl::disconnect_
 structured_pull_consumer()

 メソッド実装部に結合するスケルトンオブジェクトについては、“スケルトンオブジェクト”を参照してください。


目次 索引 前ページ次ページ

All Rights Reserved, Copyright(C) 富士通株式会社 2005