@@ -13,20 +13,32 @@ import kotlin.reflect.KClass
1313 */
1414public interface RpcServer {
1515 /* *
16- * Registers new service to the server . Server will route all designated messages to it.
16+ * Registers new service. Server will route all designated messages to it.
1717 * Service of any type should be unique on the server, but RpcServer doesn't specify the actual retention policy.
1818 *
1919 * @param Service the exact type of the server to be registered.
20- * For example, for service with `MyService` interface and `MyServiceImpl` implementation,
21- * type `MyService` should be specified explicitly.
20+ * For example, for a service with `MyService` interface and `MyServiceImpl` implementation
21+ * the type `MyService` should be specified explicitly.
2222 * @param serviceKClass [KClass] of the [Service].
2323 * @param serviceFactory function that produces the actual implementation of the service that will handle the calls.
24+ *
25+ * @see kotlinx.rpc.annotations.CheckedTypeAnnotation
2426 */
2527 public fun <@Rpc Service : Any > registerService (
2628 serviceKClass : KClass <Service >,
2729 serviceFactory : () -> Service ,
2830 )
2931
32+ /* *
33+ * Deregisters a service. Server will stop routing messages to it.
34+ *
35+ * @param Service the exact type of the server to be deregistered, the same one that was used for registration.
36+ * For example, for a service with `MyService` interface and `MyServiceImpl` implementation
37+ * the type `MyService` should be specified explicitly.
38+ * @param serviceKClass [KClass] of the [Service].
39+ *
40+ * @see kotlinx.rpc.annotations.CheckedTypeAnnotation
41+ */
3042 public fun <@Rpc Service : Any > deregisterService (
3143 serviceKClass : KClass <Service >,
3244 )
@@ -37,9 +49,11 @@ public interface RpcServer {
3749 * Service of any type should be unique on the server, but RpcServer doesn't specify the actual retention policy.
3850 *
3951 * @param Service the exact type of the server to be registered.
40- * For example, for service with `MyService` interface and `MyServiceImpl` implementation,
41- * type `MyService` should be specified explicitly.
52+ * For example, for a service with `MyService` interface and `MyServiceImpl` implementation
53+ * the type `MyService` should be specified explicitly.
4254 * @param serviceFactory function that produces the actual implementation of the service that will handle the calls.
55+ *
56+ * @see kotlinx.rpc.annotations.CheckedTypeAnnotation
4357 */
4458public inline fun <@Rpc reified Service : Any > RpcServer.registerService (
4559 noinline serviceFactory : () -> Service ,
0 commit comments