akka.event
Interface LookupClassification


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
 akka.event.EventBus.Classifier classify(akka.event.EventBus.Event event)
          Returns the Classifier associated with the given Event
 int compareSubscribers(akka.event.EventBus.Subscriber a, akka.event.EventBus.Subscriber 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(akka.event.EventBus.Event event)
           
 void publish(akka.event.EventBus.Event event, akka.event.EventBus.Subscriber subscriber)
          Publishes the given Event to the given Subscriber
 boolean subscribe(akka.event.EventBus.Subscriber subscriber, akka.event.EventBus.Classifier to)
           
 Index<java.lang.Object,java.lang.Object> subscribers()
           
 void unsubscribe(akka.event.EventBus.Subscriber subscriber)
           
 boolean unsubscribe(akka.event.EventBus.Subscriber subscriber, akka.event.EventBus.Classifier from)
           
 

Method Detail

subscribers

Index<java.lang.Object,java.lang.Object> subscribers()

mapSize

int mapSize()
This is a size hint for the number of Classifiers you expect to have (use powers of 2)


compareSubscribers

int compareSubscribers(akka.event.EventBus.Subscriber a,
                       akka.event.EventBus.Subscriber b)
Provides a total ordering of Subscribers (think java.util.Comparator.compare)


classify

akka.event.EventBus.Classifier classify(akka.event.EventBus.Event event)
Returns the Classifier associated with the given Event


publish

void publish(akka.event.EventBus.Event event,
             akka.event.EventBus.Subscriber subscriber)
Publishes the given Event to the given Subscriber


subscribe

boolean subscribe(akka.event.EventBus.Subscriber subscriber,
                  akka.event.EventBus.Classifier to)

unsubscribe

boolean unsubscribe(akka.event.EventBus.Subscriber subscriber,
                    akka.event.EventBus.Classifier from)

unsubscribe

void unsubscribe(akka.event.EventBus.Subscriber subscriber)

publish

void publish(akka.event.EventBus.Event event)