Map Router
Parameters
default Route
default Route to start with.
Constructors
Functions
Link copied to clipboard
Default error handler printing the error to console.
Link copied to clipboard
open fun handle(execute: suspend (Map<String, String>) -> Map<String, String>): SimpleHandler<Unit>
Content copied to clipboard
Factory method to create a SimpleHandler that does not take an Action
open fun <A> handle(execute: suspend (Map<String, String>, A) -> Map<String, String>): SimpleHandler<A>
Content copied to clipboard
Factory method to create a SimpleHandler mapping the actual value of the Store and a given Action to a new value.
Link copied to clipboard
open fun <E> handleAndEmit(execute: suspend FlowCollector<E>.(Map<String, String>) -> Map<String, String>): EmittingHandler<Unit, E>
Content copied to clipboard
factory method to create an EmittingHandler that does not take an action in it's execute-lambda.
open fun <A, E> handleAndEmit(execute: suspend FlowCollector<E>.(Map<String, String>, A) -> Map<String, String>): EmittingHandler<A, E>
Content copied to clipboard
Factory method to create a EmittingHandler taking an action-value and the current store value to derive the new value. An EmittingHandler is a Flow by itself and can therefore be connected to other SimpleHandlers even in other Stores.
Link copied to clipboard
Returns the value for the given key from the routing parameters.