KVServiceBinder
abstract class KVServiceBinder<out T, RH, WH, SH>(routeNameGenerator: NameGenerator? = null)(source)
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
SH
the platform specific server-sent events handler
Properties
Functions
Link copied to clipboard
inline fun <PAR : Any> bind(noinline function: suspend T.(SendChannel<PAR>) -> Unit, route: String?)
Binds a given server-sent events connection with a function of the receiver.
inline fun <PAR1 : Any, PAR2 : Any> bind(noinline function: suspend T.(ReceiveChannel<PAR1>, SendChannel<PAR2>) -> Unit, route: String?)
Binds a given web socket connection with a function of the receiver.
inline fun <PAR, RET> bind(noinline function: suspend T.(PAR) -> RET, method: HttpMethod, route: String?)
inline fun <PAR1, PAR2, RET> bind(noinline function: suspend T.(PAR1, PAR2) -> RET, method: HttpMethod, route: String?)
inline fun <PAR1, PAR2, PAR3, RET> bind(noinline function: suspend T.(PAR1, PAR2, PAR3) -> RET, method: HttpMethod, route: String?)
inline fun <PAR1, PAR2, PAR3, PAR4, RET> bind(noinline function: suspend T.(PAR1, PAR2, PAR3, PAR4) -> RET, method: HttpMethod, route: String?)
inline fun <PAR1, PAR2, PAR3, PAR4, PAR5, RET> bind(noinline function: suspend T.(PAR1, PAR2, PAR3, PAR4, PAR5) -> RET, method: HttpMethod, route: String?)
inline fun <PAR1, PAR2, PAR3, PAR4, PAR5, PAR6, RET> bind(noinline function: suspend T.(PAR1, PAR2, PAR3, PAR4, PAR5, PAR6) -> RET, method: HttpMethod, route: String?)
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<RemoteFilter>?, List<RemoteSorter>?, String?) -> RemoteData<RET>, route: String?)
Binds a given function of the receiver as a tabulator component source
Link copied to clipboard
Link copied to clipboard
abstract fun <RET> createRequestHandler(method: HttpMethod, function: suspend T.(params: List<String?>) -> RET, numberOfParams: Int, serializerFactory: () -> KSerializer<RET>): RH
Link copied to clipboard