kvision / pl.treksoft.kvision.remote / ServiceManager

ServiceManager

open actual class ServiceManager<out T>

Multiplatform service manager.

Constructors

<init>

ServiceManager(service: T)

Multiplatform service manager.

Properties

calls

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

counter

var counter: Int

Functions

applyRoutes

actual fun applyRoutes(k: JoobyServer): Unit

Applies all defined routes to the given server. Not used on the js platform.

bind

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

Binds a given route with a function of the receiver.

getCalls

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

Returns the map of defined paths.