diff options
Diffstat (limited to 'kvision-modules/kvision-server-jooby')
-rw-r--r-- | kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServer.kt (renamed from kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/Jooby.kt) | 2 | ||||
-rw-r--r-- | kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/ServiceManager.kt | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/Jooby.kt b/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServer.kt index 928892a2..76f1ee30 100644 --- a/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/Jooby.kt +++ b/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServer.kt @@ -36,7 +36,7 @@ import kotlinx.coroutines.async as coroutinesAsync /** * A Jooby based server. */ -actual open class JoobyServer(init: JoobyServer.() -> Unit) : Kooby() { +actual open class KVServer(init: KVServer.() -> Unit) : Kooby() { init { @Suppress("LeakingThis") assets("/", "index.html") diff --git a/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/ServiceManager.kt b/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/ServiceManager.kt index edaa9ba3..b37d7319 100644 --- a/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/ServiceManager.kt +++ b/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/ServiceManager.kt @@ -39,7 +39,7 @@ actual open class ServiceManager<out T> actual constructor(val service: T) { val LOG: Logger = LoggerFactory.getLogger(ServiceManager::class.java.name) } - protected val routes: MutableList<JoobyServer.() -> Unit> = mutableListOf() + protected val routes: MutableList<KVServer.() -> Unit> = mutableListOf() val mapper = jacksonObjectMapper() var counter: Int = 0 @@ -299,7 +299,7 @@ actual open class ServiceManager<out T> actual constructor(val service: T) { method: RpcHttpMethod, path: String, handler: (Request, Response) -> Unit - ): JoobyServer.() -> Unit { + ): KVServer.() -> Unit { return { when (method) { RpcHttpMethod.POST -> post(path, handler) @@ -322,9 +322,9 @@ actual open class ServiceManager<out T> actual constructor(val service: T) { /** * Applies all defined routes to the given server. - * @param k a Jooby server + * @param k a server */ - actual fun applyRoutes(k: JoobyServer) { + actual fun applyRoutes(k: KVServer) { routes.forEach { it.invoke(k) } |