ContextAccessor to enable reading values from a Reactor
ContextView and writing values to Context.
Please note that this public class implements the libs.micrometer.contextPropagation
SPI library, which is an optional dependency.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Class | readableType()
Implements io. Class representing the type of context this accessor is capable of reading
values from.
|
| public <T> T | readValue(ContextView
the context to read from; the context type should be
sourceContext, Object assignable from the type returned by
readableType().the key to use to look up the context value key)Implements io. |
| public void | readValues(ContextView
the context to read from; the context type should be
source, Predicate<Object> assignable from the type returned by
readableType().
When an a predicate to decide which keys to read keyPredicate, Map<Object, Object> a map where to put read values target)Implements io. Map.
|
| public Class | writeableType()
Implements io. Class representing the type of context this accessor can restore values to.
|
| public Context | writeValues(Map<Object, Object>
the values to write to the target context. source, Context the context to write to; the context type should be
target)assignable from the type returned by
writeableType().Implements io. Map to a target context.
|
| ReactorContextAccessor | back to summary |
|---|---|
| public ReactorContextAccessor() | |
| readableType | back to summary |
|---|---|
| public Class Implements io. Doc from io.
| |
| readValue | back to summary |
|---|---|
| public <T> T readValue(ContextView sourceContext, Object key) Implements io. Doc from io. Read a single value from the source context.
| |
| readValues | back to summary |
|---|---|
| public void readValues(ContextView source, Predicate<Object> keyPredicate, Map<Object, Object> target) Implements io. Doc from io. Read values from a source context into a
| |
| writeableType | back to summary |
|---|---|
| public Class Implements io. Doc from io.
| |
| writeValues | back to summary |
|---|---|
| public Context writeValues(Map<Object, Object> source, Context target) Implements io. Doc from io. Write values from a
| |