kvision / pl.treksoft.kvision.remote / JoobyServiceManager

JoobyServiceManager

open expect class JoobyServiceManager<T : Any> : ServiceManager

Multiplatform service manager for Jooby.

Constructors

<init>

JoobyServiceManager(service: T)

Multiplatform service manager for Jooby.

Properties

calls

val calls: MutableMap<String, Pair<String, RpcHttpMethod>>

counter

var counter: Int

mapper

val mapper: <ERROR CLASS>

routes

val routes: MutableList<KVServer.() -> Unit>

service

val service: T

Functions

applyRoutes

fun applyRoutes(k: KVServer): Unit

Applies all defined routes to the given server.

bind

fun <RET> bind(function: T.(Request?) -> Deferred<RET>, route: String? = null, method: RpcHttpMethod = RpcHttpMethod.POST): Unit
fun <PAR, RET> bind(function: T.(PAR, Request?) -> Deferred<RET>, route: String? = null, method: RpcHttpMethod = RpcHttpMethod.POST): Unit
fun <PAR1, PAR2, RET> bind(function: T.(PAR1, PAR2, Request?) -> Deferred<RET>, route: String? = null, method: RpcHttpMethod = RpcHttpMethod.POST): Unit
fun <PAR1, PAR2, PAR3, RET> bind(function: T.(PAR1, PAR2, PAR3, Request?) -> Deferred<RET>, route: String? = null, method: RpcHttpMethod = RpcHttpMethod.POST): Unit
fun <PAR1, PAR2, PAR3, PAR4, RET> bind(function: T.(PAR1, PAR2, PAR3, PAR4, Request?) -> Deferred<RET>, route: String? = null, method: RpcHttpMethod = RpcHttpMethod.POST): Unit
fun <PAR1, PAR2, PAR3, PAR4, PAR5, RET> bind(function: T.(PAR1, PAR2, PAR3, PAR4, PAR5, Request?) -> Deferred<RET>, route: String? = null, method: RpcHttpMethod = RpcHttpMethod.POST): Unit

Binds a given route with a function of the receiver.

call

fun call(method: RpcHttpMethod, path: String, handler: (Request, <ERROR CLASS>) -> Unit): KVServer.() -> Unit

getCalls

open fun getCalls(): Map<String, Pair<String, RpcHttpMethod>>

Returns the map of defined paths.

getParameter

fun <T> getParameter(str: String?): T

Inherited Functions

getCalls

open fun getCalls(): Map<String, Pair<String, RpcHttpMethod>>

Returns the map of defined paths.

Companion Object Properties

LOG

val LOG: <ERROR CLASS>