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.

HttpMethod

enum class HttpMethod

JoobyRemoteAgent

open class JoobyRemoteAgent<T : Any> : RemoteAgent

Client side agent for JSON-RPC remote calls with Jooby.

JoobyServiceManager

open expect class JoobyServiceManager<T : Any> : ServiceManager

Multiplatform service manager for Jooby.

JsonRpcRequest

data class JsonRpcRequest

JsonRpcResponse

data class JsonRpcResponse

KVController

open class KVController

KVServer

open expect class KVServer

A server.

LoginService

class LoginService

Pac4j form login dispatcher.

Profile

expect class Profile

A user profile.

RemoteAgent

interface RemoteAgent

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

Request

expect interface Request

A server request.

RpcHttpMethod

enum class RpcHttpMethod

SecurityMgr

abstract class SecurityMgr

Pac4j form login dispatcher.

ServiceManager

interface ServiceManager

SpringContext

class SpringContext

SpringRemoteAgent

open class SpringRemoteAgent<T : Any> : RemoteAgent

Client side agent for JSON-RPC remote calls with Spring Boot.

SpringServiceManager

open expect class SpringServiceManager<T : Any> : ServiceManager

Multiplatform service manager for Spring Boot.

Exceptions

SecurityException

class SecurityException : Exception

A security exception.

Type Aliases

Profile

actual typealias Profile = <ERROR CLASS>

A user profile.

Properties

HTTP_UNAUTHORIZED

const val HTTP_UNAUTHORIZED: Int

HTTP status unauthorized (401).

Functions

addPathPatternsFromServices

fun <ERROR CLASS>.addPathPatternsFromServices(services: List<SpringServiceManager<*>>): Unit

async

fun <RESP> Request?.async(block: (Request) -> RESP): Deferred<RESP>

A helper extension function for asynchronous request processing.

fun <RESP> async(block: () -> RESP): Deferred<RESP>

A helper extension function for asynchronous processing.

asyncAuth

fun <RESP> Request?.asyncAuth(block: (Request, <ERROR CLASS>, Profile) -> RESP): Deferred<RESP>

A helper extension function for asynchronous request processing with session and user profile.

fun <RESP> asyncAuth(block: (Profile) -> RESP): Deferred<RESP>

A helper extension function for asynchronous processing with user profile.

asyncSession

fun <RESP> Request?.asyncSession(block: (Request, <ERROR CLASS>) -> RESP): Deferred<RESP>

A helper extension function for asynchronous request processing with session.

writeJSON

fun <ERROR CLASS>.writeJSON(json: String): Unit