aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules/kvision-server-vertx/src/jvmMain/kotlin/pl/treksoft/kvision/remote
diff options
context:
space:
mode:
Diffstat (limited to 'kvision-modules/kvision-server-vertx/src/jvmMain/kotlin/pl/treksoft/kvision/remote')
-rw-r--r--kvision-modules/kvision-server-vertx/src/jvmMain/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt7
1 files changed, 4 insertions, 3 deletions
diff --git a/kvision-modules/kvision-server-vertx/src/jvmMain/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt b/kvision-modules/kvision-server-vertx/src/jvmMain/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt
index c64689b1..ae8b857c 100644
--- a/kvision-modules/kvision-server-vertx/src/jvmMain/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt
+++ b/kvision-modules/kvision-server-vertx/src/jvmMain/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt
@@ -417,7 +417,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
noinline function: suspend T.(ReceiveChannel<PAR1>, SendChannel<PAR2>) -> Unit,
route: String?
) {
- val routeDef = "route${this::class.simpleName}${counter++}"
+ val routeDef = route ?: "route${this::class.simpleName}${counter++}"
webSocketRequests["/kvws/$routeDef"] = { injector, ws ->
val incoming = Channel<String>()
val outgoing = Channel<String>()
@@ -491,9 +491,10 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
*/
@Suppress("TooGenericExceptionCaught")
protected actual inline fun <reified RET> bindTabulatorRemote(
- noinline function: suspend T.(Int?, Int?, List<RemoteFilter>?, List<RemoteSorter>?, String?) -> RemoteData<RET>
+ noinline function: suspend T.(Int?, Int?, List<RemoteFilter>?, List<RemoteSorter>?, String?) -> RemoteData<RET>,
+ route: String?
) {
- val routeDef = "route${this::class.simpleName}${counter++}"
+ val routeDef = route ?: "route${this::class.simpleName}${counter++}"
addRoute(HttpMethod.POST, "/kv/$routeDef") { ctx ->
val jsonRpcRequest = ctx.bodyAsJson.mapTo(JsonRpcRequest::class.java)
@Suppress("MagicNumber")