KVServiceBinder

abstract class KVServiceBinder<T, RH, WH>(routeNameGenerator: NameGenerator?)

Binds HTTP calls to kotlin functions

Parameters

T

the receiver of bound functions

RH

the platform specific request handler

WH

the platform specific websocket handler

Constructors

Link copied to clipboard
fun KVServiceBinder(routeNameGenerator: NameGenerator? = null)

Functions

Link copied to clipboard
inline fun <PAR1 : Any, PAR2 : Any> bind(noinline function: suspend T.(<ERROR CLASS><PAR1>, <ERROR CLASS><PAR2>) -> Unit, route: String? = null)

Binds a given web socket connection with a function of the receiver.

inline fun <RET> bind(noinline function: suspend T.() -> RET, method: <ERROR CLASS>, route: String? = null)
inline fun <PAR, RET> bind(noinline function: suspend T.(PAR) -> RET, method: <ERROR CLASS>, route: String? = null)
inline fun <PAR1, PAR2, RET> bind(noinline function: suspend T.(PAR1, PAR2) -> RET, method: <ERROR CLASS>, route: String? = null)
inline fun <PAR1, PAR2, PAR3, RET> bind(noinline function: suspend T.(PAR1, PAR2, PAR3) -> RET, method: <ERROR CLASS>, route: String? = null)
inline fun <PAR1, PAR2, PAR3, PAR4, RET> bind(noinline function: suspend T.(PAR1, PAR2, PAR3, PAR4) -> RET, method: <ERROR CLASS>, route: String? = null)
inline fun <PAR1, PAR2, PAR3, PAR4, PAR5, RET> bind(noinline function: suspend T.(PAR1, PAR2, PAR3, PAR4, PAR5) -> RET, method: <ERROR CLASS>, route: String? = null)
inline fun <PAR1, PAR2, PAR3, PAR4, PAR5, PAR6, RET> bind(noinline function: suspend T.(PAR1, PAR2, PAR3, PAR4, PAR5, PAR6) -> RET, method: <ERROR CLASS>, route: String? = null)

Binds a given route with a function of the receiver.

Link copied to clipboard
inline fun <RET> bindTabulatorRemote(noinline function: suspend T.(Int?, Int?, List<<ERROR CLASS>>?, List<<ERROR CLASS>>?, String?) -> <ERROR CLASS><RET>, route: String?)

Binds a given function of the receiver as a tabulator component source

Link copied to clipboard
fun <REQ, RES> bindWebsocket(route: String? = null, function: suspend T.(<ERROR CLASS><REQ>, <ERROR CLASS><RES>) -> Unit, requestSerializerFactory: () -> <ERROR CLASS><REQ>, responseSerializerFactory: () -> <ERROR CLASS><RES>)

Binds a given web socket connection with a function of the receiver.

Link copied to clipboard
abstract fun <RET> createRequestHandler(method: <ERROR CLASS>, function: suspend T.(params: List<String?>) -> RET, serializerFactory: () -> <ERROR CLASS><RET>): RH
Link copied to clipboard
abstract fun <REQ, RES> createWebsocketHandler(function: suspend T.(<ERROR CLASS><REQ>, <ERROR CLASS><RES>) -> Unit, requestSerializerFactory: () -> <ERROR CLASS><REQ>, responseSerializerFactory: () -> <ERROR CLASS><RES>): WH

Properties

Link copied to clipboard
lateinit var deSerializer: ObjectDeSerializer
Link copied to clipboard
val routeMapRegistry: RouteMapRegistry<RH>
Link copied to clipboard
val webSocketRequests: MutableMap<String, WH>