Package org.apache.pekko.event
Class EventStream
java.lang.Object
org.apache.pekko.event.EventStream
- All Implemented Interfaces:
ActorEventBus,EventBus,LoggingBus,SubchannelClassification
An Apache Pekko EventStream is a pub-sub stream of events both system and user generated,
where subscribers are ActorRefs and the channels are Classes and Events are any java.lang.Object.
EventStreams employ SubchannelClassification, which means that if you listen to a Class,
you'll receive any message that is of that type or a subtype.
The debug flag in the constructor toggles if operations on this EventStream should also be published as Debug-Events
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Class<?>protected voidvoid''Must'' be called after actor system is "ready".protected Subclassification<Class<?>>The logic to form sub-class hierarchybooleanvoidunsubscribe(ActorRef subscriber) booleanunsubscribe(ActorRef subscriber, Class<?> channel) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pekko.event.ActorEventBus
compareSubscribersMethods inherited from interface org.apache.pekko.event.EventBus
publish, subscribe, unsubscribe, unsubscribeMethods inherited from interface org.apache.pekko.event.LoggingBus
_logLevel_$eq, addLogger, loggers_$eq, logLevel, setLogLevel, setUpStdoutLogger, startDefaultLoggers, startStdoutLogger, stopDefaultLoggersMethods inherited from interface org.apache.pekko.event.SubchannelClassification
addToCache, cache_$eq, classify, hasSubscriptions, publish, publish, removeFromCache, subscribe, unsubscribe, unsubscribe
-
Constructor Details
-
EventStream
-
EventStream
-
-
Method Details
-
classify
-
publish
-
startUnsubscriber
public void startUnsubscriber()''Must'' be called after actor system is "ready". Starts system actor that takes care of unsubscribing subscribers that have terminated. -
subclassification
Description copied from interface:SubchannelClassificationThe logic to form sub-class hierarchy- Specified by:
subclassificationin interfaceSubchannelClassification
-
subscribe
-
unsubscribe
-
unsubscribe
-