Packages

object Observer extends Serializable

Source
Observer.scala
Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Observer
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. implicit final class Extensions [T] extends AnyVal

    Extension methods for Observer.

  2. trait Sync [-T] extends Observer[T]

    An Observer.Sync is an Observer that signals demand to upstream synchronously (i.e.

    An Observer.Sync is an Observer that signals demand to upstream synchronously (i.e. the upstream observable doesn't need to wait on a Future in order to decide whether to send the next event or not).

    Can be used for optimizations.

Value Members

  1. def dump[A](prefix: String, out: PrintStream = System.out): Sync[A]

    Builds an Observer that just logs incoming events.

  2. def empty[A](implicit r: UncaughtExceptionReporter): Sync[A]

    Helper for building an empty observer that doesn't do anything, besides logging errors in case they happen.

  3. def feed[T](target: Observer[T], subscription: BooleanCancelable, iterator: Iterator[T])(implicit s: Scheduler): Future[Ack]

    Feeds the Observer instance with elements from the given Iterator, respecting the contract and returning a Future[Ack] with the last acknowledgement given after the last emitted element.

    Feeds the Observer instance with elements from the given Iterator, respecting the contract and returning a Future[Ack] with the last acknowledgement given after the last emitted element.

    target

    is the observer that will get the events

    subscription

    is a BooleanCancelable that will be queried for its cancellation status, but only on asynchronous boundaries, and when it is seen as being isCanceled, streaming is stopped

    iterator

    is the collection of items to push downstream

  4. def feed[T](target: Observer[T], iterator: Iterator[T])(implicit s: Scheduler): Future[Ack]

    Feeds the Observer instance with elements from the given Iterator, respecting the contract and returning a Future[Ack] with the last acknowledgement given after the last emitted element.

    Feeds the Observer instance with elements from the given Iterator, respecting the contract and returning a Future[Ack] with the last acknowledgement given after the last emitted element.

    target

    is the observer that will get the events

    iterator

    is the collection of items to push downstream

  5. def feed[T](target: Observer[T], subscription: BooleanCancelable, iterable: Iterable[T])(implicit s: Scheduler): Future[Ack]

    Feeds the Observer instance with elements from the given collection, respecting the contract and returning a Future[Ack] with the last acknowledgement given after the last emitted element.

    Feeds the Observer instance with elements from the given collection, respecting the contract and returning a Future[Ack] with the last acknowledgement given after the last emitted element.

    target

    is the observer that will get the events

    subscription

    is a BooleanCancelable that will be queried for its cancellation status, but only on asynchronous boundaries, and when it is seen as being isCanceled, streaming is stopped

    iterable

    is the collection of items to push downstream

  6. def feed[T](target: Observer[T], iterable: Iterable[T])(implicit s: Scheduler): Future[Ack]

    Feeds the Observer instance with elements from the given collection, respecting the contract and returning a Future[Ack] with the last acknowledgement given after the last emitted element.

    Feeds the Observer instance with elements from the given collection, respecting the contract and returning a Future[Ack] with the last acknowledgement given after the last emitted element.

    target

    is the observer that will get the events

    iterable

    is the collection of items to push downstream

  7. def fromReactiveSubscriber[T](subscriber: Subscriber[T], subscription: Cancelable)(implicit s: Scheduler): Observer[T]

    Given an org.reactivestreams.Subscriber as defined by the Reactive Streams specification, it builds an Observer instance compliant with the Monix Rx implementation.

  8. def toReactiveSubscriber[T](observer: Observer[T], bufferSize: Int)(implicit s: Scheduler): Subscriber[T]

    Transforms the source Observer into a org.reactivestreams.Subscriber instance as defined by the Reactive Streams specification.

    Transforms the source Observer into a org.reactivestreams.Subscriber instance as defined by the Reactive Streams specification.

    bufferSize

    a strictly positive number, representing the size of the buffer used and the number of elements requested on each cycle when communicating demand, compliant with the reactive streams specification

  9. def toReactiveSubscriber[T](observer: Observer[T])(implicit s: Scheduler): Subscriber[T]

    Transforms the source Observer into a org.reactivestreams.Subscriber instance as defined by the Reactive Streams specification.