|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LookupClassification
Maps Subscribers to Classifiers using equality on Classifier to store a Set of Subscribers (hence the need for compareSubscribers) Maps Events to Classifiers through the classify-method (so it knows who to publish to)
The compareSubscribers need to provide a total ordering of the Subscribers
Method Summary | |
---|---|
LookupClassification |
classify(LookupClassification event)
Returns the Classifier associated with the given Event |
int |
compareSubscribers(LookupClassification a,
LookupClassification b)
Provides a total ordering of Subscribers (think java.util.Comparator.compare) |
int |
mapSize()
This is a size hint for the number of Classifiers you expect to have (use powers of 2) |
void |
publish(LookupClassification event)
|
void |
publish(LookupClassification event,
LookupClassification subscriber)
Publishes the given Event to the given Subscriber |
boolean |
subscribe(LookupClassification subscriber,
LookupClassification to)
|
Index<java.lang.Object,java.lang.Object> |
subscribers()
|
void |
unsubscribe(LookupClassification subscriber)
|
boolean |
unsubscribe(LookupClassification subscriber,
LookupClassification from)
|
Method Detail |
---|
Index<java.lang.Object,java.lang.Object> subscribers()
int mapSize()
int compareSubscribers(LookupClassification a, LookupClassification b)
LookupClassification classify(LookupClassification event)
void publish(LookupClassification event, LookupClassification subscriber)
boolean subscribe(LookupClassification subscriber, LookupClassification to)
boolean unsubscribe(LookupClassification subscriber, LookupClassification from)
void unsubscribe(LookupClassification subscriber)
void publish(LookupClassification event)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |