|
Siena (v.1.5.5) API documentation | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Siena
interface of the Siena event notification service.
implementations of this interface are access points to the Siena
service. Applications use them to publish, subscribe,
unsubscribe, etc. Applications should shutdown()
a Siena
service access point when it is no longer needed.
Method Summary | |
---|---|
void |
advertise(Filter f,
java.lang.String id)
advertises a set of notifications. |
void |
publish(Notification n)
publish a notification. |
void |
resume(Notifiable n)
resumes the delivery of notifications to the given subscriber n . |
void |
shutdown()
closes this Siena service access point. |
void |
subscribe(Filter f,
Notifiable n)
subscribes for events matching Filter f. |
void |
subscribe(Pattern p,
Notifiable n)
subscribes for sequences of events matching pattern p. |
void |
suspend(Notifiable n)
suspends the delivery of notifications to the given subscriber n . |
void |
unadvertise(Filter f,
java.lang.String id)
cancel previous advertisements. |
void |
unadvertise(java.lang.String id)
cancel all previous advertisements for object id. |
void |
unsubscribe(Filter f,
Notifiable n)
cancels the subscriptions, posted by n, whose filter f' is covered by filter f. |
void |
unsubscribe(Notifiable n)
cancels all the subscriptions posted by n. |
void |
unsubscribe(Pattern p,
Notifiable n)
cancels the subscriptions, posted by n, whose pattern p' is covered by pattern p. |
Method Detail |
---|
void publish(Notification n) throws SienaException
n
- The notification to publish.
SienaException
Notification
void subscribe(Filter f, Notifiable n) throws SienaException
Notice that given the distributed nature of some implementations of Siena, there exist race conditions that might affect the semantics of subscriptions. Specifically, a subscriber might miss some notifications published before (or while) the subscription is processed by Siena.
n
- is the subscriberf
- is the subscription
SienaException
unsubscribe(siena.Filter, siena.Notifiable)
void subscribe(Pattern p, Notifiable n) throws SienaException
Notice that given the distributed nature of some implementations of Siena interface, there exist race conditions that might affect the semantics of subscriptions. A subscriber might miss some notifications published before or while the subscription is processed by Siena.
Also, keep in mind that the current implementation of Siena does not enforce any temporal order for the delivery of notifications. This limitation might affect the recognition of patterns. For example, two notifications x and y, generated at time tx and ty respectively, with tx < ty, in that order matching a pattern P=(fx fy), might in fact reach the subscriber at times Tx and Ty, with Tx > Ty, in which case pattern P would not be matched.
n
- is the subscriberp
- is the subscription pattern
SienaException
unsubscribe(siena.Filter, siena.Notifiable)
void unsubscribe(Filter f, Notifiable n) throws SienaException
Unsubscriptions might incurr in the same kind of race conditions as subscriptions. Siena will stop sending notifications to the subscriber only after it has completed the processing of the unsubscriptions. Due to the distributed nature of some implementations of Siena, this might result in some additional ``unsolicited'' notifications.
n
- is the subscriber
SienaException
subscribe(siena.Filter, siena.Notifiable)
void unsubscribe(Pattern p, Notifiable n) throws SienaException
Unsubscriptions might incurr in the same kind of race conditions as subscriptions. Siena will stop sending notifications to the subscriber only after it has completed the processing of the unsubscription. Due to the distributed nature of some implementations of Siena, this might result in some additional ``unsolicited'' notifications.
n
- is the subscriber
SienaException
subscribe(siena.Filter, siena.Notifiable)
void unsubscribe(Notifiable n) throws SienaException
n
- is the subscriber
SienaException
subscribe(siena.Filter, siena.Notifiable)
void advertise(Filter f, java.lang.String id) throws SienaException
f
- advertisement filter. Notice that this filter is
interpreted differently than a subscription filter.
For more information, consult the Siena
documentation.id
- identifier of the publisher
SienaException
unadvertise(siena.Filter, java.lang.String)
void unadvertise(Filter f, java.lang.String id) throws SienaException
f
- advertisement filter. Notice that this filter is
interpreted differently than a subscription filter.
For more information, consult the Siena documentation.id
- identifier of the publisher
SienaException
unadvertise(siena.Filter, java.lang.String)
void unadvertise(java.lang.String id) throws SienaException
id
- identifier of the publisher
SienaException
unadvertise(siena.Filter, java.lang.String)
void suspend(Notifiable n) throws SienaException
n
.
n
- subscriber to be suspended
SienaException
resume(siena.Notifiable)
void resume(Notifiable n) throws SienaException
n
.
n
- subscriber to be resumed
SienaException
resume(siena.Notifiable)
void shutdown() throws SienaException
SienaException
|
Siena (v.1.5.5) API documentation | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |