object Subscriber extends Serializable
- Source
- Subscriber.scala
- Alphabetic
- By Inheritance
- Subscriber
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- implicit final class Extensions[A] extends AnyVal
Extension methods for Subscriber.
- trait Sync[-A] extends Subscriber[A] with Observer.Sync[A]
A
Subscriber.Sync
is a Subscriber whoseonNext
signal is synchronous (i.e.A
Subscriber.Sync
is a Subscriber whoseonNext
signal is synchronous (i.e. the upstream observable doesn't need to wait on aFuture
in order to decide whether to send the next event or not).
Value Members
- def apply[A](observer: Observer[A], scheduler: Scheduler): Subscriber[A]
Subscriber builder
- def canceled[A](implicit s: Scheduler): Sync[A]
Helper for building an empty subscriber that doesn't do anything, but that returns
Stop
ononNext
. - def contramap[A, B](fa: Subscriber[A])(f: (B) => A): Subscriber[B]
Given a contravariant mapping function, transform the source Subscriber by transforming the input.
- def dump[A](prefix: String, out: PrintStream = System.out)(implicit s: Scheduler): Sync[A]
Builds an Subscriber that just logs incoming events.
- def empty[A](implicit s: Scheduler): Sync[A]
Helper for building an empty subscriber that doesn't do anything, besides logging errors in case they happen.
- def fromReactiveSubscriber[A](subscriber: org.reactivestreams.Subscriber[A], subscription: Cancelable)(implicit s: Scheduler): Subscriber[A]
Given an
org.reactivestreams.Subscriber
as defined by the Reactive Streams specification, it builds an Subscriber instance compliant with the Monix Rx implementation. - def toReactiveSubscriber[A](source: Subscriber[A], requestCount: Int): org.reactivestreams.Subscriber[A]
Transforms the source Subscriber into a
org.reactivestreams.Subscriber
instance as defined by the Reactive Streams specification.Transforms the source Subscriber 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](subscriber: Subscriber[A]): org.reactivestreams.Subscriber[A]
Transforms the source Subscriber into a
org.reactivestreams.Subscriber
instance as defined by the Reactive Streams specification. - object Sync extends Serializable
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.catnap exposes pure abstractions built on top of the Cats-Effect type classes:
monix.eval is for dealing with evaluation of results, thus exposing Task and Coeval.
monix.reactive exposes the
Observable
pattern:Observable
implementationsmonix.tail exposes Iterant for purely functional pull based streaming:
Batch
andBatchCursor
, the alternatives to Scala'sIterable
andIterator
respectively that we are using within Iterant's encodingYou can control evaluation with type you choose - be it Task, Coeval, cats.effect.IO or your own as long as you provide correct cats-effect or cats typeclass instance.