c

akka.event

EventStream

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
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EventStream
  2. SubchannelClassification
  3. LoggingBus
  4. ActorEventBus
  5. EventBus
  6. AnyRef
  7. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new EventStream(sys: ActorSystem)
  2. new EventStream(sys: ActorSystem, debug: Boolean)

Type Members

  1. type Classifier = Class[_]
    Definition Classes
    EventStreamLoggingBusEventBus
  2. type Event = Any
    Definition Classes
    EventStreamLoggingBusEventBus
  3. type Subscriber = ActorRef
    Definition Classes
    ActorEventBusEventBus

Value Members

  1. def logLevel: LogLevel

    Query currently set log level.

    Query currently set log level. See object Logging for more information.

    Definition Classes
    LoggingBus
  2. def publish(event: Event): Unit
    Definition Classes
    SubchannelClassification
  3. 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
  4. 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.

  5. def subscribe(subscriber: ActorRef, channel: Class[_]): Boolean

    Subscribe an actor to listen for types and subtypes by passing Class to channel argument.

    Subscribe an actor to listen for types and subtypes by passing Class to channel argument. The same actor can create multiple subscriptions for different Class.

    returns

    true if successful and false if not (because it was already subscribed to that Classifier, or otherwise)

    Definition Classes
    EventStreamSubchannelClassificationEventBus
  6. def unsubscribe(subscriber: ActorRef): Unit

    Unsubscribe all subscriptions created by this actor from the event stream.

    Unsubscribe all subscriptions created by this actor from the event stream.

    Definition Classes
    EventStreamSubchannelClassificationEventBus
  7. def unsubscribe(subscriber: ActorRef, channel: Class[_]): Boolean

    Unsubscribe specific types subscriptions created by this actor from the event stream.

    Unsubscribe specific types subscriptions created by this actor from the event stream.

    returns

    true if successful and false if not (because it wasn't subscribed to that Classifier, or otherwise)

    Definition Classes
    EventStreamSubchannelClassificationEventBus