Packages

object Observable extends ObservableInstances

Linear Supertypes
ObservableInstances, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Observable
  2. ObservableInstances
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type Creator = |[Unit, () ⇒ Unit]

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def ajax(settings: Request): Observable[Response]
  5. def ajax(url: String): Observable[Dynamic]
  6. def apply[T](f: (Observer[T]) ⇒ Creator): Observable[T]

    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 next, error, and completed methods appropriately.

    See Rx Design Guidelines (PDF) for detailed information.

    See RxScalaDemo.createExampleGood and RxScalaDemo.createExampleGood2.

    T

    the type of the items that this Observable emits

    f

    a function that accepts a Observer[T], and invokes its next, onError, and onCompleted methods as appropriate

    returns

    an Observable that, when someone subscribes to it, will execute the specified function

  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def bindCallback[T, U](callbackFunc: Function, selector: Function, scheduler: Scheduler): Function1[U, ObservableFacade[T]]

    Converts a callback API to a function that returns an Observable.

    Converts a callback API to a function that returns an Observable.

    Give it a function `f` of type `f(x, callback)` and it will return a function `g` that when called as `g(x)` will output an Observable.

    bindCallback is not an operator because its input and output are not Observables. The input is a function func with some parameters, but the last parameter must be a callback function that func calls when it is done. The output of bindCallback is a function that takes the same parameters as func, except the last one (the callback). When the output function is called with arguments, it will return an Observable where the results will be delivered to.

    callbackFunc

    Function with a callback as the last parameter.

    selector

    A function which takes the arguments from the callback and maps those a value to emit on the output Observable.

    scheduler

    The scheduler on which to schedule the callbacks.

    returns

    A function which returns the Observable that delivers the same values the callback would deliver.

  9. def bindNodeCallback[T, U](callbackFunc: Function, selector: Function, scheduler: Scheduler): Function1[U, ObservableFacade[T]]

    Converts a Node.js-style callback API to a function that returns an Observable.

    Converts a Node.js-style callback API to a function that returns an Observable.

    It's just like `bindCallback`, but the callback is expected to be of type `callback(error, result)`.

    bindNodeCallback is not an operator because its input and output are not Observables. The input is a function func with some parameters, but the last parameter must be a callback function that func calls when it is done. The callback function is expected to follow Node.js conventions, where the first argument to the callback is an error, while remaining arguments are the callback result. The output of bindNodeCallback is a function that takes the same parameters as func, except the last one (the callback). When the output function is called with arguments, it will return an Observable where the results will be delivered to.

    callbackFunc

    Function with a callback as the last parameter.

    selector

    A function which takes the arguments from the callback and maps those a value to emit on the output Observable.

    scheduler

    The scheduler on which to schedule the callbacks.

    returns

    A function which returns the Observable that delivers the same values the callback would deliver.

  10. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def combineLatest[T](sources: Seq[Observable[T]]): Observable[Seq[T]]

    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.

    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.

    T

    the common base type of source values

    sources

    the list of source Observables

    returns

    an Observable that emits items that are the result of combining the items emitted by the source Observables

  12. def combineLatestWith[T, R](sources: Seq[Observable[T]])(combineFunction: (Seq[T]) ⇒ R): Observable[R]

    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.

    T

    the common base type of source values

    R

    the result type

    sources

    the list of source Observables

    combineFunction

    the aggregation function used to combine the items emitted by the source Observables

    returns

    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

  13. def create[T](f: (Observer[T]) ⇒ Creator): Observable[T]

    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 next, error, and completed methods appropriately.

    See Rx Design Guidelines (PDF) for detailed information.

    See RxScalaDemo.createExampleGood and RxScalaDemo.createExampleGood2.

    T

    the type of the items that this Observable emits

    f

    a function that accepts a Observer[T], and invokes its next, onError, and onCompleted methods as appropriate. It can also return a Teardown function that will be called once the Observable is disposed.

    returns

    an Observable that, when someone subscribes to it, will execute the specified function

  14. def empty: Observable[Nothing]

    Creates an Observable that emits no items to the Observer and immediately emits a complete notification.

    Creates an Observable that emits no items to the Observer and immediately emits a complete notification.

    This static operator is useful for creating a simple Observable that only emits the complete notification. It can be used for composing with other Observables, such as in a mergeMap.

    returns

    an Observable that emits only the complete notification.

  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  17. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. def forkJoin[T](sources: Observable[T]*): Observable[Seq[T]]

  19. def from[T](future: Future[T])(implicit execContext: ExecutionContext): Observable[T]

    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

    Future whose value ends up in the resulting Observable

    returns

    an Observable completed after producing the value of the future, or with an exception

  20. def from[T](seq: Seq[T]): Observable[T]

    Converts a Seq into an Observable.

    Converts a Seq 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.

    T

    the type of items in the Seq sequence and the type of items to be emitted by the resulting Observable

    seq

    the source Seq sequence

    returns

    an Observable that emits each item in the source Iterable sequence

  21. def fromEvent(element: Element, eventName: String): Observable[Event]

    Creates an Observable that emits events of a specific type coming from the given event target.

    Creates an Observable that emits events of a specific type coming from the given event target.

    Creates an Observable by attaching an event listener to an "event target", which may be an object with addEventListener and removeEventListener, a Node.js EventEmitter, a jQuery style EventEmitter, a NodeList from the DOM, or an HTMLCollection from the DOM. The event handler is attached when the output Observable is subscribed, and removed when the Subscription is unsubscribed.

  22. def fromJSObservable[T](jsObservable: ObservableFacade[T]): Observable[T]
  23. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  24. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  25. def interval(duration: Int): Observable[Int]

    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

    duration in milliseconds between two consecutive numbers

    returns

    An Observable that emits a number each time interval.

  26. def interval(duration: Duration = Duration.Zero): Observable[Int]

    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

    duration between two consecutive numbers

    returns

    An Observable that emits a number each time interval.

  27. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  28. def just[T](values: T*): Observable[T]

    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 rxscalajs.subscription.ObserverFacade subscribes. Since this occurs before the subscription.Subscription is returned, it in not possible to unsubscribe from the sequence before it completes.

    T

    the type of items in the Array, and the type of items to be emitted by the resulting Observable

    values

    the source Array

    returns

    an Observable that emits each item in the source Array

  29. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  30. def never: Observable[Nothing]

    Returns an Observable that never sends any items or notifications to an Observer.

    Returns an Observable that never sends any items or notifications to an Observer.

    This Observable is useful primarily for testing purposes.

    returns

    an Observable that never sends any items or notifications to an Observer

  31. final def notify(): Unit
    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  33. implicit val observableMonad: MonadError[Observable, Any]
    Definition Classes
    ObservableInstances
  34. implicit def observableMonoid[A](implicit arg0: Monoid[A]): Monoid[Observable[A]]
    Definition Classes
    ObservableInstances
  35. implicit val observableMonoidK: MonoidK[Observable]
    Definition Classes
    ObservableInstances
  36. def of[T](elements: T*): Observable[T]

    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 rxscalajs.subscription.ObserverFacade subscribes. Since this occurs before the subscription.Subscription is returned, it in not possible to unsubscribe from the sequence before it completes.

    T

    the type of items in the Array, and the type of items to be emitted by the resulting Observable

    elements

    the source Array

    returns

    an Observable that emits each item in the source Array

  37. def race[T](observables: Observable[T]*): Observable[T]

    Returns an Observable that mirrors the first source Observable to emit an item from the combination of this Observable and supplied Observables

    Returns an Observable that mirrors the first source Observable to emit an item from the combination of this Observable and supplied Observables

    observables

    sources used to race for which Observable emits first.

    returns

    an Observable that mirrors the output of the first Observable to emit an item.

  38. def range(start: Int = 0, count: Int = 0): Observable[Int]

    Creates an Observable that emits a sequence of numbers within a specified range.

    Creates an Observable that emits a sequence of numbers within a specified range.

    Emits a sequence of numbers in a range.

    range operator emits a range of sequential integers, in order, where you select the start of the range and its length. By default, uses no Scheduler and just delivers the notifications synchronously, but may use an optional Scheduler to regulate those deliveries.

    start

    The value of the first integer in the sequence.

    count

    The number of sequential integers to generate. the emissions of the notifications.

    returns

    An Observable of numbers that emits a finite range of sequential integers.

  39. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  40. def timer(initialDelay: Int = 0, period: Int = 1): Observable[Int]

    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.

    initialDelay

    the initial delay before emitting a single 0L

    returns

    Observable that emits 0L after a specified delay, and then completes

  41. def toString(): String
    Definition Classes
    AnyRef → Any
  42. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. def zip[T, R](observables: Seq[Observable[T]])(project: (Seq[T]) ⇒ R): Observable[R]

    Given a number of observables, returns an observable that emits a combination of each.

    Given a number of observables, returns an observable that emits a combination of each. The first emitted combination will contain the first element of each source observable, the second combination the second element of each source observable, and so on.

    project

    a function that combines the items from the Observable and the Iterable to generate the items to be emitted by the resulting Observable

    returns

    an Observable that emits the zipped Observables

Inherited from ObservableInstances

Inherited from AnyRef

Inherited from Any

Ungrouped