Object/Trait

monifu.reactive

Observable

Related Docs: trait Observable | package reactive

Permalink

object Observable

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

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. implicit def FutureIsObservable[T](future: Future[T]): Observable[T]

    Permalink

    Implicit conversion from Future to Observable.

  5. implicit def ObservableIsReactive[T](source: Observable[T])(implicit s: Scheduler): Publisher[T]

    Permalink

    Implicit conversion from Observable to Publisher.

  6. def amb[T](source: Observable[T]*): Observable[T]

    Permalink

    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.

  7. def apply[T](elems: T*): Observable[T]

    Permalink

    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
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def combineLatest[T1, T2, T3, T4, T5, T6](obs1: Observable[T1], obs2: Observable[T2], obs3: Observable[T3], obs4: Observable[T4], obs5: Observable[T5], obs6: Observable[T6]): Observable[(T1, T2, T3, T4, T5, T6)]

    Permalink

    Creates a combined observable from 6 source observables.

    Creates a combined observable from 6 source observables.

    This operator behaves in a similar way to Observable!.zip, but while zip emits items only when all of the zipped source Observables have emitted a previously unzipped item, combine emits an item whenever any of the source Observables emits an item (so long as each of the source Observables has emitted at least one item).

  11. def combineLatest[T1, T2, T3, T4, T5](obs1: Observable[T1], obs2: Observable[T2], obs3: Observable[T3], obs4: Observable[T4], obs5: Observable[T5]): Observable[(T1, T2, T3, T4, T5)]

    Permalink

    Creates a combined observable from 5 source observables.

    Creates a combined observable from 5 source observables.

    This operator behaves in a similar way to Observable!.zip, but while zip emits items only when all of the zipped source Observables have emitted a previously unzipped item, combine emits an item whenever any of the source Observables emits an item (so long as each of the source Observables has emitted at least one item).

  12. def combineLatest[T1, T2, T3, T4](first: Observable[T1], second: Observable[T2], third: Observable[T3], fourth: Observable[T4]): Observable[(T1, T2, T3, T4)]

    Permalink

    Creates a combined observable from 4 source observables.

    Creates a combined observable from 4 source observables.

    This operator behaves in a similar way to Observable!.zip, but while zip emits items only when all of the zipped source Observables have emitted a previously unzipped item, combine emits an item whenever any of the source Observables emits an item (so long as each of the source Observables has emitted at least one item).

  13. def combineLatest[T1, T2, T3](first: Observable[T1], second: Observable[T2], third: Observable[T3]): Observable[(T1, T2, T3)]

    Permalink

    Creates a combined observable from 3 source observables.

    Creates a combined observable from 3 source observables.

    This operator behaves in a similar way to Observable!.zip, but while zip emits items only when all of the zipped source Observables have emitted a previously unzipped item, combine emits an item whenever any of the source Observables emits an item (so long as each of the source Observables has emitted at least one item).

  14. def combineLatest[T1, T2](first: Observable[T1], second: Observable[T2]): Observable[(T1, T2)]

    Permalink

    Creates a combined observable from 2 source observables.

    Creates a combined observable from 2 source observables.

    This operator behaves in a similar way to Observable!.zip, but while zip emits items only when all of the zipped source Observables have emitted a previously unzipped item, combine emits an item whenever any of the source Observables emits an item (so long as each of the source Observables has emitted at least one item).

  15. def combineLatestList[T](sources: Observable[T]*): Observable[Seq[T]]

    Permalink

    Given an observable sequence, it zips them together returning a new observable that generates sequences.

  16. def concat[T](sources: Observable[T]*): Observable[T]

    Permalink

    Concatenates the given list of observables into a single observable.

  17. def concatDelayError[T](sources: Observable[T]*): Observable[T]

    Permalink

    Concatenates the given list of observables into a single observable.

    Concatenates the given list of observables into a single observable. Delays errors until the end.

  18. def create[T](f: (Subscriber[T]) ⇒ Unit): Observable[T]

    Permalink

    Observable constructor for creating an Observable from the specified function.

  19. def defer[T](factory: ⇒ Observable[T]): Observable[T]

    Permalink

    Returns an Observable that calls an Observable factory to create an Observable for each new Observer that subscribes.

    Returns an Observable that calls an Observable factory to create an Observable for each new Observer that subscribes. That is, for each subscriber, the actual Observable that subscriber observes is determined by the factory function.

    The defer Observer allows you to defer or delay emitting items from an Observable until such time as an Observer subscribes to the Observable. This allows an Observer to easily obtain updates or a refreshed version of the sequence.

    factory

    is the Observable factory function to invoke for each Observer that subscribes to the resulting Observable

  20. def empty: Observable[Nothing]

    Permalink

    Creates an observable that doesn't emit anything, but immediately calls onComplete instead.

  21. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  23. def error(ex: Throwable): Observable[Nothing]

    Permalink

    Creates an Observable that emits an error.

  24. def finalize(): Unit

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

    Permalink

    Concatenates the given list of observables into a single observable.

  26. def flattenDelayError[T](sources: Observable[T]*): Observable[T]

    Permalink

    Concatenates the given list of observables into a single observable.

    Concatenates the given list of observables into a single observable. Delays errors until the end.

  27. def from[T](elems: T*): Observable[T]

    Permalink

    Creates an Observable that emits the given elements exactly.

  28. def fromCallable[T](c: Callable[T]): Observable[T]

    Permalink

    Given a java.util.concurrent.Callable, converts it into an Observable that executes it, then emits the result.

  29. def fromFuture[T](future: Future[T]): Observable[T]

    Permalink

    Converts a Future to an Observable.

  30. def fromIterable[T](iterable: Iterable[T]): Observable[T]

    Permalink

    Creates an Observable that emits the elements of the given iterable.

  31. def fromIterator[T](iterator: Iterator[T]): Observable[T]

    Permalink

    Creates an Observable that emits the elements of the given iterator.

  32. def fromReactivePublisher[T](publisher: Publisher[T]): Observable[T]

    Permalink

    Given a org.reactivestreams.Publisher, converts it into a Monifu / Rx Observable.

    Given a org.reactivestreams.Publisher, converts it into a Monifu / Rx Observable.

    See the Reactive Streams protocol that Monifu implements.

    See also

    Observable!.toReactive for converting

  33. def fromRunnable(r: Runnable): Observable[Unit]

    Permalink

    Given a runnable, converts it into an Observable that executes it, then signals the execution with a Unit being emitted.

  34. def fromStateAction[S, A](f: (S) ⇒ (A, S))(initialState: S): Observable[A]

    Permalink

    Given an initial state and a generator function that produces the next state and the next element in the sequence, creates an observable that keeps generating elements produced by our generator function.

    Given an initial state and a generator function that produces the next state and the next element in the sequence, creates an observable that keeps generating elements produced by our generator function.

    from monifu.concurrent.Implicits.{globalScheduler => s}
    from monifu.util import Random
    
    def randomDoubles(): Observable[Double] =
      Observable.fromStateAction(Random.double)(s.currentTimeMillis())
  35. def fromTask[T](task: ⇒ T): Observable[T]

    Permalink

    Given a lazy by-name argument, converts it into an Observable that emits a single element.

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  38. def interval(delay: FiniteDuration): Observable[Long]

    Permalink

    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 successive events.

    delay

    the delay between 2 successive events

  39. def intervalAtFixedRate(initialDelay: FiniteDuration, period: FiniteDuration): Observable[Long]

    Permalink

    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.

    This version of the intervalAtFixedRate allows specifying an initialDelay before events start being emitted.

    initialDelay

    is the initial delay before emitting the first event

    period

    the period between 2 successive onNext events

  40. def intervalAtFixedRate(period: FiniteDuration): Observable[Long]

    Permalink

    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.

    period

    the period between 2 successive onNext events

  41. def intervalWithFixedDelay(initialDelay: FiniteDuration, delay: FiniteDuration): Observable[Long]

    Permalink

    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 successive events.

    initialDelay

    is the delay to wait before emitting the first event

    delay

    the time to wait between 2 successive events

  42. def intervalWithFixedDelay(delay: FiniteDuration): Observable[Long]

    Permalink

    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 successive events.

    delay

    the delay between 2 successive events

  43. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  44. def merge[T](sources: Observable[T]*): Observable[T]

    Permalink

    Merges the given list of observables into a single observable.

  45. def mergeDelayError[T](sources: Observable[T]*): Observable[T]

    Permalink

    Merges the given list of observables into a single observable.

    Merges the given list of observables into a single observable. Delays errors until the end.

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

    Permalink
    Definition Classes
    AnyRef
  47. def never: Observable[Nothing]

    Permalink

    Creates an Observable that doesn't emit anything and that never completes.

  48. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  50. def range(from: Long, until: Long, step: Long = 1L): Observable[Long]

    Permalink

    Creates an Observable that emits items in the given range.

    Creates an Observable that emits items in the given range.

    from

    the range start

    until

    the range end

    step

    increment step, either positive or negative

  51. def repeat[T](elems: T*): Observable[T]

    Permalink

    Creates an Observable that continuously emits the given item repeatedly.

  52. def repeatTask[T](task: ⇒ T): Observable[T]

    Permalink

    Repeats the execution of the given task, emitting the results indefinitely.

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

    Permalink
    Definition Classes
    AnyRef
  54. def timerRepeated[T](initialDelay: FiniteDuration, period: FiniteDuration, unit: T): Observable[T]

    Permalink

    Create an Observable that repeatedly emits the given item, until the underlying Observer cancels.

  55. def toReactivePublisher[T](source: Observable[T], requestSize: Int)(implicit s: Scheduler): Publisher[T]

    Permalink

    Wraps this Observable into a org.reactivestreams.Publisher.

    Wraps this Observable into a org.reactivestreams.Publisher. See the Reactive Streams protocol that Monifu implements.

    requestSize

    is

  56. def toReactivePublisher[T](source: Observable[T])(implicit s: Scheduler): Publisher[T]

    Permalink

    Wraps this Observable into a org.reactivestreams.Publisher.

    Wraps this Observable into a org.reactivestreams.Publisher. See the Reactive Streams protocol that Monifu implements.

  57. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  58. def unit[A](elem: A): Observable[A]

    Permalink

    Creates an Observable that only emits the given a

  59. def unitDelayed[T](delay: FiniteDuration, unit: T): Observable[T]

    Permalink

    Create an Observable that emits a single item after a given delay.

  60. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  63. def zip[T1, T2, T3, T4, T5, T6](obs1: Observable[T1], obs2: Observable[T2], obs3: Observable[T3], obs4: Observable[T4], obs5: Observable[T5], obs6: Observable[T6]): Observable[(T1, T2, T3, T4, T5, T6)]

    Permalink

    Creates a new Observable from three observables, by emitting elements combined in tuples of 6 elements.

    Creates a new Observable from three observables, by emitting elements combined in tuples of 6 elements. If one of the Observable emits fewer events than the others, then the rest of the unpaired events are ignored.

  64. def zip[T1, T2, T3, T4, T5](obs1: Observable[T1], obs2: Observable[T2], obs3: Observable[T3], obs4: Observable[T4], obs5: Observable[T5]): Observable[(T1, T2, T3, T4, T5)]

    Permalink

    Creates a new Observable from three observables, by emitting elements combined in tuples of 5 elements.

    Creates a new Observable from three observables, by emitting elements combined in tuples of 5 elements. If one of the Observable emits fewer events than the others, then the rest of the unpaired events are ignored.

  65. def zip[T1, T2, T3, T4](obs1: Observable[T1], obs2: Observable[T2], obs3: Observable[T3], obs4: Observable[T4]): Observable[(T1, T2, T3, T4)]

    Permalink

    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.

  66. def zip[T1, T2, T3](obs1: Observable[T1], obs2: Observable[T2], obs3: Observable[T3]): Observable[(T1, T2, T3)]

    Permalink

    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.

  67. def zip[T1, T2](obs1: Observable[T1], obs2: Observable[T2]): Observable[(T1, T2)]

    Permalink

    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.

  68. def zipList[T](sources: Observable[T]*): Observable[Seq[T]]

    Permalink

    Given an observable sequence, it zips them together returning a new observable that generates sequences.

Inherited from AnyRef

Inherited from Any

Ungrouped