Package com.linecorp.armeria.common
Interface ContextAwareRunnable
- All Superinterfaces:
ContextHolder
,Runnable
A delegating
Runnable
that makes sure an underlying Runnable is
executed within the RequestContext
.-
Method Summary
Modifier and TypeMethodDescriptioncontext()
Returns theRequestContext
that was specified when creating thisContextAwareRunnable
.static ContextAwareRunnable
of
(RequestContext context, Runnable runnable) Returns a newContextAwareRunnable
that sets the specifiedRequestContext
before executing an underlyingRunnable
.Returns theRunnable
that's executed without setting theRequestContext
.
-
Method Details
-
of
Returns a newContextAwareRunnable
that sets the specifiedRequestContext
before executing an underlyingRunnable
. -
context
RequestContext context()Returns theRequestContext
that was specified when creating thisContextAwareRunnable
.- Specified by:
context
in interfaceContextHolder
-
withoutContext
Runnable withoutContext()Returns theRunnable
that's executed without setting theRequestContext
.
-