Package com.linecorp.armeria.common
Interface ContextAwareExecutor
- All Superinterfaces:
ContextHolder
,Executor
- All Known Subinterfaces:
ContextAwareBlockingTaskExecutor
,ContextAwareEventLoop
,ContextAwareExecutorService
,ContextAwareScheduledExecutorService
A delegating
Executor
that makes sure all submitted tasks are
executed within the RequestContext
.-
Method Summary
Modifier and TypeMethodDescriptioncontext()
Returns theRequestContext
that was specified when creating thisContextAwareExecutor
.static ContextAwareExecutor
of
(RequestContext context, Executor executor) Returns a newContextAwareExecutor
that sets the specifiedRequestContext
before executing any submitted tasks.Returns theExecutor
that executes the submitted tasks without setting theRequestContext
.
-
Method Details
-
of
Returns a newContextAwareExecutor
that sets the specifiedRequestContext
before executing any submitted tasks. -
context
RequestContext context()Returns theRequestContext
that was specified when creating thisContextAwareExecutor
.- Specified by:
context
in interfaceContextHolder
-
withoutContext
Executor withoutContext()Returns theExecutor
that executes the submitted tasks without setting theRequestContext
.
-