Basic Case, Subscription Java
Subscriber
Subscription
Subscription closure
Notification
Basic Case, Subscription code Java
 |
 |
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 implements Subscriber
{
public void notify(Notification n, Object closure)
};
- MySubscriber
- application-specific class that inherits Subscriber class
- n
- a pointer to the newly received notification
- closure
- the closure associated with the subscription for which the notification should be delivered
|