KVRemoteAgent

open class KVRemoteAgent<T : Any>(serviceManager: KVServiceMgr<T>, beforeSend: (JQueryXHR, JQueryAjaxSettings) -> Boolean?) : RemoteAgent

Client side agent for JSON-RPC remote calls.

Constructors

KVRemoteAgent
Link copied to clipboard
js
fun <T : Any> KVRemoteAgent(serviceManager: KVServiceMgr<T>, beforeSend: (JQueryXHR, JQueryAjaxSettings) -> Boolean? = null)

Functions

call
Link copied to clipboard
js
inline suspend fun <RET : Any, T> call(noinline function: suspend T.() -> RET): RET
Executes defined call to a remote web service.
inline suspend fun <RET : Any, T> call(noinline function: suspend T.() -> List<RET>): List<RET>
Executes defined call to a remote web service.
inline suspend fun <PAR, RET : Any, T> call(noinline function: suspend T.(PAR) -> RET, p: PAR): RET
Executes defined call to a remote web service.
inline suspend fun <PAR, RET : Any, T> call(noinline function: suspend T.(PAR) -> List<RET>, p: PAR): List<RET>
Executes defined call to a remote web service.
inline suspend fun <PAR1, PAR2, RET : Any, T> call(noinline function: suspend T.(PAR1, PAR2) -> RET, p1: PAR1, p2: PAR2): RET
Executes defined call to a remote web service.
inline suspend fun <PAR1, PAR2, RET : Any, T> call(noinline function: suspend T.(PAR1, PAR2) -> List<RET>, p1: PAR1, p2: PAR2): List<RET>
Executes defined call to a remote web service.
inline suspend fun <PAR1, PAR2, PAR3, RET : Any, T> call(noinline function: suspend T.(PAR1, PAR2, PAR3) -> RET, p1: PAR1, p2: PAR2, p3: PAR3): RET
Executes defined call to a remote web service.
inline suspend fun <PAR1, PAR2, PAR3, RET : Any, T> call(noinline function: suspend T.(PAR1, PAR2, PAR3) -> List<RET>, p1: PAR1, p2: PAR2, p3: PAR3): List<RET>
Executes defined call to a remote web service.
inline suspend fun <PAR1, PAR2, PAR3, PAR4, RET : Any, T> call(noinline function: suspend T.(PAR1, PAR2, PAR3, PAR4) -> RET, p1: PAR1, p2: PAR2, p3: PAR3, p4: PAR4): RET
Executes defined call to a remote web service.
inline suspend fun <PAR1, PAR2, PAR3, PAR4, RET : Any, T> call(noinline function: suspend T.(PAR1, PAR2, PAR3, PAR4) -> List<RET>, p1: PAR1, p2: PAR2, p3: PAR3, p4: PAR4): List<RET>
Executes defined call to a remote web service.
inline suspend fun <PAR1, PAR2, PAR3, PAR4, PAR5, RET : Any, T> call(noinline function: suspend T.(PAR1, PAR2, PAR3, PAR4, PAR5) -> RET, p1: PAR1, p2: PAR2, p3: PAR3, p4: PAR4, p5: PAR5): RET
Executes defined call to a remote web service.
inline suspend fun <PAR1, PAR2, PAR3, PAR4, PAR5, RET : Any, T> call(noinline function: suspend T.(PAR1, PAR2, PAR3, PAR4, PAR5) -> List<RET>, p1: PAR1, p2: PAR2, p3: PAR3, p4: PAR4, p5: PAR5): List<RET>
Executes defined call to a remote web service.
inline suspend fun <PAR1, PAR2, PAR3, PAR4, PAR5, PAR6, RET : Any, T> call(noinline function: suspend T.(PAR1, PAR2, PAR3, PAR4, PAR5, PAR6) -> RET, p1: PAR1, p2: PAR2, p3: PAR3, p4: PAR4, p5: PAR5, p6: PAR6): RET
Executes defined call to a remote web service.
inline suspend fun <PAR1, PAR2, PAR3, PAR4, PAR5, PAR6, RET : Any, T> call(noinline function: suspend T.(PAR1, PAR2, PAR3, PAR4, PAR5, PAR6) -> List<RET>, p1: PAR1, p2: PAR2, p3: PAR3, p4: PAR4, p5: PAR5, p6: PAR6): List<RET>
Executes defined call to a remote web service.
deserialize
Link copied to clipboard
js
fun <RET> deserialize(value: String, jsType: String): RET
deserializeList
Link copied to clipboard
js
fun <RET> deserializeList(value: String, jsType: String): List<RET>
equals
Link copied to clipboard
js
open operator fun equals(other: Any?): Boolean
exceptionHelper
Link copied to clipboard
js
suspend fun exceptionHelper(block: suspend () -> Unit)
findEnumValue
Link copied to clipboard
js
fun findEnumValue(kClass: KClass<Any>, value: String): Any?
hashCode
Link copied to clipboard
js
open fun hashCode(): Int
receiveOrNull
Link copied to clipboard
js
suspend fun Socket.receiveOrNull(): String?
sendOrFalse
Link copied to clipboard
js
fun Socket.sendOrFalse(str: String): Boolean
serialize
Link copied to clipboard
js
inline fun <PAR> serialize(value: PAR): String?
serializeNotNull
Link copied to clipboard
js
inline fun <PAR : Any> serializeNotNull(value: PAR): String
toString
Link copied to clipboard
js
open fun toString(): String
tryDeserializeEnum
Link copied to clipboard
js
fun tryDeserializeEnum(kClass: KClass<Any>, value: String): Any
tryDeserializeEnumList
Link copied to clipboard
js
fun tryDeserializeEnumList(kClass: KClass<Any>, value: String): List<Any>
webSocket
Link copied to clipboard
js
inline suspend fun <PAR1 : Any, PAR2 : Any> webSocket(noinline function: suspend T.(ReceiveChannel<PAR1>, SendChannel<PAR2>) -> Unit, noinline handler: suspend (SendChannel<PAR1>, ReceiveChannel<PAR2>) -> Unit)
Executes defined web socket connection
inline suspend fun <PAR1 : Any, PAR2 : Any> webSocket(noinline function: suspend T.(ReceiveChannel<PAR1>, SendChannel<List<PAR2>>) -> Unit, noinline handler: suspend (SendChannel<PAR1>, ReceiveChannel<List<PAR2>>) -> Unit)
Executes defined web socket connection returning list objects

Properties

beforeSend
Link copied to clipboard
js
val beforeSend: (JQueryXHR, JQueryAjaxSettings) -> Boolean? = null
callAgent
Link copied to clipboard
js
val callAgent: CallAgent
serviceManager
Link copied to clipboard
js
val serviceManager: KVServiceMgr<T>