Package com.linecorp.armeria.common
Interface ContextAwareCallable<T>
- All Superinterfaces:
Callable<T>
,ContextHolder
A delegating
Callable
that makes sure an underlying Callable is
executed within the RequestContext
.-
Method Summary
Modifier and TypeMethodDescriptioncontext()
Returns theRequestContext
that was specified when creating thisContextAwareCallable
.static <T> ContextAwareCallable
<T> of
(RequestContext context, Callable<T> callable) Returns a newContextAwareCallable
that sets the specifiedRequestContext
before executing an underlyingCallable
.Returns theCallable
that's executed without setting theRequestContext
.
-
Method Details
-
of
Returns a newContextAwareCallable
that sets the specifiedRequestContext
before executing an underlyingCallable
. -
context
RequestContext context()Returns theRequestContext
that was specified when creating thisContextAwareCallable
.- Specified by:
context
in interfaceContextHolder
-
withoutContext
Returns theCallable
that's executed without setting theRequestContext
.
-