resolveScopeFromLifecycle
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.
Return
a resolved CompletableSource representation of a given provider
Parameters
the LifecycleScopeProvider to resolve.
the lifecycle event type
Throws
if the correspondingEvents throws an OutsideScopeException during resolution.
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 peekLifecycle 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.
Return
a resolved CompletableSource representation of a given provider
Parameters
the LifecycleScopeProvider to resolve.
whether or not to check that the lifecycle has ended
the lifecycle event type
Throws
if the correspondingEvents throws an OutsideScopeException during resolution.
Returns a resolved Completable representation of a given lifecycle, targeting the given event
Parameters
the stream of lifecycle events
the target end event
the lifecycle event type
Returns a resolved Completable representation of a given lifecycle, targeting the given event
Parameters
the stream of lifecycle events
the target end event
an optional comparator for checking event equality.
the lifecycle event type