mirror of
https://github.com/corda/corda.git
synced 2025-01-31 00:24:59 +00:00
Update kdoc of flowSafeSubscribe
This commit is contained in:
parent
79577a110a
commit
d5facae178
@ -85,17 +85,17 @@ class FlowSafeSubscriber<T>(actual: Subscriber<in T>) : SafeSubscriber<T>(actual
|
||||
class OnNextFailedException(message: String, cause: Throwable) : OnErrorNotImplementedException(message, cause)
|
||||
|
||||
/**
|
||||
* [flowSafeSubscribe] is used to return an Observable, through which we can subscribe non unsubscribing [rx.Observer]s
|
||||
* [Observable.flowSafeSubscribe] is used to return an Observable, through which we can subscribe non unsubscribing [rx.Observer]s
|
||||
* to the source [Observable].
|
||||
*
|
||||
* It unwraps an [Observer] from a [SafeSubscriber], re-wraps it with a [FlowSafeSubscriber] and then subscribes it
|
||||
* to the source [Observable].
|
||||
*
|
||||
* In case we need to subscribe with a [SafeSubscriber] via [flowSafeSubscribe], we have to:
|
||||
* 1. Call it with [strictMode] = false
|
||||
* 1. Declare a custom SafeSubscriber extending [SafeSubscriber].
|
||||
* 2. Wrap with the custom SafeSubscriber the [rx.Observer] to be subscribed to the source [Observable].
|
||||
* 3. Subscribe passing in as argument the custom SafeSubscriber.
|
||||
* 3. Call [Observable.flowSafeSubscribe] with [strictMode] = false
|
||||
* 4. Subscribe passing in as argument the custom SafeSubscriber.
|
||||
*/
|
||||
fun <T> Observable<T>.flowSafeSubscribe(strictMode: Boolean = false): Observable<T> {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user