Mirror the one Observable in an Iterable of several Observables that first emits an item.
Mirror the one Observable in an Iterable of several Observables that first emits an item.
an Iterable of Observable sources competing to react first
an Observable that emits the same sequence of items as whichever of the source Observables first emitted an item
Returns an Observable that will execute the specified function when someone subscribes to it.
Returns an Observable that will execute the specified function when someone subscribes to it.
Write the function you pass so that it behaves as an Observable: It should invoke the
Subscriber's onNext
, onError
, and onCompleted
methods appropriately.
You can add
custom Subscriptions to Subscriber. These Subscriptions will be called
unsubscribe
.onCompleted
or onError
.See Rx Design Guidelines (PDF) for detailed information.
See RxScalaDemo.createExampleGood
and RxScalaDemo.createExampleGood2
.
the type of the items that this Observable emits
a function that accepts a Subscriber[T]
, and invokes its onNext
,
onError
, and onCompleted
methods as appropriate
an Observable that, when someone subscribes to it, will execute the specified function
Combines an Iterable of source Observables by emitting an item that aggregates the latest values of each of the source Observables each time an item is received from any of the source Observables, where this aggregation is defined by a specified function.
Combines an Iterable of source Observables by emitting an item that aggregates the latest values of each of the source Observables each time an item is received from any of the source Observables, where this aggregation is defined by a specified function.
Fully supports backpressure.
This method does not operate by default on a particular Scheduler.
the common base type of source values
the result type
the Iterable of source Observables
the aggregation function used to combine the items emitted by the source Observables
an Observable that emits items that are the result of combining the items emitted by the source Observables by means of the given aggregation function
Combines an Iterable of source Observables by emitting an item that aggregates the latest values of each of the source Observables each time an item is received from any of the source Observables, where this aggregation is defined by a specified function and delays any error from the sources until all source Observables terminate.
Combines an Iterable of source Observables by emitting an item that aggregates the latest values of each of the source Observables each time an item is received from any of the source Observables, where this aggregation is defined by a specified function and delays any error from the sources until all source Observables terminate.
Fully supports backpressure.
This method does not operate by default on a particular Scheduler.
the common base type of source values
the result type
the Iterable of source Observables
the aggregation function used to combine the items emitted by the source [Observable]]s
an Observable that emits items that are the result of combining the items emitted by the source Observables by means of the given aggregation function
Returns an Observable that calls an Observable factory to create its Observable for each new Observer that subscribes.
Returns an Observable that calls an Observable factory to create its Observable for each new Observer that subscribes. That is, for each subscriber, the actual Observable is determined by the factory function.
The defer operator allows you to defer or delay emitting items from an Observable until such time as an Observer subscribes to the Observable. This allows an rx.lang.scala.Observer to easily obtain updates or a refreshed version of the sequence.
the type of the items emitted by the Observable
the Observable factory function to invoke for each rx.lang.scala.Observer that subscribes to the resulting Observable
an Observable whose rx.lang.scala.Observers trigger an invocation of the given Observable factory function
Returns an Observable that emits no data to the rx.lang.scala.Observer and immediately invokes its onCompleted method with the specified scheduler.
Returns an Observable that emits no data to the rx.lang.scala.Observer and immediately invokes its onCompleted method with the specified scheduler.
an Observable that returns no data to the rx.lang.scala.Observer and immediately invokes the rx.lang.scala.Observerr's onCompleted method with the specified scheduler
Returns an Observable that invokes an Observer.onError method when the Observer subscribes to it.
Returns an Observable that invokes an Observer.onError method when the Observer subscribes to it.
This method does not operate by default on a particular Scheduler.
the particular Throwable
to pass to Observer.onError
an Observable that invokes the Observer.onError method when the Observer subscribes to it
Converts an Iterable
into an Observable.
Converts an Iterable
into an Observable.
Note: the entire iterable sequence is immediately emitted each time an
Observer subscribes. Since this occurs before the
Subscription
is returned, it is not possible to unsubscribe from
the sequence before it completes.
the type of items in the Iterable
sequence and the
type of items to be emitted by the resulting Observable
the source Iterable
sequence
an Observable that emits each item in the source Iterable
sequence
Returns an Observable emitting the value produced by the Future as its single item.
Returns an Observable emitting the value produced by the Future as its single item. If the future fails, the Observable will fail as well.
Future whose value ends up in the resulting Observable
an Observable completed after producing the value of the future, or with an exception
Returns an Observable that emits a 0L
after the initialDelay
and ever increasing numbers
after each period
of time thereafter, on a specified Scheduler.
Returns an Observable that emits a 0L
after the initialDelay
and ever increasing numbers
after each period
of time thereafter, on a specified Scheduler.
This operator does not support backpressure as it uses time. If the downstream needs a slower rate it should slow the timer or use something like onBackpressureDrop.
you specify which Scheduler this operator will use.
the initial delay time to wait before emitting the first value of 0L
the period of time between emissions of the subsequent numbers
the Scheduler on which the waiting happens and items are emitted
an Observable that emits a 0L
after the initialDelay
and ever increasing numbers after
each period
of time thereafter, while running on the given Scheduler
Returns an Observable that emits a 0L
after the initialDelay
and ever increasing numbers
after each period
of time thereafter.
Returns an Observable that emits a 0L
after the initialDelay
and ever increasing numbers
after each period
of time thereafter.
This operator does not support backpressure as it uses time. If the downstream needs a slower rate it should slow the timer or use something like onBackpressureDrop.
interval
operates by default on the computation
Scheduler.
the initial delay time to wait before emitting the first value of 0L
the period of time between emissions of the subsequent numbers
an Observable that emits a 0L
after the initialDelay
and ever increasing numbers after
each period
of time thereafter
Emits 0
, 1
, 2
, ...
with a delay of duration
between consecutive numbers.
Emits 0
, 1
, 2
, ...
with a delay of duration
between consecutive numbers.
duration between two consecutive numbers
the scheduler to use
An Observable that emits a number each time interval.
Emits 0
, 1
, 2
, ...
with a delay of duration
between consecutive numbers.
Emits 0
, 1
, 2
, ...
with a delay of duration
between consecutive numbers.
duration between two consecutive numbers
An Observable that emits a number each time interval.
Converts a sequence of values into an Observable.
Converts a sequence of values into an Observable.
Implementation note: the entire array will be immediately emitted each time an rx.lang.scala.Observer subscribes. Since this occurs before the rx.lang.scala.Subscription is returned, it in not possible to unsubscribe from the sequence before it completes.
the type of items in the Array, and the type of items to be emitted by the resulting Observable
the source Array
an Observable that emits each item in the source Array
Returns an Observable that never sends any items or notifications to an rx.lang.scala.Observer.
Returns an Observable that never sends any items or notifications to an rx.lang.scala.Observer.
This Observable is useful primarily for testing purposes.
an Observable that never sends any items or notifications to an rx.lang.scala.Observer
Returns an Observable that emits 0L
after a specified delay, on a specified Scheduler, and then
completes.
Returns an Observable that emits 0L
after a specified delay, on a specified Scheduler, and then
completes.
the initial delay before emitting a single 0L
the Scheduler to use for scheduling the item
Observable that emits 0L
after a specified delay, on a specified Scheduler, and then completes
Returns an Observable that emits 0L
after a specified delay, and then completes.
Returns an Observable that emits 0L
after a specified delay, and then completes.
the initial delay before emitting a single 0L
Observable that emits 0L
after a specified delay, and then completes
Constructs an Observable that creates a dependent resource object.
Constructs an Observable that creates a dependent resource object.
using
does not operate by default on a particular Scheduler
.
the factory function to create a resource object that depends on the Observable. Note: this is a by-name parameter.
the factory function to create an Observable
the function that will dispose of the resource
if true
then disposal will happen either on unsubscription or just before emission of
a terminal event (onComplete
or onError
).
the Observable whose lifetime controls the lifetime of the dependent resource object
(if this graduates from Experimental/Beta to supported, replace this parenthetical with the release number)
Given an Observable emitting N
source observables, returns an observable that
emits Seqs of N
elements each.
Given an Observable emitting N
source observables, returns an observable that
emits Seqs of N
elements each.
The first emitted Seq will contain the first element of each source observable,
the second Seq the second element of each source observable, and so on.
Note that the returned Observable will only start emitting items once the given
Observable[Observable[T]]
has completed, because otherwise it cannot know N
.
An Observable emitting N source Observables
an Observable that emits the zipped Seqs
Given 4 observables, returns an observable that emits Tuples of 4 elements each.
Given 4 observables, returns an observable that emits Tuples of 4 elements each. The first emitted Tuple will contain the first element of each source observable, the second Tuple the second element of each source observable, and so on.
an Observable that emits the zipped Observables
Given 3 observables, returns an observable that emits Tuples of 3 elements each.
Given 3 observables, returns an observable that emits Tuples of 3 elements each. The first emitted Tuple will contain the first element of each source observable, the second Tuple the second element of each source observable, and so on.
an Observable that emits the zipped Observables
Combines a list of source Observables by emitting an item that aggregates the latest values of each of the source Observables each time an item is received from any of the source Observables, where this aggregation is defined by a specified function.
Combines a list of source Observables by emitting an item that aggregates the latest values of each of the source Observables each time an item is received from any of the source Observables, where this aggregation is defined by a specified function.
the common base type of source values
the result type
the list of source Observables
the aggregation function used to combine the items emitted by the source Observables
an Observable that emits items that are the result of combining the items emitted by the source Observables by means of the given aggregation function
(Since version 0.26.2) Use Observable.combineLatest[T,R](sources:Iterable[rx\.lang\.scala\.Observable[T]])(combineFunction:Seq[T]=>R):* instead
Creates an Observable that will execute the given function when an rx.lang.scala.Observer subscribes to it.
Creates an Observable that will execute the given function when an rx.lang.scala.Observer subscribes to it.
Write the function you pass to create
so that it behaves as an Observable: It
should invoke the Observer's onNext, onError, and onCompleted methods
appropriately.
See Rx Design Guidelines (PDF) for detailed information.
the type of the items that this Observable emits.
a function that accepts an Observer[T]
, invokes its onNext
, onError
, and onCompleted
methods
as appropriate, and returns a rx.lang.scala.Subscription to allow the Observer to
canceling the subscription.
an Observable that, when an rx.lang.scala.Observer subscribes to it, will execute the given function.
(Since version 0.26.2) Use Observable.apply instead
Provides various ways to construct new Observables.