c

org.apache.pekko.event

EventStream

class EventStream extends LoggingBus with 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

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. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from EventStream toany2stringadd[EventStream] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (EventStream, B)
    Implicit
    This member is added by an implicit conversion from EventStream toArrowAssoc[EventStream] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def classify(event: Any): Class[_]

    Returns the Classifier associated with the given Event

    Returns the Classifier associated with the given Event

    Attributes
    protected
    Definition Classes
    EventStreamSubchannelClassification
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  9. def compareSubscribers(a: ActorRef, b: ActorRef): Int
    Attributes
    protected
    Definition Classes
    ActorEventBus
  10. def ensuring(cond: (EventStream) => Boolean, msg: => Any): EventStream
    Implicit
    This member is added by an implicit conversion from EventStream toEnsuring[EventStream] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: (EventStream) => Boolean): EventStream
    Implicit
    This member is added by an implicit conversion from EventStream toEnsuring[EventStream] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean, msg: => Any): EventStream
    Implicit
    This member is added by an implicit conversion from EventStream toEnsuring[EventStream] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean): EventStream
    Implicit
    This member is added by an implicit conversion from EventStream toEnsuring[EventStream] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  16. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. def logLevel: LogLevel

    Query currently set log level.

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

    Definition Classes
    LoggingBus
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  23. def publish(event: Any, subscriber: ActorRef): Unit

    Publishes the given Event to the given Subscriber

    Publishes the given Event to the given Subscriber

    Attributes
    protected
    Definition Classes
    EventStreamSubchannelClassification
  24. def publish(event: Event): Unit
    Definition Classes
    SubchannelClassification
  25. 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
  26. 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.

  27. implicit val subclassification: Subclassification[Classifier]

    The logic to form sub-class hierarchy

    The logic to form sub-class hierarchy

    Attributes
    protected
    Definition Classes
    EventStreamSubchannelClassification
  28. 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
    EventStreamSubchannelClassificationEventBus
  29. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  30. def toString(): String
    Definition Classes
    AnyRef → Any
  31. 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
    EventStreamSubchannelClassificationEventBus
  32. 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
    EventStreamSubchannelClassificationEventBus
  33. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  34. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  35. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

  2. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from EventStream toStringFormat[EventStream] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.12.16) Use formatString.format(value) instead of value.formatted(formatString), or use the f"" string interpolator. In Java 15 and later, formatted resolves to the new method in String which has reversed parameters.

  3. def [B](y: B): (EventStream, B)
    Implicit
    This member is added by an implicit conversion from EventStream toArrowAssoc[EventStream] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from LoggingBus

Inherited from ActorEventBus

Inherited from EventBus

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd fromEventStream to any2stringadd[EventStream]

Inherited by implicit conversion StringFormat fromEventStream to StringFormat[EventStream]

Inherited by implicit conversion Ensuring fromEventStream to Ensuring[EventStream]

Inherited by implicit conversion ArrowAssoc fromEventStream to ArrowAssoc[EventStream]

Ungrouped