Package org.apache.pekko.event.japi
Interface EventBus<E,S,C>
- All Known Implementing Classes:
LookupEventBus,ManagedActorEventBus,ScanningEventBus,SubchannelEventBus
public interface EventBus<E,S,C>
Java API: See documentation for
pekko.event.EventBus
E is the Event type
S is the Subscriber type
C is the Classifier type-
Method Summary
Modifier and TypeMethodDescriptionvoidPublishes the specified Event to this busbooleanAttempts to register the subscriber to the specified Classifiervoidunsubscribe(S subscriber) Attempts to deregister the subscriber from all Classifiers it may be subscribed tobooleanunsubscribe(S subscriber, C from) Attempts to deregister the subscriber from the specified Classifier
-
Method Details
-
publish
Publishes the specified Event to this bus -
subscribe
Attempts to register the subscriber to the specified Classifier- Returns:
- true if successful and false if not (because it was already subscribed to that Classifier, or otherwise)
-
unsubscribe
Attempts to deregister the subscriber from the specified Classifier- Returns:
- true if successful and false if not (because it wasn't subscribed to that Classifier, or otherwise)
-
unsubscribe
Attempts to deregister the subscriber from all Classifiers it may be subscribed to
-