RequestContexts

class RequestContexts(storeId: String? = null) : Store<RequestContext>

In-memory RequestContext store. Override the storeId to use multiple stores in one app.

Constructors

Link copied to clipboard
constructor(storeId: String? = null)

Functions

Link copied to clipboard
fun Events.and(next: Events): Events
Link copied to clipboard

Convert the result of a lens extraction to a Result4k type which

Link copied to clipboard
fun (Request) -> Boolean.asRouter(description: String = unavailable.description): Router

Convert any predicate on a request into a router

Link copied to clipboard
Link copied to clipboard
fun HttpHandler.debug(out: PrintStream = System.out, debugStream: Boolean = false): (request: Request) -> Response
Link copied to clipboard
open fun extract(target: Request): RequestContext

Lens operation to get the value from the target. Synonym for invoke(IN)

Link copied to clipboard
open operator fun <R : Request> get(target: R): RequestContext

Lens operation to get the value from the target. Synonym for invoke(IN)

Link copied to clipboard
open fun <R : Request> inject(value: RequestContext, target: R): R

Lens operation to set the value into the target. Synomym for invoke(IN, OUT)

Link copied to clipboard
open operator override fun invoke(target: Request): RequestContext

Lens operation to get the value from the target

open operator override fun <R : Request> invoke(value: RequestContext, target: R): R

Lens operation to set the value into the target

Link copied to clipboard
open infix fun <R : Request> of(value: RequestContext): (R) -> R

Bind this Lens to a value, so we can set it into a target

Link copied to clipboard
open override fun remove(value: RequestContext): RequestContext?
Link copied to clipboard

Restrict the type that this Lens can extract from

Link copied to clipboard

Restrict the type that this Lens can inject into

Link copied to clipboard
open operator fun <R : Request> set(target: R, value: RequestContext): R

Lens operation to set the value into the target. Synomym for invoke(IN, OUT)

Link copied to clipboard
fun Events.then(next: Events): (Event) -> Unit
Link copied to clipboard

Convert a synchronous HttpHandler API to mimic AsyncHttpClient