Interface of the event service.
ASienaobject represents the access point to the Siena event service. Clients can publish and subscribe by calling the corresponding methods on aSienaobject.Example:
Siena * S = new SimpleSiena(); Event e; e["price"] = 500; e["airline"] = "UA"; e["dest"] = "MXP"; S->publish(e);
e into the event service.
A copy of e will be delivered to all those
interested parties that subscribed for matching filters.
Example:
Siena * S; Event e; e["price"] = 500; e["airline"] = "UA"; e["dest"] = "MXP"; S->publish(e);
Example:
Example:
virtual void subscribe(const Filter &f, Notifiable *n)
n will receive notifications matching filter
f.
Siena * S;
Notifiable * n;
Filter f;
f.add_constraint("price", Siena_lt, 700);
f.add_constraint("dest", Siena_eq, "MXP");
S->subscribe(f,n);
n - subscriber
virtual void subscribe(const Pattern &p, Notifiable *n)
n - subscriber
virtual void unsubscribe(const Filter &f, Notifiable *n)
n with a filter g that is covered
by filter f.
Siena * S;
Notifiable * n;
Filter f;
f.add_constraint("dest", Siena_xx, 0);
S->unsubscribe(f,n);
Note that a filter [dest any] covers the filter of the
previous example [price < 700, dest == "MXP"]
n - subscriber
virtual void unsubscribe(const Pattern &p, Notifiable *n)
n with a pattern q that is covered
by pattern p.
n - subscriber
virtual void disconnect(Notifiable *)
n.
virtual void suspend(Notifiable *n)
virtual void resume(Notifiable *)
Alphabetic index HTML hierarchy of classes or Java