RpcServer

interface RpcServer(source)

RpcServer is used to accept RPC messages, route them to a specific service, and process given responses. Server may contain multiple services.

Functions

Link copied to clipboard
abstract fun <Service : Any> deregisterService(serviceKClass: KClass<Service>)

Deregisters a service. Server will stop routing messages to it.

Link copied to clipboard
abstract fun <Service : Any> registerService(serviceKClass: KClass<Service>, serviceFactory: () -> Service)

Registers new service. Server will route all designated messages to it. Service of any type should be unique on the server, but RpcServer doesn't specify the actual retention policy.

Link copied to clipboard
inline fun <Service : Any> RpcServer.registerService(noinline serviceFactory: () -> Service)

Registers new service to the server. Server will route all designated messages to it. Service of any type should be unique on the server, but RpcServer doesn't specify the actual retention policy.