Package-level declarations

Types

Link copied to clipboard
fun interface ActionConsumer<in A : MVIAction>

An interface for entities that can consumes. This interface is mainly implemented by Store

Link copied to clipboard
interface ActionProvider<out A : MVIAction>

An entity that can provide MVIActions through the actions flow. This flow may behave differently depending on ActionShareBehavior chosen. This is mainly implemented by the Store and exposed through Provider (Store.subscribe)

Link copied to clipboard
interface ActionReceiver<in A : MVIAction>

An entity that can receive different actions and then possibly emit them as an ActionProvider. Actions are collected by the ActionConsumer. This is most often implemented by a Store and exposed through PipelineContext

Link copied to clipboard
sealed interface ActionShareBehavior

An class representing how MVIAction sharing will be handled in the ActionProvider. There are 4 possible behaviors, which will be different depending on your use-case. When in doubt, use the default one, and change if you have issues.

Link copied to clipboard

A consumer of Store's events that has certain state S. Each Consumer needs a container, a way to emit intents to it, a way to render the new state.

Link copied to clipboard

A simple class that delegates to the store property.

Link copied to clipboard

Marker annotation for store apis that are not thread-safe

Link copied to clipboard
data object EmptyState : MVIState

An empty state for stores that do not have a state.

Link copied to clipboard

Marker annotation for store apis that are experimental.

Link copied to clipboard
annotation class FlowMVIDSL

A DSL marker for the FlowMVI DSL. Defines a contract for calling the DSL functions.

Link copied to clipboard

A simple class that delegates to the store property.

Link copied to clipboard
interface ImmutableStore<out S : MVIState, in I : MVIIntent, out A : MVIAction>

A Store that does not allow sending intents.

Link copied to clipboard
interface IntentReceiver<in I : MVIIntent>

An entity that can receive and process MVIIntents. Usually, this is a Store.

Link copied to clipboard

Marker annotation for store apis that are not thread-safe

Link copied to clipboard
fun interface LazyPlugin<S : MVIState, I : MVIIntent, A : MVIAction>

A plugin that is build lazily at the time of Store creation.

Link copied to clipboard
interface MVIAction

A single, one-shot, side-effect of processing an MVIIntent, sent to ActionConsumer, processed by ActionProvider and handled by ActionReceiver.

Link copied to clipboard
interface MVIIntent

User interaction or other event that is sent to and processed by IntentReceiver.

Link copied to clipboard
interface MVIState

The state of the StateProvider, most likely a Store. States updates are sent to the StateReceiver and consumed by the StateConsumer.

Link copied to clipboard

PipelineContext is an entity that exposes the underlying logic of the Store to its StorePlugins.

Link copied to clipboard

An entity that handles MVIIntents, produces actions and manages states. Provider is available when you call Store.subscribe and allows you to consume your states and actions Provider is a:

Link copied to clipboard
fun interface StateConsumer<in S : MVIState>

An entity that can render states coming from a StateProvider. Most likely, a subscriber of the Store.

Link copied to clipboard
interface StateProvider<out S : MVIState>

An entity that exposes states and allows StateConsumers to subscribe to them. Most often accessed through a Store as a Provider.

Link copied to clipboard
interface StateReceiver<S : MVIState>

An entity that handles MVIState updates. This entity modifies the state of the StateProvider. This is most often implemented by a Store and exposed through PipelineContext.

Link copied to clipboard
interface Store<out S : MVIState, in I : MVIIntent, out A : MVIAction> : ImmutableStore<S, I, A> , IntentReceiver<I> , AutoCloseable

A central business logic unit for handling MVIIntents, MVIActions, and MVIStates. Usually not subclassed but used with a corresponding builder (see pro.respawn.flowmvi.dsl.store). A store functions independently of any subscribers, has its own lifecycle, can be stopped and relaunched at will. The store can be mutated only through MVIIntent. Store is an IntentReceiver and can be closed to stop it.

Link copied to clipboard
data class StoreConfiguration<S : MVIState>(val initial: S, val allowIdleSubscriptions: Boolean, val parallelIntents: Boolean, val actionShareBehavior: ActionShareBehavior, val intentCapacity: Int, val onOverflow: BufferOverflow, val debuggable: Boolean, val coroutineContext: CoroutineContext, val logger: StoreLogger, val atomicStateUpdates: Boolean, val name: String?)

A configuration of the Store. Please see StoreConfigurationBuilder for details on the meaning behind the properties listed here

Link copied to clipboard

A unit that can extend the business logic of the Store. All stores are mostly based on plugins, and their behavior is entirely determined by them.

Link copied to clipboard

A subscriber lifecycle is the lifecycle of the UI element used to subscribe to the store. This is usually the "screen"'s lifecycle. The lifecycle implementation must follow the SubscriptionMode contract as described in the documentation.

Link copied to clipboard

Subscription mode of the UI element with a dedicated lifecycle. An implementation of the SubscriberLifecycle must follow the contract outlined for each mode.

Link copied to clipboard
open class UnrecoverableException(val cause: Exception? = null, val message: String? = null) : IllegalStateException

An exception that has happened in the Store that cannot be recovered from. This is either an exception resulting from developer errors (such as unhandled intents), or an exception while trying to recover from another exception (which is prohibited). You may also use this to bypass store plugins handling this particular exception.