Using the CORBA Notification Service
Gets the
EventChannel
object.
EventChannel
get_event_channel
( in ChannelID id )
raises (ChannelNotFound);
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.
Returns the default event channel's object reference.
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.
channel_factory->
get_event_channel(
Tobj_Notification::DEFAULT_CHANNEL );
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
(
event
in CosNotification::StructuredEvent)
CosNotifyComm
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 );
};
}; //