Class CoroutineHelper
java.lang.Object
io.micronaut.http.server.CoroutineHelper
@Internal
@Singleton
@Requires(classes=kotlin.coroutines.CoroutineContext.class)
public final class CoroutineHelper
extends Object
Coroutines helper.
- Since:
- 3.2
- Author:
- Denis Stepanov
-
Method Summary
Modifier and TypeMethodDescriptionvoidsetupCoroutineContext(HttpRequest<?> httpRequest, reactor.util.context.ContextView contextView, PropagatedContext propagatedContext) voidsetupCoroutineContext(HttpRequest<?> httpRequest, reactor.util.context.ContextView contextView, PropagatedContext propagatedContext, @Nullable ExecutorService executorService) Sets up the coroutine context for a suspended route, dispatching it onto the given executor.
-
Method Details
-
setupCoroutineContext
public void setupCoroutineContext(HttpRequest<?> httpRequest, reactor.util.context.ContextView contextView, PropagatedContext propagatedContext) -
setupCoroutineContext
public void setupCoroutineContext(HttpRequest<?> httpRequest, reactor.util.context.ContextView contextView, PropagatedContext propagatedContext, @Nullable @Nullable ExecutorService executorService) Sets up the coroutine context for a suspended route, dispatching it onto the given executor.- Parameters:
httpRequest- The requestcontextView- The reactor contextpropagatedContext- The propagated contextexecutorService- The executor the route runs on, ornullto useDispatchers.Default
-