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

    Implicit conversion from Future to Observable.

  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def concat[T](sources: Observable[T]*)(implicit scheduler: Scheduler): Observable[T]

    Concatenates the given list of observables into a single observable.

  8. def create[T](f: (Observer[T]) ⇒ Unit)(implicit scheduler: Scheduler): 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.api.Ack.Continue
    import monifu.concurrent.Scheduler
    
    def emit[T](elem: T, nrOfTimes: Int)(implicit scheduler: Scheduler): Observable[T] =
      Observable.create { observer =>
        def loop(times: Int): Unit =
          scheduler.scheduleOnce {
            if (times > 0)
              observer.onNext(elem).onSuccess {
                case Continue => loop(times - 1)
              }
            else
              observer.onComplete()
          }
        loop(nrOfTimes)
      }
    
    // usage sample
    import monifu.concurrent.Scheduler.Implicits.global
    
    emit(elem=30, nrOfTimes=3).dump("Emit").subscribe()
    //=> 0: Emit-->30
    //=> 1: Emit-->30
    //=> 2: Emit-->30
    //=> 3: Emit completed
  9. def empty[A](implicit scheduler: 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.

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

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

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

    Creates an Observable that emits an error.

    Creates an Observable that emits an error.

  13. def finalize(): Unit

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

    Concatenates the given list of observables into a single observable.

  15. def from[T](iterable: Iterable[T])(implicit scheduler: 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.

  16. def from[T](iterable: Iterable[T])(implicit scheduler: 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.

  17. def from[T](f: Future[T])(implicit scheduler: Scheduler): Observable[T]

    Converts a Future to an Observable.

    Converts a Future to an Observable.

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

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

    Definition Classes
    AnyRef → Any
  20. def interval(period: FiniteDuration)(implicit scheduler: 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.

    period

    the delay between two subsequent events

    scheduler

    the execution context in which onNext will get called

  21. final def isInstanceOf[T0]: Boolean

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

    Merges the given list of observables into a single observable.

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

    Definition Classes
    AnyRef
  24. def never(implicit scheduler: 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.

  25. final def notify(): Unit

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

    Definition Classes
    AnyRef
  27. def range(from: Int, until: Int, step: Int = 1)(implicit scheduler: 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

  28. def repeat[T](elems: T*)(implicit scheduler: Scheduler): Observable[T]

    Creates an Observable that continuously emits the given item repeatedly.

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

    Definition Classes
    AnyRef
  30. def toString(): String

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

    Creates an Observable that only emits the given a

    Creates an Observable that only emits the given a

  32. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. def zip[T1, T2, T3, T4](obs1: Observable[T1], obs2: Observable[T2], obs3: Observable[T3], obs4: Observable[T4]): 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.

  36. def zip[T1, T2, T3](obs1: Observable[T1], obs2: Observable[T2], obs3: Observable[T3]): 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.

  37. def zip[T1, T2](obs1: Observable[T1], obs2: Observable[T2]): 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