diff options
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/remote/SpringServiceManager.kt')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/remote/SpringServiceManager.kt | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/remote/SpringServiceManager.kt b/src/main/kotlin/pl/treksoft/kvision/remote/SpringServiceManager.kt index 6b26da8e..524347d7 100644 --- a/src/main/kotlin/pl/treksoft/kvision/remote/SpringServiceManager.kt +++ b/src/main/kotlin/pl/treksoft/kvision/remote/SpringServiceManager.kt @@ -21,7 +21,6 @@ */ package pl.treksoft.kvision.remote -import kotlinx.coroutines.Deferred import kotlin.reflect.KClass /** @@ -39,7 +38,7 @@ actual open class SpringServiceManager<T : Any> actual constructor(serviceClass: * @param method a HTTP method */ protected actual inline fun <reified RET> bind( - noinline function: T.() -> Deferred<RET>, + noinline function: suspend T.() -> RET, route: String?, method: RpcHttpMethod ) { val routeDef = route ?: "route${this::class.simpleName}${counter++}" @@ -53,7 +52,7 @@ actual open class SpringServiceManager<T : Any> actual constructor(serviceClass: * @param method a HTTP method */ protected actual inline fun <reified PAR, reified RET> bind( - noinline function: T.(PAR) -> Deferred<RET>, + noinline function: suspend T.(PAR) -> RET, route: String?, method: RpcHttpMethod ) { val routeDef = route ?: "route${this::class.simpleName}${counter++}" @@ -67,7 +66,7 @@ actual open class SpringServiceManager<T : Any> actual constructor(serviceClass: * @param method a HTTP method */ protected actual inline fun <reified PAR1, reified PAR2, reified RET> bind( - noinline function: T.(PAR1, PAR2) -> Deferred<RET>, + noinline function: suspend T.(PAR1, PAR2) -> RET, route: String?, method: RpcHttpMethod ) { val routeDef = route ?: "route${this::class.simpleName}${counter++}" @@ -81,7 +80,7 @@ actual open class SpringServiceManager<T : Any> actual constructor(serviceClass: * @param method a HTTP method */ protected actual inline fun <reified PAR1, reified PAR2, reified PAR3, reified RET> bind( - noinline function: T.(PAR1, PAR2, PAR3) -> Deferred<RET>, + noinline function: suspend T.(PAR1, PAR2, PAR3) -> RET, route: String?, method: RpcHttpMethod ) { val routeDef = route ?: "route${this::class.simpleName}${counter++}" @@ -95,7 +94,7 @@ actual open class SpringServiceManager<T : Any> actual constructor(serviceClass: * @param method a HTTP method */ protected actual inline fun <reified PAR1, reified PAR2, reified PAR3, reified PAR4, reified RET> bind( - noinline function: T.(PAR1, PAR2, PAR3, PAR4) -> Deferred<RET>, + noinline function: suspend T.(PAR1, PAR2, PAR3, PAR4) -> RET, route: String?, method: RpcHttpMethod ) { val routeDef = route ?: "route${this::class.simpleName}${counter++}" @@ -110,7 +109,7 @@ actual open class SpringServiceManager<T : Any> actual constructor(serviceClass: */ protected actual inline fun <reified PAR1, reified PAR2, reified PAR3, reified PAR4, reified PAR5, reified RET> bind( - noinline function: T.(PAR1, PAR2, PAR3, PAR4, PAR5) -> Deferred<RET>, + noinline function: suspend T.(PAR1, PAR2, PAR3, PAR4, PAR5) -> RET, route: String?, method: RpcHttpMethod ) { |