All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.caesarealabs.rpc4k.runtime.api.GeneratedInterfaces.kt Maven / Gradle / Ivy

There is a newer version: 0.13.0
Show newest version
package com.caesarealabs.rpc4k.runtime.api

/**
 * All generated server classes implement this interface, to make usage easier.
 * Some api methods use this interface, but you can also use it yourself
 */
public interface RpcRouter {
    public suspend fun routeRequest(request: ByteArray, method: String, setup: HandlerConfig): ByteArray?
//    public suspend fun handleEvent(dispatcherData: List<*>,
//                                   subscriptionData: ByteArray,
//                                   event: String,
//                                   setup: HandlerConfig): ByteArray?
//    public fun createInvoker(setup: RpcSetupOf): Invoker
}



/**
 * All generated client classes have a Factory that implement this interface, and that factory of course creates the [Api]
 * with the given format, and RpcClient.
 * Some api methods accept this factory since it's much easier to just pass a factory rather than the [Api] instance itself
 * since actually creating a [Api] can be hard.
 */
public interface GeneratedClientImplFactory {
    public fun build(client: RpcClient, format: SerializationFormat): Client
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy