Class CoroutineContexts
java.lang.Object
com.linecorp.armeria.common.kotlin.CoroutineContexts
Configures a coroutine context for annotated services and Kotlin suspending functions.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable kotlin.coroutines.CoroutineContextget(com.linecorp.armeria.common.RequestContext ctx) Returns the coroutine context mapped toCOROUTINE_CONTEXT_KEYin the context.static voidset(com.linecorp.armeria.common.RequestContext ctx, kotlin.coroutines.CoroutineContext coroutineContext) Associates the given coroutine context withCOROUTINE_CONTEXT_KEYattribute in the context.
-
Method Details
-
set
public static void set(com.linecorp.armeria.common.RequestContext ctx, kotlin.coroutines.CoroutineContext coroutineContext) Associates the given coroutine context withCOROUTINE_CONTEXT_KEYattribute in the context. -
get
@Nullable public static @Nullable kotlin.coroutines.CoroutineContext get(com.linecorp.armeria.common.RequestContext ctx) Returns the coroutine context mapped toCOROUTINE_CONTEXT_KEYin the context.
-