RxOptionOp

wvlet.airframe.rx.RxOptionOp
case class RxOptionOp[+A](in: Rx[Option[A]]) extends RxOption[A]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait RxOption[A]
trait RxOps[Option[A]]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def parents: Seq[Rx[_]]

Attributes

Definition Classes

Inherited methods

def await: Option[A]

Await the completion of the first Rx result. This method is available only in Scala JVM.

Await the completion of the first Rx result. This method is available only in Scala JVM.

Note: Generally speaking, blocking operations should be avoided in reactive programming. Use this method only for testing purpose. Both airframe-http and AirSpec supports evaluating Rx[X] result (async) in a non-blocking way.

Attributes

Returns

the result

Inherited from:
RxOps
def cache[A1 >: A]: RxOptionCache[A1]

Attributes

Inherited from:
RxOption
def filter(f: A => Boolean): RxOption[A]

Attributes

Inherited from:
RxOption
def flatMap[B](f: A => RxOps[B]): RxOption[B]

Attributes

Inherited from:
RxOption
def getOrElse[A1 >: A](default: => A1): Rx[A1]

Attributes

Inherited from:
RxOption
def getOrElseRx[A1 >: A](default: => RxOps[A1]): Rx[A1]

Attributes

Inherited from:
RxOption
def join[B, C, D, E](b: RxOps[B], c: RxOps[C], d: RxOps[D], e: RxOps[E]): Rx[(Option[A], B, C, D, E)]

Attributes

Inherited from:
RxOption
def join[B, C, D](b: RxOps[B], c: RxOps[C], d: RxOps[D]): Rx[(Option[A], B, C, D)]

Attributes

Inherited from:
RxOption
def join[B, C](b: RxOps[B], c: RxOps[C]): Rx[(Option[A], B, C)]

Attributes

Inherited from:
RxOption
def join[B](b: RxOps[B]): Rx[(Option[A], B)]

Attributes

Inherited from:
RxOption
def map[B](f: A => B): RxOption[B]

Attributes

Inherited from:
RxOption
def orElse[A1 >: A](default: => Option[A1]): RxOption[A1]

Attributes

Inherited from:
RxOption
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
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

Inherited from:
RxOps
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

Inherited from:
RxOps
def run[U](effect: (Option[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

Inherited from:
RxOps
def runContinuously[U](effect: (Option[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

Inherited from:
RxOps
def subscribe[U](subscriber: (Option[A]) => U): Cancelable

Attributes

Inherited from:
RxOps
def tap(f: (Option[A]) => Unit): Rx[Option[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

Inherited from:
RxOps
def tapOn(f: PartialFunction[Try[Option[A]], Unit]): Rx[Option[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

Inherited from:
RxOps
def tapOnFailure(f: Throwable => Unit): Rx[Option[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

Inherited from:
RxOps
def toRx: Rx[Option[A]]

Attributes

Inherited from:
RxOption
def transform[B](f: (Option[A]) => B): Rx[B]

Attributes

Inherited from:
RxOption
def transformOption[B](f: (Option[A]) => Option[B]): RxOption[B]

Attributes

Inherited from:
RxOption
def transformRx[B](f: (Option[A]) => RxOps[B]): Rx[B]

Attributes

Inherited from:
RxOption
def transformRxOption[B](f: (Option[A]) => RxOption[B]): RxOption[B]

Attributes

Inherited from:
RxOption
def when(cond: A => Boolean): RxOption[A]

An alias for filter

An alias for filter

Attributes

Inherited from:
RxOption
def withFilter(f: A => Boolean): RxOption[A]

Attributes

Inherited from:
RxOption
def zip[B, C, D, E](b: RxOps[B], c: RxOps[C], d: RxOps[D], e: RxOps[E]): Rx[(Option[A], B, C, D, E)]

Attributes

Inherited from:
RxOption
def zip[B, C, D](b: RxOps[B], c: RxOps[C], d: RxOps[D]): Rx[(Option[A], B, C, D)]

Attributes

Inherited from:
RxOption
def zip[B, C](b: RxOps[B], c: RxOps[C]): Rx[(Option[A], B, C)]

Attributes

Inherited from:
RxOption
def zip[B](b: RxOps[B]): Rx[(Option[A], B)]

Attributes

Inherited from:
RxOption