Implicit conversion from Future to Observable.
Implicit conversion from Observable to Publisher.
Given a list of source Observables, emits all of the items from the first of these Observables to emit an item and cancel the rest.
Creates an Observable that emits the given elements.
Creates an Observable that emits the given elements.
Usage sample:
val obs = Observable(1, 2, 3, 4) obs.dump("MyObservable").subscribe() //=> 0: MyObservable-->1 //=> 1: MyObservable-->2 //=> 2: MyObservable-->3 //=> 3: MyObservable-->4 //=> 4: MyObservable completed
Concatenates the given list of observables into a single observable.
Observable constructor for creating an Observable from the specified function.
Observable constructor for creating an Observable from the specified function.
Example:
import monifu.reactive._ import monifu.reactive.Ack.Continue import concurrent.ExecutionContext def emit[T](elem: T, nrOfTimes: Int)(implicit s: Scheduler): Observable[T] = Observable.create { observer => def loop(times: Int): Unit = ec.execute(new Runnable { def run() = { if (times > 0) observer.onNext(elem).onSuccess { case Continue => loop(times - 1) } else observer.onComplete() } }) loop(nrOfTimes) } // usage sample import concurrent.ExecutionContext.Implicits.global emit(elem=30, nrOfTimes=3).dump("Emit").subscribe() //=> 0: Emit-->30 //=> 1: Emit-->30 //=> 2: Emit-->30 //=> 3: Emit completed
Creates an observable that doesn't emit anything, but immediately calls onComplete
instead.
Creates an observable that doesn't emit anything, but immediately calls onComplete
instead.
Creates an Observable that emits an error.
Creates an Observable that emits an error.
Concatenates the given list of observables into a single observable.
Creates an Observable that emits the elements of the given iterable.
Creates an Observable that emits the elements of the given iterable.
Converts a Future to an Observable.
Converts a Future to an Observable.
Creates an Observable that emits auto-incremented natural numbers (longs) spaced by a given time interval.
Creates an Observable that emits auto-incremented natural numbers (longs) spaced by
a given time interval. Starts from 0 with no delay, after which it emits incremented
numbers spaced by the period
of time. The given period
of time acts as a fixed delay
between subsequent events.
the delay between two subsequent events
the scheduler used for scheduling the periodic signaling of onNext
Creates an Observable that emits auto-incremented natural numbers (longs) at a fixed rate,
as given by the specified period
.
Creates an Observable that emits auto-incremented natural numbers (longs) at a fixed rate,
as given by the specified period
. The time it takes to process an onNext
event gets
subtracted from the specified period
and thus the created observable tries to emit events
spaced by the given time interval, regardless of how long the processing of onNext
takes.
For example, an invocation like this:
Observable.intervalAtFixedRate(1.second)
Is roughly equivalent to this:
import monifu.concurrent.extensions._ Observable.range(0, Long.MaxValue) .flatMap(x => Future(x).withMinDuration(1.second))
is the period of time the observable waits between 2 subsequent onNext
events
the scheduler used for scheduling the periodic signaling of onNext
events
Creates an Observable that emits auto-incremented natural numbers (longs) spaced by a given time interval.
Creates an Observable that emits auto-incremented natural numbers (longs) spaced by
a given time interval. Starts from 0 with no delay, after which it emits incremented
numbers spaced by the period
of time. The given period
of time acts as a fixed delay
between subsequent events.
the delay between two subsequent events
the scheduler used for scheduling the periodic signaling of onNext
Merges the given list of observables into a single observable.
Creates an Observable that doesn't emit anything and that never completes.
Creates an Observable that doesn't emit anything and that never completes.
Creates an Observable that emits items in the given range.
Creates an Observable that emits items in the given range.
the range start
the range end
increment step, either positive or negative
Creates an Observable that continuously emits the given item repeatedly.
Create an Observable that emits a single item after a given delay.
Create an Observable that repeatedly emits the given item
, until
the underlying Observer cancels.
Creates an Observable that only emits the given a
Creates an Observable that only emits the given a
Creates a new Observable from three observables, by emitting elements combined in tuples of 4 elements.
Creates a new Observable from three observables, by emitting elements combined in tuples of 4 elements. If one of the Observable emits fewer events than the others, then the rest of the unpaired events are ignored.
Creates a new Observable from three observables, by emitting elements combined in tuples of 3 elements.
Creates a new Observable from three observables, by emitting elements combined in tuples of 3 elements. If one of the Observable emits fewer events than the others, then the rest of the unpaired events are ignored.
Creates a new Observable from two observables, by emitting elements combined in pairs.
Creates a new Observable from two observables, by emitting elements combined in pairs. If one of the Observable emits fewer events than the other, then the rest of the unpaired events are ignored.