CoroutineContextServerInterceptor

abstract class CoroutineContextServerInterceptor : ServerInterceptor

A ServerInterceptor subtype that can install elements in the CoroutineContext where server logic is executed. These elements are applied "after" the AbstractCoroutineServerImpl.context; that is, the interceptor overrides the server's context.

Constructors

Link copied to clipboard
fun CoroutineContextServerInterceptor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun coroutineContext(call: ServerCall<*, *>, headers: Metadata): CoroutineContext

Override this function to return a CoroutineContext in which to execute call and headers. The returned CoroutineContext will override any corresponding context elements in the server object.

Link copied to clipboard
override fun <ReqT, RespT> interceptCall(    call: ServerCall<ReqT, RespT>,     headers: Metadata,     next: ServerCallHandler<ReqT, RespT>): ServerCall.Listener<ReqT>

Sources

Link copied to clipboard