MobiusLoop

This is the main loop for Mobius.

It hooks up all the different parts of the main Mobius loop, and dispatches messages internally on the appropriate executors.

Types

Link copied to clipboard
interface Builder<M, E, F> : MobiusLoop.Factory<M, E, F>

Defines a fluent API for configuring a MobiusLoop. Implementations must be immutable, making them safe to share between threads.

Link copied to clipboard
object Companion
Link copied to clipboard
interface Controller<M, E>

Defines a controller that can be used to start and stop MobiusLoops.

Link copied to clipboard
interface Factory<M, E, F>
Link copied to clipboard
interface Logger<M, E, F>

Interface for logging init and update calls.

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun dispatchEvent(event: E)
Link copied to clipboard
open override fun dispose()

Dispose of all resources associated with this object.

Link copied to clipboard
fun observe(observer: Consumer<M>): Disposable

Add an observer of model changes to this loop. If mostRecentModel is non-null, the observer will immediately be notified of the most recent model. The observer will be notified of future changes to the model until the loop or the returned Disposable is disposed.