kvision / pl.treksoft.kvision.remote / SpringServiceManager

SpringServiceManager

open expect class SpringServiceManager<T : Any> : ServiceManager

Multiplatform service manager for Spring Boot.

Constructors

<init>

SpringServiceManager(serviceClass: KClass<T>)

Multiplatform service manager for Spring Boot.

Properties

calls

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

counter

var counter: Int

deleteRequests

val deleteRequests: MutableMap<String, (Request, <ERROR CLASS>) -> Unit>

mapper

val mapper: <ERROR CLASS>

optionsRequests

val optionsRequests: MutableMap<String, (Request, <ERROR CLASS>) -> Unit>

postRequests

val postRequests: MutableMap<String, (Request, <ERROR CLASS>) -> Unit>

putRequests

val putRequests: MutableMap<String, (Request, <ERROR CLASS>) -> Unit>

serviceClass

val serviceClass: KClass<T>

Functions

addRoute

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

bind

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

Binds a given route with a function of the receiver.

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>