request

abstract suspend fun <R : Any> request(message: Any, responseType: KClass<R>, timeout: Duration, targets: Collection<Target>): R

Sends a request and awaits a response within a specified timeout.

Return

the response to the request.

Parameters

R

the type of the response.

message

the request message.

responseType

the KClass representing the expected response type.

timeout

the duration to wait for a response.

targets

the collection of targets to send the request to.


abstract suspend fun <R : Any> request(message: Any, responseType: KClass<R>, timeout: Duration, vararg targets: Target): R

Sends a request and awaits a response within a specified timeout.

Return

the response to the request.

Parameters

R

the type of the response.

message

the request message.

responseType

the KClass representing the expected response type.

timeout

the duration to wait for a response.

targets

the targets to send the request to.


abstract suspend fun <R : Any> request(message: Any, responseType: KClass<R>, targets: Collection<Target>): R

Sends a request and awaits a response using the default timeout.

Return

the response to the request.

Parameters

R

the type of the response.

message

the request message.

responseType

the KClass representing the expected response type.

targets

the collection of targets to send the request to.


abstract suspend fun <R : Any> request(message: Any, responseType: KClass<R>, vararg targets: Target): R

Sends a request and awaits a response using the default timeout.

Return

the response to the request.

Parameters

R

the type of the response.

message

the request message.

responseType

the KClass representing the expected response type.

targets

the targets to send the request to.