RdCall

class RdCall<TReq, TRes>(requestSzr: ISerializer<TReq> = Polymorphic<TReq>(), responseSzr: ISerializer<TRes> = Polymorphic<TRes>()) : RdReactiveBase, IRdCall<TReq, TRes> , IRdEndpoint<TReq, TRes>

Constructors

Link copied to clipboard
fun <TReq, TRes> RdCall(    cancellationScheduler: IScheduler? = null,     handlerScheduler: IScheduler? = null,     handler: (Lifetime, TReq) -> RdTask<TRes>)
Link copied to clipboard
fun <TReq, TRes> RdCall(    cancellationScheduler: IScheduler? = null,     handlerScheduler: IScheduler? = null,     handler: (TReq) -> TRes)

Assigns a handler that executes the API synchronously.

Link copied to clipboard
fun <TReq, TRes> RdCall(requestSzr: ISerializer<TReq> = Polymorphic<TReq>(), responseSzr: ISerializer<TRes> = Polymorphic<TRes>())

Types

Link copied to clipboard
object Companion : ISerializer<RdCall<*, *>>

Functions

Link copied to clipboard
open override fun bind()

Sends child objects to the wire. This method is called after the parent sends this instance to the wire.

Link copied to clipboard
open override fun deepClone(): IRdBindable

Creates a clone of this IRdBindable not bound to any protocol

Link copied to clipboard
open fun findByRName(rName: RName): RdBindableBase?
Link copied to clipboard
inline fun <T : Any> getOrCreateExtension(name: String, noinline create: () -> T): T
fun <T : Any> getOrCreateExtension(    name: String,     clazz: KClass<T>,     create: () -> T): T
Link copied to clipboard
operator fun <T : IRdBindable?> T.getValue(thisRef: Any?, property: KProperty<*>): T
operator fun <T : List<IRdBindable?>> T.getValue(thisRef: Any?, property: KProperty<*>): T
Link copied to clipboard
open override fun identify(identities: IIdentities, id: RdId)

Assigns IDs to this node and its child nodes in the graph.

Link copied to clipboard
override fun onWireReceived(buffer: AbstractBuffer, dispatchHelper: IRdWireableDispatchHelper)

Callback that wire triggers when it receives messaged

open override fun onWireReceived(    proto: IProtocol,     buffer: AbstractBuffer,     ctx: SerializationCtx,     dispatchHelper: IRdWireableDispatchHelper)
Link copied to clipboard
override fun preBind(    lf: Lifetime,     parent: IRdDynamic,     name: String)

Inserts the node into the object graph under the given parent and assigns the specified name to it. The node will be removed from the graph when the specified lf lifetime is terminated.

Link copied to clipboard
open override fun print(printer: PrettyPrinter)
Link copied to clipboard
open override fun set(    cancellationScheduler: IScheduler?,     handlerScheduler: IScheduler?,     handler: (Lifetime, TReq) -> RdTask<TRes>)

Assigns a handler that executes the API asynchronously.

open fun set(    cancellationScheduler: IScheduler? = null,     handlerScheduler: IScheduler? = null,     handler: (TReq) -> TRes)

Assigns a handler that executes the API synchronously.

Link copied to clipboard
fun start(request: TReq): IRdTask<TRes>
fun start(lifetime: Lifetime, request: TReq): IRdTask<TRes>

open override fun start(request: TReq, responseScheduler: IScheduler?): IRdTask<TRes>
open override fun start(    lifetime: Lifetime,     request: TReq,     responseScheduler: IScheduler?): IRdTask<TRes>

Asynchronously invokes the API with the parameters given as request and waits for the result. The returned task will have its result value assigned through the given responseScheduler.

Link copied to clipboard
open suspend fun startSuspending(request: TReq, responseScheduler: IScheduler? = null): TRes

The same as startSuspending, but the lifetime is equivalent to the lifetime of the current coroutine. Asynchronously invokes the API with the parameters given as request and waits for the result suspending. If you use this method to get a bindable result, then it will be bound to the current IRdCall`s lifetime. If you want to bind the result to a different lifetime, you should use a startSuspending method with lifetime

open suspend override fun startSuspending(    lifetime: Lifetime,     request: TReq,     responseScheduler: IScheduler?): TRes

Asynchronously invokes the API with the parameters given as request and waits for the result suspending.

Link copied to clipboard
open override fun sync(request: TReq, timeouts: RpcTimeouts?): TRes

Invokes the API with the parameters given as request and waits for the result.

Link copied to clipboard
fun synchronizeWith(    lifetime: Lifetime,     otherBindable: RdBindableBase,     accepts: (Any?) -> Boolean = { true })
Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
open override var async: Boolean = false

If set to true, local changes to this object can be performed on any thread. Otherwise, local changes can be performed only on the UI thread.

Link copied to clipboard
var bindState: BindState
Link copied to clipboard
val containingExt: RdExtBase?
Link copied to clipboard
val isBound: Boolean
Link copied to clipboard
var isLocalChange: Boolean = false
Link copied to clipboard
override var location: RName
Link copied to clipboard
var master: Boolean
Link copied to clipboard
var parent: IRdDynamic? = null
Link copied to clipboard
open override val protocol: IProtocol?
Link copied to clipboard
open override var rdid: RdId
Link copied to clipboard
open override val serializationContext: SerializationCtx?