EventStream

object EventStream
Companion
class
class Object
trait Matchable
class Any

Value members

Concrete methods

@inline
def apply[E](): SourceStream[E]

Creates a new SourceStream of events of the type E. A usual entry point for the event streams network.

Creates a new SourceStream of events of the type E. A usual entry point for the event streams network.

Type Params
E

The event type.

Returns

A new event stream of events of the type E.

@inline
def from[E](signal: Signal[E]): EventStream[E]

Creates a new event source from a signal of the same type of events. The event source will publish a new event every time the value of the signal changes or its set of subscribers changes.

Creates a new event source from a signal of the same type of events. The event source will publish a new event every time the value of the signal changes or its set of subscribers changes.

Type Params
E

The type of events.

Value Params
signal

The original signal.

Returns

A new event stream, emitting an event corresponding to the value of the original signal.

See also
@inline
def from[E](future: Future[E], executionContext: ExecutionContext): EventStream[E]

Creates an event stream from a future. The event stream will emit one event if the future finishes with success, zero otherwise.

Creates an event stream from a future. The event stream will emit one event if the future finishes with success, zero otherwise.

Type Params
E

The type of the event.

Value Params
executionContext

The ExecutionContext in which the event will be dispatched.

future

The Future treated as the source of the only event that can be emitted by the event source.

Returns

A new event stream.

@inline
def from[E](future: Future[E]): EventStream[E]

A shorthand for creating an event stream from a future in the default execution context.

A shorthand for creating an event stream from a future in the default execution context.

Type Params
E

The type of the event.

Value Params
future

The Future treated as the source of the only event that can be emitted by the event source.

Returns

A new event stream.

See also
@inline
def from[E](future: CancellableFuture[E], executionContext: ExecutionContext): EventStream[E]

A shorthand for creating an event stream from a cancellable future.

A shorthand for creating an event stream from a cancellable future.

@inline
def from[E](future: CancellableFuture[E]): EventStream[E]

A shorthand for creating an event stream from a cancellable future in the default execution context.

A shorthand for creating an event stream from a cancellable future in the default execution context.

@inline
def zip[E](streams: EventStream[E]*): EventStream[E]

Creates a new event stream by joining together the original streams of the same type of events, E. The resulting stream will emit all events published to any of the original streams.

Creates a new event stream by joining together the original streams of the same type of events, E. The resulting stream will emit all events published to any of the original streams.

Type Params
E

The event type.

Value Params
streams

A variable arguments list of original event streams of the same event type.

Returns

A new event stream of events of type E.