sendMessage

fun <TRequest : GeneratedMessage.Builder<TRequest>, TResult : GeneratedMessage.Builder<TResult>> sendMessage(responseClass: Class<out TResult>, name: String, message: GeneratedMessage): AsyncJobSingle<ServiceMethodResponse<TResult>>

Sends a message. Results are returned in a ServiceMethodResponse with type TResult. The returned AsyncJobSingle can also be awaited to retrieve the callback result.

Return

The JobID of the request. This can be used to find the appropriate ServiceMethodResponse.

Parameters

TRequest

The type of protobuf object.

TResult

The type of the result of the request.

name

Name of the RPC endpoint. Takes the format ServiceName.RpcName.

message

The message to send.