final class SafeSubscriber[-T] extends Subscriber[T]
A safe subscriber safe guards subscriber implementations, such that:
- the
onComplete
andonError
signals are back-pressured - errors triggered by downstream observers are caught and logged,
while the upstream gets an
Ack.Stop
, to stop sending events - once an
onError
oronComplete
was emitted, the observer no longer acceptsonNext
events, ensuring that the grammar is respected - if downstream signals a
Stop
, the observer no longer accepts any events, ensuring that the grammar is respected
- Source
- SafeSubscriber.scala
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- SafeSubscriber
- Subscriber
- Observer
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Value Members
-
def
onComplete(): Unit
- Definition Classes
- SafeSubscriber → Observer
-
def
onError(ex: Throwable): Unit
- Definition Classes
- SafeSubscriber → Observer
-
def
onNext(elem: T): Future[Ack]
- Definition Classes
- SafeSubscriber → Observer
-
implicit
val
scheduler: Scheduler
- Definition Classes
- SafeSubscriber → Subscriber
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
.