Subscriber
the publisher's audience
In order to retrieve a notification, the application must define a subscriber class. The Notify method is called whenever a notification matches the subscription.
The class MySubscriber overwrites the Notify method from the base class Subscriber:
class MySubscriber:public Subscriber
{
public: virtual void Notify( Notification* pNotification, void* pClosure)
throw (precache::util::PCException)
{
cout<<"Incoming notification"<<endl;
}
};
- MySubscriber
- application-specific class that inherits Subscriber class
- pNotification
- a pointer to the newly received notification
- pClosure
- the closure associated with the subscription for which the notification should be delivered
|