public interface LifecycleScopeProvider<E> extends ScopeProvider {
Observable<E> lifecycle();

Function<E, E> correspondingEvents();

E peekLifecycle();

// Inherited from ScopeProvider
CompletableSource requestScope();
}

All Types

com.uber.autodispose.lifecycle.CorrespondingEventsFunction

A corresponding events function that acts as a normal Function but ensures a single event type in the generic and tightens the possible exception thrown to OutsideScopeException.

com.uber.autodispose.lifecycle.LifecycleEndedException

Signifies an error occurred due to execution starting after the lifecycle has ended.

com.uber.autodispose.lifecycle.LifecycleNotStartedException

Signifies an error occurred due to execution starting before the lifecycle has started.

com.uber.autodispose.lifecycle.LifecycleScopeProvider

A convenience interface that, when implemented, helps provide information to create implementations that resolve the next corresponding lifecycle event and construct a Completable representation of it from the #lifecycle() stream.

Convenience resolver utilities for this can be found in LifecycleScopes.

com.uber.autodispose.lifecycle.LifecycleScopes

Utilities for dealing with LifecycleScopeProviders. This includes factories for resolving Completable representations of scopes, corresponding events, etc.

com.uber.autodispose.lifecycle.TestLifecycleScopeProvider

Test utility to create LifecycleScopeProvider instances for tests.

Supports a start and stop lifecycle. Subscribing when outside of the lifecycle will throw either a LifecycleNotStartedException or LifecycleEndedException.