Class CoroutineContexts

java.lang.Object
com.linecorp.armeria.common.kotlin.CoroutineContexts

public final class CoroutineContexts extends Object
Configures a coroutine context for annotated services and Kotlin suspending functions.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    static @Nullable kotlin.coroutines.CoroutineContext
    get(com.linecorp.armeria.common.RequestContext ctx)
    Returns the coroutine context mapped to COROUTINE_CONTEXT_KEY in the context.
    static void
    set(com.linecorp.armeria.common.RequestContext ctx, kotlin.coroutines.CoroutineContext coroutineContext)
    Associates the given coroutine context with COROUTINE_CONTEXT_KEY attribute in the context.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • set

      public static void set(com.linecorp.armeria.common.RequestContext ctx, kotlin.coroutines.CoroutineContext coroutineContext)
      Associates the given coroutine context with COROUTINE_CONTEXT_KEY attribute in the context.
    • get

      @Nullable public static @Nullable kotlin.coroutines.CoroutineContext get(com.linecorp.armeria.common.RequestContext ctx)
      Returns the coroutine context mapped to COROUTINE_CONTEXT_KEY in the context.