kvision / pl.treksoft.kvision.remote

Package pl.treksoft.kvision.remote

A set of components for creating multiplatform automatic JSON-RPC connectivity with a backend server.

Types

CallAgent

open class CallAgent

An agent responsible for remote calls.

Credentials

data class Credentials

Username and password credentials.

JSON

object JSON

JSON utility functions

KVHandler

open class KVHandler

KVRemoteAgent

open class KVRemoteAgent<T : Any> : RemoteAgent

Client side agent for JSON-RPC remote calls.

KVRouterConfiguration

open class KVRouterConfiguration

KVServiceManager

open actual class KVServiceManager<T : Any>

Multiplatform service manager.

KVWebSocketConfig

open class KVWebSocketConfig

KVWebSocketHandler

class KVWebSocketHandler

LoginService

class LoginService

Form login dispatcher.

Object

external class Object

JavaScript Object type

RemoteAgent

interface RemoteAgent

Interface for client side agent for JSON-RPC remote calls.

SecurityMgr

abstract class SecurityMgr

Form login dispatcher.

Socket

class Socket

A websocket client implementation.

WithContext

interface WithContext

WithHttpSession

interface WithHttpSession

WithPrincipal

interface WithPrincipal

WithRequest

interface WithRequest

WithSession

interface WithSession

WithWebSession

interface WithWebSession

WithWebSocketSession

interface WithWebSocketSession

WithWsContext

interface WithWsContext

WithWsSession

interface WithWsSession

Exceptions

SecurityException

class SecurityException : Exception

A security exception.

SocketClosedException

class SocketClosedException : Throwable

Websocket closed exception class.

Type Aliases

Id

actual typealias Id = Id

Transient

actual typealias Transient = Transient

Properties

HTTP_UNAUTHORIZED

const val HTTP_UNAUTHORIZED: Int

HTTP status unauthorized (401).

injector

val <ERROR CLASS>.injector: <ERROR CLASS>

injectorKey

val injectorKey: <ERROR CLASS>

KV_INJECTOR_KEY

const val KV_INJECTOR_KEY: String

Functions

applyRoutes

fun <T : Any> <ERROR CLASS>.applyRoutes(serviceManager: KVServiceManager<T>, roles: Set<<ERROR CLASS>> = setOf()): Unit
fun <T : Any> <ERROR CLASS>.applyRoutes(serviceManager: KVServiceManager<T>): Unit

A function to generate routes based on definitions from the service manager.

getServerWebExchangeMatcher

fun getServerWebExchangeMatcher(vararg services: KVServiceManager<*>): Array<<ERROR CLASS>>

A function to gather paths for spring security matchers.

getWebSocketUrl

fun getWebSocketUrl(url: String): String

Creates a websocket URL from current window.location and given path.

kvisionInit

fun <ERROR CLASS>.kvisionInit(vararg modules: <ERROR CLASS>): Unit

Initialization function for Javalin server.

obj

fun obj(init: dynamic.() -> Unit): dynamic

Helper function for creating JavaScript objects.

serviceMatchers

fun <ERROR CLASS>.serviceMatchers(vararg services: KVServiceManager<*>): <ERROR CLASS>
fun serviceMatchers(vararg services: KVServiceManager<*>): <ERROR CLASS>

A function to gather paths for spring security matchers.