monifu.reactive

Observable

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
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. implicit def FutureIsObservable[T](future: Future[T])(implicit s: Scheduler): Observable[T]

    Implicit conversion from Future to Observable.

  7. implicit def ObservableIsPublisher[T](source: Observable[T])(implicit s: Scheduler): Publisher[T]

    Implicit conversion from Observable to Publisher.

  8. def amb[T](source: Observable[T]*)(implicit s: Scheduler): Observable[T]

    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.

  9. def apply[T](elems: T*)(implicit s: Scheduler): Observable[T]

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

    Definition Classes
    Any
  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def combineLatest[T1, T2, T3, T4](first: Observable[T1], second: Observable[T2], third: Observable[T3], fourth: Observable[T4])(implicit s: Scheduler): Observable[(T1, T2, T3, T4)]

    Creates a combined observable from 4 source observables.

    Creates a combined observable from 4 source observables.

    This operator behaves in a similar way to 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])(implicit s: Scheduler): Observable[(T1, T2, T3)]

    Creates a combined observable from 3 source observables.

    Creates a combined observable from 3 source observables.

    This operator behaves in a similar way to 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])(implicit s: Scheduler): Observable[(T1, T2)]

    Creates a combined observable from 2 source observables.

    Creates a combined observable from 2 source observables.

    This operator behaves in a similar way to 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 concat[T](sources: Observable[T]*)(implicit s: Scheduler): Observable[T]

    Concatenates the given list of observables into a single observable.

  16. def create[T](f: (Observer[T]) ⇒ Unit): Observable[T]

    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
  17. def empty[A](implicit s: Scheduler): Observable[A]

    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.

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

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

    Definition Classes
    AnyRef → Any
  20. def error(ex: Throwable)(implicit s: Scheduler): Observable[Nothing]

    Creates an Observable that emits an error.

    Creates an Observable that emits an error.

  21. def finalize(): Unit

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

    Concatenates the given list of observables into a single observable.

  23. def from[T](iterable: Iterable[T])(implicit s: Scheduler): Observable[T]

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

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

  24. def from[T](future: Future[T])(implicit s: Scheduler): Observable[T]

    Converts a Future to an Observable.

    Converts a Future to an Observable.

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

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

    Definition Classes
    AnyRef → Any
  27. def interval(delay: FiniteDuration)(implicit s: Scheduler): Observable[Long]

    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.

    delay

    the delay between two subsequent events

    s

    the scheduler used for scheduling the periodic signaling of onNext

  28. def intervalAtFixedRate(period: FiniteDuration)(implicit s: Scheduler): Observable[Long]

    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))
    period

    is the period of time the observable waits between 2 subsequent onNext events

    s

    the scheduler used for scheduling the periodic signaling of onNext events

  29. def intervalWithFixedDelay(delay: FiniteDuration)(implicit s: Scheduler): Observable[Long]

    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.

    delay

    the delay between two subsequent events

    s

    the scheduler used for scheduling the periodic signaling of onNext

  30. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  31. def merge[T](sources: Observable[T]*)(implicit s: Scheduler): Observable[T]

    Merges the given list of observables into a single observable.

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

    Definition Classes
    AnyRef
  33. def never(implicit s: Scheduler): Observable[Nothing]

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

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

  34. final def notify(): Unit

    Definition Classes
    AnyRef
  35. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  36. def range(from: Int, until: Int, step: Int = 1)(implicit s: Scheduler): Observable[Int]

    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

  37. def repeat[T](elems: T*)(implicit s: Scheduler): Observable[T]

    Creates an Observable that continuously emits the given item repeatedly.

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

    Definition Classes
    AnyRef
  39. def timerOneTime[T](delay: FiniteDuration, unit: T)(implicit s: Scheduler): Observable[T]

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

  40. def timerRepeated[T](initialDelay: FiniteDuration, period: FiniteDuration, unit: T)(implicit s: Scheduler): Observable[T]

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

  41. def toString(): String

    Definition Classes
    AnyRef → Any
  42. def unit[A](elem: A)(implicit s: Scheduler): Observable[A]

    Creates an Observable that only emits the given a

    Creates an Observable that only emits the given a

  43. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. def zip[T1, T2, T3, T4](obs1: Observable[T1], obs2: Observable[T2], obs3: Observable[T3], obs4: Observable[T4])(implicit s: Scheduler): Observable[(T1, T2, T3, T4)]

    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.

  47. def zip[T1, T2, T3](obs1: Observable[T1], obs2: Observable[T2], obs3: Observable[T3])(implicit s: Scheduler): Observable[(T1, T2, T3)]

    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.

  48. def zip[T1, T2](obs1: Observable[T1], obs2: Observable[T2])(implicit s: Scheduler): Observable[(T1, T2)]

    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.

Inherited from AnyRef

Inherited from Any

Ungrouped