|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.isr.yancees.server.dispatcher.siena.OldSienaAdapter
Nested Class Summary | |
class |
OldSienaAdapter.SubscriberMediator
This class represents a subscriber, receiving all the events from Siena that are destinated to this particular EventDispatcherListenerInterface It gets the events from siena, convets it to Events in Yancees and sends to the corresponding EventDispatcherListenerInterface that it represents. |
Field Summary | |
java.lang.String |
ADAPTER_NAME
|
java.lang.String |
BODY
|
java.lang.String |
BODY_PREFIX
|
java.lang.String |
HEADER
|
java.lang.String |
HEADER_PREFIX
|
java.lang.String |
SEPARATOR
|
Constructor Summary | |
OldSienaAdapter()
|
|
OldSienaAdapter(java.lang.String address)
Constructor |
Method Summary | |
void |
connect()
|
void |
connect(java.lang.String address)
Connects to siena bafore any method can be used. |
protected void |
finalize()
|
java.lang.String |
getAdapterName()
|
void |
publish(EventInterface e)
Publishes a Yancees event in the format of Siena event. |
void |
resumeDispatcher(EventDispatcherListenerInterface li)
resumes the delivery of notifications to the given subscriber n . |
void |
shutdownDispatcher()
closes this Dispatcher service access point. |
void |
subscribe(SubscriptionInterface sub,
EventDispatcherListenerInterface li)
subscribes for sequences of events matching subscription p. |
void |
suspendDispatcher(EventDispatcherListenerInterface li)
suspends the delivery of notifications to the given subscriber li . |
void |
unsubscribe(EventDispatcherListenerInterface li)
cancels all the subscriptions posted by li. |
void |
unsubscribe(SubscriptionInterface sub,
EventDispatcherListenerInterface li)
cancels the subscriptions, posted by li, whose subscripton sub' is covered by subscripiton p. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public final java.lang.String BODY_PREFIX
public final java.lang.String HEADER_PREFIX
public final java.lang.String SEPARATOR
public final java.lang.String BODY
public final java.lang.String HEADER
public final java.lang.String ADAPTER_NAME
Constructor Detail |
public OldSienaAdapter(java.lang.String address)
public OldSienaAdapter()
Method Detail |
public void connect()
public void connect(java.lang.String address)
connect
in interface EventDispatcherAdapterInterface
address
- is the address of the server.protected void finalize() throws java.lang.Throwable
java.lang.Throwable
public void publish(EventInterface e) throws DispatcherException
publish
in interface EventDispatcherAdapterInterface
DispatcherException
Event
public void subscribe(SubscriptionInterface sub, EventDispatcherListenerInterface li) throws DispatcherException
Notice that given the distributed nature of some implementations of Dispatcher 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 Dispatcher.
Also, keep in mind that the current implementation of Dispatcher 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.
subscribe
in interface EventDispatcherAdapterInterface
li
- is the subscribersub
- is a generic subscription containing a DOM tree. It is expected
here that this subscription is in the format readable by the OldSienaAdapter.
DispatcherException
unsubscribe(edu.uci.isr.yancees.SubscriptionInterface, edu.uci.isr.yancees.dispatcher.EventDispatcherListenerInterface)
public void unsubscribe(SubscriptionInterface sub, EventDispatcherListenerInterface li) throws DispatcherException
Unsubscriptions might incurr in the same kind of race conditions as subscriptions. Dispatcher 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 Dispatcher, this might result in some additional ``unsolicited'' notifications.
unsubscribe
in interface EventDispatcherAdapterInterface
li
- is the subscriber interface
DispatcherException
subscribe(edu.uci.isr.yancees.SubscriptionInterface, edu.uci.isr.yancees.dispatcher.EventDispatcherListenerInterface)
public void unsubscribe(EventDispatcherListenerInterface li) throws DispatcherException
unsubscribe
in interface EventDispatcherAdapterInterface
li
- is event dispatcher listener interface
DispatcherException
subscribe(edu.uci.isr.yancees.SubscriptionInterface, edu.uci.isr.yancees.dispatcher.EventDispatcherListenerInterface)
public void suspendDispatcher(EventDispatcherListenerInterface li) throws DispatcherException
li
.
suspendDispatcher
in interface EventDispatcherAdapterInterface
li
- subscriber to be suspended
DispatcherException
public void resumeDispatcher(EventDispatcherListenerInterface li) throws DispatcherException
n
.
resumeDispatcher
in interface EventDispatcherAdapterInterface
li
- is the subscriber callback reference
DispatcherException
public void shutdownDispatcher() throws DispatcherException
shutdownDispatcher
in interface EventDispatcherAdapterInterface
DispatcherException
public java.lang.String getAdapterName()
getAdapterName
in interface EventDispatcherAdapterInterface
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |