bea ホーム | 製品 | dev2dev | support | askBEA |
![]() |
![]() |
|
![]() |
e-docs > Tuxedo > Tuxedo CORBA ノーティフィケーション・サービス > CORBA ノーティフィケーション・サービス API のリファレンス |
Tuxedo CORBA ノーティフィケーション・サービス
|
CosNotifyChannelAdmin::EventChannelFactory::get_event_channel
概要
EventChannel オブジェクトを取得します。
OMG IDL
EventChannel get_event_channel ( in ChannelID id )
raises (ChannelNotFound);
例外
説明
イベントをサブスクライブ、アンサブスクライブ、およびポストするときに使用します。このオペレーションは、EventChannel オブジェクトを取得するためにアプリケーションで使用されます。サブスクライブのときには、EventChannel オブジェクトを使用してフィルタ・ファクトリ・オブジェクトと ConsumerAdmin オブジェクトを取得します。アンサブスクライブのときには、EventChannel オブジェクトを使用して ConsumerAdmin オブジェクトを取得します。イベントをポストするときには、EventChannel オブジェクトを使用して SupplierAdmin オブジェクトを取得します。ChannelID パラメータは、Tobj_Notification::DEFAULT_CHANNEL に設定しなければなりません。そのように設定しないと、ChannelNotFound 例外が発生します。
戻り値
Returns the default event channel’s object reference.
例
注記 ここで紹介するコード例は全体の一部分です。完全なコード例については、第 4 章の 4 ページ「イベント・チャネルの取得」および第 4 章の 15 ページ「イベント・チャネル、ConsumerAdmin オブジェクト、およびフィルタ・ファクトリ・オブジェクトの取得」を参照してください。
C++ コード例
channel_factory->get_event_channel(
Tobj_Notification::DEFAULT_CHANNEL );
Java コード例
channel_factory.get_event_channel(DEFAULT_CHANNEL.value);
CosNotifyComm::StructuredPushConsumer インターフェイス
このインターフェイスは、イベントの配信を目的としてイベント・サブスクライバ・アプリケーションによって使用されます。このインターフェイスをインプリメントしないと、ノーティフィケーション・サービスではサブスクライバにイベントを配信できません。このインターフェイスには、インプリメントしなければならない 3 つのメソッドがあります。
このクラスの OMG IDL は次のとおりです。
Module CosNotifyComm
{
interface StructuredPushConsumer : NotifyPublish {
void push_structured_event(
in CosNotification::StructuredEvent event)
raises(CosEventComm::Disconnected);
void disconnect_structured_push_consumer:
//The following operations are inherited.
void offer_change(
in CosNotification::EventTypeSeq added,
in CosNotification::EventTypeSeq removed )
raises ( InvalidEventType );
};
}; //CosNotifyComm
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |