Skip navigation.

Using the CORBA Notification Service

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents Index View as PDF   Get Adobe Reader

 


CosNotifyChannelAdmin::EventChannelFactory::get_event_channel

Synopsis

Gets the EventChannel object.

OMG IDL

EventChannel get_event_channel ( in ChannelID id )
raises (ChannelNotFound);

Exceptions

CosNotifyChannelAdmin::ChannelNotFound

Indicates the channel cannot be found.

Description

Used when subscribing, unsubscribing, and posting events. This operation is used in applications to get the EventChannel object. When subscribing, the EventChannel object is used to get the filter factory object and the ConsumerAdmin object. When unsubscribing, the EventChannel object is used to get the ConsumerAdmin object.When posting an event, the EventChannel object is used to get the SupplierAdmin object. The ChannelID parameter that is passed in must be set to Tobj_Notification::DEFAULT_CHANNEL; otherwise, the ChannelNotFound exception is raised.

Return Value

Returns the default event channel's object reference.

Examples

Note: Code examples shown here are abbreviated. For complete code examples, see "Getting the Event Channel" on page -3 and "Getting the Event Channel, ConsumerAdmin Object, and Filter Factory Object" on page -9.

C++ code example:

channel_factory->get_event_channel(
Tobj_Notification::DEFAULT_CHANNEL );

CosNotifyComm::StructuredPushConsumer Interface

This interface is used by event subscriber applications for event delivery. You must implement this interface so that the Notification Service can invoke on it to deliver events to subscribers. It has three methods which you have to implement.

The OMG IDL for this class is as follows:

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

 

Skip navigation bar  Back to Top Previous Next