class EventStream extends LoggingBus with SubchannelClassification
An Akka 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
- Source
- EventStream.scala
- Alphabetic
- By Inheritance
- EventStream
- SubchannelClassification
- LoggingBus
- ActorEventBus
- EventBus
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new EventStream(sys: ActorSystem)
- new EventStream(sys: ActorSystem, debug: Boolean)
-
new
EventStream(debug: Boolean = false)
- Annotations
- @deprecated
- Deprecated
(Since version 2.4) Use constructor with ActorSystem parameter
Type Members
-
type
Classifier = Class[_]
- Definition Classes
- EventStream → LoggingBus → EventBus
-
type
Event = AnyRef
- Definition Classes
- EventStream → LoggingBus → EventBus
-
type
Subscriber = ActorRef
- Definition Classes
- ActorEventBus → EventBus
Value Members
-
def
logLevel: LogLevel
Query currently set log level.
Query currently set log level. See object Logging for more information.
- Definition Classes
- LoggingBus
-
def
publish(event: Event): Unit
- Definition Classes
- SubchannelClassification
-
def
setLogLevel(level: LogLevel): Unit
Change log level: default loggers (i.e.
Change log level: default loggers (i.e. from configuration file) are subscribed/unsubscribed as necessary so that they listen to all levels which are at least as severe as the given one. See object Logging for more information.
NOTE: if the StandardOutLogger is configured also as normal logger, it will not participate in the automatic management of log level subscriptions!
- Definition Classes
- LoggingBus
-
def
startUnsubscriber(): Unit
Must be called after actor system is "ready".
Must be called after actor system is "ready". Starts system actor that takes care of unsubscribing subscribers that have terminated.
-
def
subscribe(subscriber: ActorRef, channel: Class[_]): Boolean
Attempts to register the subscriber to the specified Classifier
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)
- Definition Classes
- EventStream → SubchannelClassification → EventBus
-
def
unsubscribe(subscriber: ActorRef): Unit
Attempts to deregister the subscriber from all Classifiers it may be subscribed to
Attempts to deregister the subscriber from all Classifiers it may be subscribed to
- Definition Classes
- EventStream → SubchannelClassification → EventBus
-
def
unsubscribe(subscriber: ActorRef, channel: Class[_]): Boolean
Attempts to deregister the subscriber from the specified Classifier
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)
- Definition Classes
- EventStream → SubchannelClassification → EventBus