Senders and receivers

The sender and receiver are the two user classes that define the semantics of the notification relationship.

The sender is responsible for defining an interest along with its corresponding class of notification for each event. It is also responsible for issuing the notification when such an event occurs. The interests and notifications can be instances of the notification classes TInterest and TNotification, or they can be derived classes that you create. In either case, make sure they are well-defined.

The receiver is responsible for establishing and managing the connection to the sender, and for responding to notifications for which it has expressed an interest. The receiver uses the sender's protocol to create interests for the events about which it wants to be notified. It then adds these interests to its connection. When a receiver responds to a notification, it can coerce the notification to the class that the sender has defined for that interest.

Write sender code so that it has no knowledge of the receiver, although the defined interests and notifications should reflect your expectations about what the typical receiver classes might be, as well as the information they might need. Receivers, of course, need to know what interests and notifications the sender can issue, and they are generally quite intimate with the sender's protocol.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker