IRdCall

interface IRdCall<in TReq, out TRes>

Represents an API provided by the remote process which can be invoked through the protocol.

Functions

Link copied to clipboard
abstract fun start(request: TReq, responseScheduler: IScheduler? = null): IRdTask<TRes>
abstract fun start(    lifetime: Lifetime,     request: TReq,     responseScheduler: IScheduler? = null): 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

abstract suspend fun startSuspending(    lifetime: Lifetime,     request: TReq,     responseScheduler: IScheduler? = null): TRes

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

Link copied to clipboard
abstract fun sync(request: TReq, timeouts: RpcTimeouts? = null): TRes

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

Inheritors

Link copied to clipboard

Extensions

Link copied to clipboard
fun <TReq, TRes> IRdCall<TReq, TRes>.startAndAdviseSuccess(request: TReq, onSuccess: (TRes) -> Unit)
fun <TReq, TRes> IRdCall<TReq, TRes>.startAndAdviseSuccess(    lifetime: Lifetime,     request: TReq,     onSuccess: (TRes) -> Unit)