|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object akka.event.japi.ActorEventBus<E>
public abstract class ActorEventBus<E>
See documentation for ActorClassification
An EventBus where the Subscribers are ActorRefs and the Classifier is ActorRef
Means that ActorRefs "listen" to other ActorRefs
E is the Event type
Constructor Summary | |
---|---|
ActorEventBus()
|
Method Summary | |
---|---|
protected abstract ActorRef |
classify(E event)
Returns the Classifier associated with the given Event |
protected abstract int |
mapSize()
This is a size hint for the number of Classifiers you expect to have (use powers of 2) |
void |
publish(E event)
Publishes the specified Event to this bus |
boolean |
subscribe(ActorRef subscriber,
ActorRef to)
Attempts to register the subscriber to the specified Classifier |
void |
unsubscribe(ActorRef subscriber)
Attempts to deregister the subscriber from all Classifiers it may be subscribed to |
boolean |
unsubscribe(ActorRef subscriber,
ActorRef from)
Attempts to deregister the subscriber from the specified Classifier |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ActorEventBus()
Method Detail |
---|
protected abstract int mapSize()
protected abstract ActorRef classify(E event)
event
- (undocumented)
public boolean subscribe(ActorRef subscriber, ActorRef to)
EventBus
subscribe
in interface EventBus<E,ActorRef,ActorRef>
subscriber
- (undocumented)to
- (undocumented)
public boolean unsubscribe(ActorRef subscriber, ActorRef from)
EventBus
unsubscribe
in interface EventBus<E,ActorRef,ActorRef>
subscriber
- (undocumented)from
- (undocumented)
public void unsubscribe(ActorRef subscriber)
EventBus
unsubscribe
in interface EventBus<E,ActorRef,ActorRef>
subscriber
- (undocumented)public void publish(E event)
EventBus
publish
in interface EventBus<E,ActorRef,ActorRef>
event
- (undocumented)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |