|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.vub.at.actors.natives.DiscoveryManager
The DiscoveryManager is responsible for coupling subscriptions to corresponding publications.
Nested Class Summary | |
static class |
DiscoveryManager.Publication
Small container class that represents an entry in the publications list. |
static class |
DiscoveryManager.Subscription
Small container class that represents an entry in the subscriptions list. |
Field Summary | |
private java.util.LinkedList |
publications_
A list of Publication objects that represent locally exported service objects. |
private java.util.LinkedList |
subscriptions_
A list of Subscription objects that represent local subscription handlers. |
Constructor Summary | |
DiscoveryManager()
|
Method Summary | |
void |
addLocalPublication(DiscoveryManager.Publication pub)
A new local publication: - is stored locally - is checked against local subscriptions, which fire immediately - is broadcast to all currently connected members (done by VM) |
void |
addLocalSubscription(DiscoveryManager.Subscription sub)
A new local subscription: - is stored locally - is checked against local publications, which may cause the subscrption to fire immediately - is broadcast to all currently connected members (done by VM) |
private void |
checkLocalPublishers(DiscoveryManager.Subscription sub)
When a new subscription is added locally, it is first checked whether this subscription can already be satisfied by some local publications on this VM (but from different actors) |
void |
deleteLocalPublication(DiscoveryManager.Publication pub)
A deleted local publication is simply deleted locally. |
void |
deleteLocalSubscription(DiscoveryManager.Subscription sub)
A deleted local subscription is simply deleted locally. |
java.util.Set |
getAllLocalSubscriptionTopics()
|
java.util.Set |
getLocalPublishedServicesMatching(ATStripe topic)
Returns all local publications matching the given topic. |
private void |
notify(ATObject handler,
ATObject service)
Performs handler<-apply([ service ]) |
private void |
notifyLocalSubscribers(DiscoveryManager.Publication pub)
When a new publication is added locally, it is first checked whether this publication can already satisfy some outstanding subscriptions on this VM (but from different actors) |
void |
notifyOfExternalPublication(ATStripe pubTopic,
ATObject remoteService)
When a remote VM hears the request of the local VM for services it requires, it returns its own matching services, using a CMDJoinServices command. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final java.util.LinkedList publications_
private final java.util.LinkedList subscriptions_
Constructor Detail |
public DiscoveryManager()
Method Detail |
public void addLocalPublication(DiscoveryManager.Publication pub)
public void deleteLocalPublication(DiscoveryManager.Publication pub)
public void addLocalSubscription(DiscoveryManager.Subscription sub)
public void deleteLocalSubscription(DiscoveryManager.Subscription sub)
public java.util.Set getLocalPublishedServicesMatching(ATStripe topic)
public java.util.Set getAllLocalSubscriptionTopics()
public void notifyOfExternalPublication(ATStripe pubTopic, ATObject remoteService)
remoteService
- the remote service matching the topicprivate void notifyLocalSubscribers(DiscoveryManager.Publication pub)
private void checkLocalPublishers(DiscoveryManager.Subscription sub)
private void notify(ATObject handler, ATObject service)
handler<-apply([ service ])
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |