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:
CoroutineContextService
  • Method Summary

    Modifier and Type Method Description
    static kotlin.coroutines.CoroutineContext get​(RequestContext ctx)
    Returns the coroutine context mapped to COROUTINE_CONTEXT_KEY in the context.
    static void set​(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​(RequestContext ctx, kotlin.coroutines.CoroutineContext coroutineContext)
      Associates the given coroutine context with COROUTINE_CONTEXT_KEY attribute in the context.
    • get

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