EventBus

com.raquo.airstream.eventbus.EventBus
See theEventBus companion object
class EventBus[A] extends EventSource[A], Sink[A], Named

EventBus combines a WriteBus and a stream of its events.

writer and events are made separate to allow you to manage permissions. For example, you can pass only the writer instance to a function that should only have access to writing events, not reading all events from the bus.

Attributes

Companion
object
Graph
Supertypes
trait Named
trait Sink[A]
trait EventSource[A]
trait Source[A]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def emit(event: A): Unit
def emitTry(event: Try[A]): Unit
override def toObservable: EventStream[A]

Attributes

Definition Classes
override def toObserver: Observer[A]

Attributes

Definition Classes

Inherited methods

protected def defaultDisplayName: String

This is the method that subclasses override to preserve the user's ability to set custom display names.

This is the method that subclasses override to preserve the user's ability to set custom display names.

Attributes

Inherited from:
Named
final def displayName: String

Attributes

Inherited from:
Named
def setDisplayName(name: String): Named.this.type

Set the display name for this instance (observable or observer).

Set the display name for this instance (observable or observer).

  • This method modifies the instance and returns this. It does not create a new instance.
  • New name you set will override the previous name, if any. This might change in the future. For the sake of sanity, don't call this more than once for the same instance.
  • If display name is set, toString will output it instead of the standard type@hashcode string

Attributes

Inherited from:
Named
final override def toString: String

Override defaultDisplayName instead of this, if you need to.

Override defaultDisplayName instead of this, if you need to.

Attributes

Definition Classes
Named -> Any
Inherited from:
Named

Concrete fields

val writer: WriteBus[A]