Object/Class

rxscalajs

Observable

Related Docs: class Observable | package rxscalajs

Permalink

object Observable

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

Type Members

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

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def ajax(settings: Object): Observable[Dynamic]

    Permalink
  5. def ajax(url: String): Observable[Dynamic]

    Permalink
  6. def apply[T](f: (Observer[T]) ⇒ Creator): Observable[T]

    Permalink

    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

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

    Permalink

    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]]

    Permalink

    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

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

    Permalink

    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]

    Permalink

    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]

    Permalink

    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. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def forkJoin[T](sources: Observable[T]*): Observable[Seq[T]]

    Permalink

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

    Permalink

    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

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

    Permalink

    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

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

    Permalink

    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.

  21. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  22. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  23. def interval(duration: Duration = Duration.Zero): Observable[Int]

    Permalink

    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.

  24. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  25. def just[T](values: T*): Observable[T]

    Permalink

    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

  26. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. def of[T](elements: T*): Observable[T]

    Permalink

    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

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

    Permalink

    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.

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

    Permalink

    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.

  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  33. def timer(initialDelay: Int = 0, period: Int = 1): Observable[Int]

    Permalink

    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

  34. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  35. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. def zip[T, R](observables: Seq[Observable[T]])(project: (Seq[T]) ⇒ R): Observable[R]

    Permalink

    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 AnyRef

Inherited from Any

Ungrouped