corda / net.corda.core / rx.Observable

Extensions for rx.Observable

mapErrors

fun <ELEMENT> Observable<ELEMENT>.mapErrors(transform: (Throwable) -> Throwable): Observable<ELEMENT>

Returns an Observable that transforms errors according to the provided transform function.

toFuture

fun <T> Observable<T>.toFuture(): CordaFuture<T>

Returns a CordaFuture bound to the first item emitted by this Observable. The future will complete with a NoSuchElementException if no items are emitted or any other error thrown by the Observable. If it's cancelled then it will unsubscribe from the observable.