The base reactive stream interface that can receive events from upstream operators and chain next actions using Scala-collection like operators (e.g., map, filter, etc.)
Attributes
- Companion
- object
- Graph
-
- Supertypes
- Known subtypes
-
class ConcatOp[A]class IntervalOpclass LastOp[A]class SeqOp[A]class SingleOp[A]class TakeOp[A]class TimerOpclass TryOp[A]class CacheOp[A]class FilterOp[A]class NamedOp[A]class TapOnOp[A]class ThrottleFirstOp[A]class ThrottleLastOp[A]trait RxCache[A]trait RxSource[A]class RxBlockingQueue[A]class RxVar[A]Show all
Members list
Value members
Concrete methods
Combine Rx stream and Future operators.
Combine Rx stream and Future operators.
This method is useful when you need to call RPC multiple times and chain the next operation after receiving the response.
Rx.intervalMillis(1000)
.andThen { i => callRpc(...) } // Returns Future
.map { (rpcReturnValue) => ... } // Use the Future response
Attributes
Cache the last item, and emit the cached value if available.
Cache the last item, and emit the cached value if available.
The cached value will be preserved to the operator itself even after cancelling the subscription. Re-subscription of this operator will immediately return the cached value to the downstream operator.
This operator is useful if we need to involve time-consuming process, and want to reuse the last result: val v = Rx.intervalMillis(1000).map(i => (heavy process)).cache
v.map { x => ... }
Attributes
Applies the given filter and emit the value only when the filter condition matches
Applies the given filter and emit the value only when the filter condition matches
Attributes
Applies f
to the input value that produces another Rx stream.
Applies f
to the input value that produces another Rx stream.
Attributes
Emit a new output if one of Rx[A] or Rx[B] is changed.
Emit a new output if one of Rx[A] or Rx[B] is changed.
This method is useful when you need to monitor multiple Rx objects.
Using joins will be more intuitive than nesting multiple Rx operators like Rx[A].map { x => ... Rx[B].map { ...} }.
Attributes
Emit a new output if one of Rx[A], Rx[B], or Rx[C] is changed.
Emit a new output if one of Rx[A], Rx[B], or Rx[C] is changed.
Attributes
Emit a new output if one of Rx[A], Rx[B], Rx[C], or Rx[D] is changed.
Emit a new output if one of Rx[A], Rx[B], Rx[C], or Rx[D] is changed.
Attributes
Emit a new output if one of Rx[A], Rx[B], Rx[C], Rx[D], or Rx[E] is changed.
Emit a new output if one of Rx[A], Rx[B], Rx[C], Rx[D], or Rx[E] is changed.
Attributes
Applies f
to the input value and return the result.
Applies f
to the input value and return the result.
Attributes
Applies f
to the input value that produces another Rx stream. This method is an alias of flatMap(f)
Applies f
to the input value that produces another Rx stream. This method is an alias of flatMap(f)
Attributes
Emit the most recent item of the source within periodic time intervals.
Emit the most recent item of the source within periodic time intervals.
Attributes
Emit the given item first before returning the items from the source.
Emit the given item first before returning the items from the source.
Attributes
Emit the given items first before returning the items from the source.
Emit the given items first before returning the items from the source.
Attributes
Take an event up to n elements. This may receive fewer events than n if the upstream operator completes before generating n elements.
Take an event up to n elements. This may receive fewer events than n if the upstream operator completes before generating n elements.
Attributes
Emit the first item of the source within each sampling period. For example, this is useful to prevent double-clicks of buttons.
Emit the first item of the source within each sampling period. For example, this is useful to prevent double-clicks of buttons.
Attributes
Emit the most recent item of the source within periodic time intervals.
Emit the most recent item of the source within periodic time intervals.
Attributes
Materialize the stream as Seq[A]. This works only for the finite stream and for Scala JVM.
Materialize the stream as Seq[A]. This works only for the finite stream and for Scala JVM.
Attributes
Transform a Success(v) or Failure(Throwable) input with a given function.
Transform a Success(v) or Failure(Throwable) input with a given function.
Attributes
Transform a specific type of an exception into another exception. This is useful for handling exceptions.
Transform a specific type of an exception into another exception. This is useful for handling exceptions.
Attributes
Transform the input value by wrapping it with Try regardless of success or failure. This is useful when you need to handle both success and failure cases in the same way.
Transform the input value by wrapping it with Try regardless of success or failure. This is useful when you need to handle both success and failure cases in the same way.
Attributes
Transform the input value by wrapping it with Try regardless of success or failure. This is useful when you need to add a post-processing step after handling success and failure cases.
Transform the input value by wrapping it with Try regardless of success or failure. This is useful when you need to add a post-processing step after handling success and failure cases.
Attributes
An alias of filter
An alias of filter
Attributes
Combine two Rx streams to form a sequence of pairs. This will emit a new pair when both of the streams are updated.
Combine two Rx streams to form a sequence of pairs. This will emit a new pair when both of the streams are updated.
Attributes
Combine three Rx streams to form a sequence of triples. This will emit a new triple when all of the streams are updated.
Combine three Rx streams to form a sequence of triples. This will emit a new triple when all of the streams are updated.
Attributes
Combine four Rx streams to form a sequence of quadruples. This will emit a new quadruple when all of the streams are updated.
Combine four Rx streams to form a sequence of quadruples. This will emit a new quadruple when all of the streams are updated.
Attributes
Combine five Rx streams to form a sequence of quintuples. This will emit a new quintuple when all of the streams are updated.
Combine five Rx streams to form a sequence of quintuples. This will emit a new quintuple when all of the streams are updated.
Attributes
Inherited methods
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
Recover from a known error and emit a replacement value
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
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
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
Attributes
- Inherited from:
- RxOps
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.
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
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