Package org.apache.pekko.event
Interface EventBus
- All Known Subinterfaces:
ActorEventBus
,LoggingBus
- All Known Implementing Classes:
EventStream
public interface EventBus
Represents the base type for EventBuses
Internally has an Event type, a Classifier type and a Subscriber type
For the Java API, see pekko.event.japi.*
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Publishes the specified Event to this busboolean
void
unsubscribe
(EventBus subscriber) Attempts to deregister the subscriber from all Classifiers it may be subscribed toboolean
unsubscribe
(EventBus subscriber, EventBus from) Attempts to deregister the subscriber from the specified Classifier
-
Method Details
-
publish
Publishes the specified Event to this bus -
subscribe
-
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
-