public abstract class ReactorContextManager extends Object
ExecutionInput
so it can be subsequently obtained from DataFetchingEnvironment
and
propagated to data fetchers or exception handlers.
The Reactor context is also used to carry ThreadLocal values that are also restored around the execution of data fetchers and exceptions handlers.
Constructor and Description |
---|
ReactorContextManager() |
Modifier and Type | Method and Description |
---|---|
static reactor.util.context.Context |
extractThreadLocalValues(ThreadLocalAccessor accessor,
reactor.util.context.Context context)
Use the given accessor to extract ThreadLocal values and save them in a
sub-map in the given
Context , so those can be restored later
around the execution of data fetchers and exception resolvers. |
public static reactor.util.context.Context extractThreadLocalValues(ThreadLocalAccessor accessor, reactor.util.context.Context context)
Context
, so those can be restored later
around the execution of data fetchers and exception resolvers. The accessor
instance is also saved in the Reactor Context so it can be used to
actually restore and reset ThreadLocal values.accessor
- the accessor to usecontext
- the context to write to if there are ThreadLocal valuesContextView
or the Context
instance
that was passed in, if there were no ThreadLocal values to extract.