Interstage Application Server アプリケーション作成ガイド (イベントサービス編) |
目次
索引
![]() ![]() |
第4章 アプリケーションの開発(各機能) | > 4.3 イベントファクトリのアプリケーション開発 |
イベントファクトリを使用してイベントチャネルを作成するCプログラムの例(イベントサービスの場合/ノーティフィケーションの場合)と処理の流れを以下に説明します。
[イベントファクトリによるイベントチャネルの生成(C言語の場合)]
CORBA_Boolean func() { CORBA_ORB orb; EventFactory factory; CosEventChannelAdmin_EventChannel channel; CORBA_Environment env; EventFactory_Option opt; factory = CORBA_ORB_resolve_initial_references( orb, EventFactory_ObjectId_Factory, &env ); /* 1 */ opt.max_queuing = 3000; opt.life_time = 0; opt.model = EventFactory_ModelAny; channel = EventFactory_create( factory, "keyword", &opt, &env ); /* 2 */ CosEventChannelAdmin_EventChannel_destroy( channel, &env ); /* 3 */ .... }
アプリケーションとイベントチャネルの動的生成のシーケンスを以下に示します。
[イベントファクトリによるイベントチャネルの生成(C言語の場合)]
CORBA_Boolean func() { CORBA_ORB orb; CosNotifyChannelAdmin_EventChannelFactory factory; CosNotifyChannelAdmin_EventChannel channel; CosNotification_QoSProperties *initial_qos; CosNotification_AdminProperties *initial_admin; CosNotifyChannelAdmin_ChannelID channelID; CORBA_Environment env; factory = CORBA_ORB_resolve_initial_references( orb, "NotificationService", &env ); /* 1 */ channel = CosNotifyChannelAdmin_EventChannelFactory_create_channel( factory, initial_qos, initial_admin, &channelID, &env ); /* 2 */ .... CosEventChannelAdmin_EventChannel_destroy( channel, &env ) /* 3 */ .... }
アプリケーションとイベントチャネルの動的生成のシーケンスを以下に示します。
目次
索引
![]() ![]() |