static fun <E : Any> resolveScopeFromLifecycle(provider: LifecycleScopeProvider<E>): CompletableSource
Overload for resolving lifecycle providers that defaults to checking start and end boundaries of lifecycles. That is, they will ensure that the lifecycle has both started and not ended.
Note: This resolves the scope immediately, so consider deferring execution as needed, such as using defer.
provider - the LifecycleScopeProvider to resolve.
OutsideScopeException - if the LifecycleScopeProvider#correspondingEvents() throws an OutsideScopeException during resolution.
Return
a resolved CompletableSource representation of a given provider
static fun <E : Any> resolveScopeFromLifecycle(provider: LifecycleScopeProvider<E>, checkEndBoundary: Boolean): CompletableSource
Overload for resolving lifecycle providers allows configuration of checking "end" boundaries of lifecycles. That is, they will ensure that the lifecycle has both started and not ended, and otherwise will throw one of LifecycleNotStartedException (if returns null) or if the lifecycle is ended. To configure the runtime behavior of these exceptions, see AutoDisposePlugins.
Note: This resolves the scope immediately, so consider deferring execution as needed, such as using defer.
provider - the LifecycleScopeProvider to resolve.
checkEndBoundary - whether or not to check that the lifecycle has ended
OutsideScopeException - if the LifecycleScopeProvider#correspondingEvents() throws an OutsideScopeException during resolution.
Return
a resolved CompletableSource representation of a given provider
static fun <E : Any> resolveScopeFromLifecycle(lifecycle: Observable<E>, endEvent: E): CompletableSource
lifecycle - the stream of lifecycle events
endEvent - the target end event
Return
a resolved Completable representation of a given lifecycle, targeting the given event
static fun <E : Any> resolveScopeFromLifecycle(lifecycle: Observable<E>, endEvent: E, @Nullable comparator: Comparator<E>?): CompletableSource
lifecycle - the stream of lifecycle events
endEvent - the target end event
comparator - an optional comparator for checking event equality.
Return
a resolved Completable representation of a given lifecycle, targeting the given event