RxOps

wvlet.airframe.rx.RxOps
trait RxOps[+A]

A common interface for Rx and RxOption operators

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Rx[A]
class ConcatOp[A]
class IntervalOp
class Join3Op[A, B, C]
class Join4Op[A, B, C, D]
class Join5Op[A, B, C, D, E]
class JoinOp[A, B]
class LastOp[A]
class SeqOp[A]
class SingleOp[A]
class TakeOp[A]
class TimerOp
class TransformOp[A, B]
class TransformRxOp[A, B]
class TransformTryOp[A, B]
class TryOp[A]
class UnaryRx[I, A]
class CacheOp[A]
class FilterOp[A]
class FlatMapOp[A, B]
class MapOp[A, B]
class NamedOp[A]
class RecoverOp[A, U]
class RecoverWithOp[A, U]
class TapOnOp[A]
class ThrottleFirstOp[A]
class ThrottleLastOp[A]
class Zip3Op[A, B, C]
class Zip4Op[A, B, C, D]
class Zip5Op[A, B, C, D, E]
class ZipOp[A, B]
trait RxCache[A]
trait RxSource[A]
class RxBlockingQueue[A]
class RxVar[A]
trait RxOption[A]
trait RxOptionCache[A]
class RxOptionCacheOp[A]
class RxOptionOp[A]
class RxOptionVar[A]
Show all
Self type
RxOps[A]

Members list

Value members

Abstract methods

def parents: Seq[RxOps[_]]
def toRx: Rx[A]

Concrete methods

def recover[U](f: PartialFunction[Throwable, U]): Rx[U]

Recover from a known error and emit a replacement value

Recover from a known error and emit a replacement value

Attributes

def recoverWith[A](f: PartialFunction[Throwable, RxOps[A]]): Rx[A]

Recover from a known error and emit replacement values from a given Rx

Recover from a known error and emit replacement values from a given Rx

Attributes

def run[U](effect: A => U): Cancelable

Evaluate this Rx[A] and apply the given effect function. Once OnError(e) or OnCompletion is observed, it will stop the evaluation.

Evaluate this Rx[A] and apply the given effect function. Once OnError(e) or OnCompletion is observed, it will stop the evaluation.

Attributes

def runContinuously[U](effect: A => U): Cancelable

Keep evaluating Rx[A] even if OnError(e) or OnCompletion is reported. This is useful for keep processing streams.

Keep evaluating Rx[A] even if OnError(e) or OnCompletion is reported. This is useful for keep processing streams.

Attributes

def subscribe[U](subscriber: A => U): Cancelable
def tap(f: A => Unit): Rx[A]

Applies f to the value for having a side effect, and return the original value.

Applies f to the value for having a side effect, and return the original value.

The difference from tapOn is that this method will not receive an input failure.

Value parameters

f

side-effect function used when observing a value

Attributes

Returns

the original Rx event

def tapOn(f: PartialFunction[Try[A], Unit]): Rx[A]

Applies f to the value for having a side effect, and return the original value.

Applies f to the value for having a side effect, and return the original value.

This method is useful for debugging Rx chains. For example:

 rx.tapOn {
   case Success(v) => debug(s"received ${v}")
   case Failure(e) => error(s"request failed", e)
 }

Value parameters

f

partial function for the side effect

Attributes

Returns

the original Rx event

def tapOnFailure(f: Throwable => Unit): Rx[A]

Applies f to the error if it happens, and return the original value.

Applies f to the error if it happens, and return the original value.

This method is useful for logging the error.

Value parameters

f

side-effect function used when observing an error

Attributes

Returns

the original Rx event