|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.uci.isr.yancees.client.dispatcher.yancees.YanceesAdapter
| Nested Class Summary | |
class |
YanceesAdapter.SubscriberMediator
Performs the mapping between the SubscriberInterface and the DispatcherListenerInterface Behind this façade, we interact with a remote implementation of Yancees. |
| Field Summary | |
java.lang.String |
ADAPTER_NAME
|
| Constructor Summary | |
YanceesAdapter()
|
|
| Method Summary | |
void |
connect(java.lang.String address)
Connects and initializes the registered dispatchers This method is used by the server-specific adapters |
java.lang.String |
getAdapterName()
|
void |
publish(EventInterface evnt)
|
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 pattern 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 n. |
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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public final java.lang.String ADAPTER_NAME
| Constructor Detail |
public YanceesAdapter()
| Method Detail |
public void connect(java.lang.String address)
throws DispatcherException
EventDispatcherAdapterInterface
connect in interface EventDispatcherAdapterInterfaceaddress - is the address of the server.
DispatcherException
public void resumeDispatcher(EventDispatcherListenerInterface li)
throws DispatcherException
EventDispatcherAdapterInterfacen.
resumeDispatcher in interface EventDispatcherAdapterInterfaceDispatcherException
public void shutdownDispatcher()
throws DispatcherException
EventDispatcherAdapterInterface
shutdownDispatcher in interface EventDispatcherAdapterInterfaceDispatcherException
public void subscribe(SubscriptionInterface sub,
EventDispatcherListenerInterface li)
throws DispatcherException
EventDispatcherAdapterInterfaceNotice 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 EventDispatcherAdapterInterfaceli - is the subscribersub - is the subscription pattern
DispatcherExceptionEventDispatcherAdapterInterface.unsubscribe(edu.uci.isr.yancees.SubscriptionInterface, edu.uci.isr.yancees.dispatcher.EventDispatcherListenerInterface)
public void suspendDispatcher(EventDispatcherListenerInterface li)
throws DispatcherException
EventDispatcherAdapterInterfaceli.
suspendDispatcher in interface EventDispatcherAdapterInterfaceli - subscriber to be suspended
DispatcherException
public void unsubscribe(EventDispatcherListenerInterface li)
throws DispatcherException
EventDispatcherAdapterInterface
unsubscribe in interface EventDispatcherAdapterInterfaceli - is the subscriber
DispatcherExceptionEventDispatcherAdapterInterface.subscribe(edu.uci.isr.yancees.SubscriptionInterface, edu.uci.isr.yancees.dispatcher.EventDispatcherListenerInterface)
public void unsubscribe(SubscriptionInterface sub,
EventDispatcherListenerInterface li)
throws DispatcherException
EventDispatcherAdapterInterfaceUnsubscriptions 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 EventDispatcherAdapterInterfaceli - is the subscriber interface
DispatcherExceptionEventDispatcherAdapterInterface.subscribe(edu.uci.isr.yancees.SubscriptionInterface, edu.uci.isr.yancees.dispatcher.EventDispatcherListenerInterface)
public void publish(EventInterface evnt)
throws DispatcherException
publish in interface EventDispatcherAdapterInterfaceDispatcherExceptionEventpublic java.lang.String getAdapterName()
getAdapterName in interface EventDispatcherAdapterInterface
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||