object Observer extends Serializable
- Source
- Observer.scala
- Alphabetic
- By Inheritance
- Observer
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
implicit final
class
Extensions[A] extends AnyVal
Extension methods for Observer.
-
trait
Sync[-A] extends Observer[A]
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 aFuture
in order to decide whether to send the next event or not).Can be used for optimizations.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
dump[A](prefix: String, out: PrintStream = System.out): Sync[A]
Builds an Observer that just logs incoming events.
-
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.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
feed[A](target: Observer[A], subscription: BooleanCancelable, iterator: Iterator[A])(implicit s: Scheduler): Future[Ack]
Feeds the Observer instance with elements from the given
Iterator
, respecting the contract and returning aFuture[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 aFuture[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
-
def
feed[A](target: Observer[A], iterator: Iterator[A])(implicit s: Scheduler): Future[Ack]
Feeds the Observer instance with elements from the given
Iterator
, respecting the contract and returning aFuture[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 aFuture[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
-
def
feed[A](target: Observer[A], subscription: BooleanCancelable, iterable: Iterable[A])(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
-
def
feed[A](target: Observer[A], iterable: Iterable[A])(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
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
fromReactiveSubscriber[A](subscriber: Subscriber[A], subscription: Cancelable)(implicit s: Scheduler): Observer[A]
Given an
org.reactivestreams.Subscriber
as defined by the Reactive Streams specification, it builds an Observer instance compliant with the Monix Rx implementation. -
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
stopped[A]: Sync[A]
Helper for building an empty observer that continuously returns
Stop
inonNext
and that reports errors pushed withonError
. -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toReactiveSubscriber[A](observer: Observer[A], requestCount: Int)(implicit s: Scheduler): Subscriber[A]
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.- requestCount
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
-
def
toReactiveSubscriber[A](observer: Observer[A])(implicit s: Scheduler): Subscriber[A]
Transforms the source Observer into a
org.reactivestreams.Subscriber
instance as defined by the Reactive Streams specification. -
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
This is the API documentation for the Monix library.
Package Overview
monix.execution exposes lower level primitives for dealing with asynchronous execution:
Atomic
types, as alternative tojava.util.concurrent.atomic
monix.eval is for dealing with evaluation of results, thus exposing Task and Coeval.
monix.reactive exposes the
Observable
pattern:Observable
implementationsmonix.types implements type-class shims, to be translated to type-classes provided by libraries such as Cats or Scalaz.
monix.cats is the optional integration with the Cats library, providing translations for the types described in
monix.types
.monix.scalaz is the optional integration with the Scalaz library, providing translations for the types described in
monix.types
.