ContextAccessor to enable reading values from a Netty Channel and
writing values to a Netty Channel.Note
This public class implements the io.micrometer:context-propagation 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(Channel
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(Channel
the context to read from; the context type should be
sourceContext, 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 readValues)Implements io. Map.
|
| public Class | writeableType()
Implements io. Class representing the type of context this accessor can restore values to.
|
| public Channel | writeValues(Map<Object, Object>
the values to write to the target context. valuesToWrite, Channel the context to write to; the context type should be
targetContext)assignable from the type returned by
writeableType().Implements io. Map to a target context.
|
| ChannelContextAccessor | back to summary |
|---|---|
| public ChannelContextAccessor() | |
| readableType | back to summary |
|---|---|
| public Class Implements io. Doc from io.
| |
| readValue | back to summary |
|---|---|
| public <T> T readValue(Channel sourceContext, Object key) Implements io. Doc from io. Read a single value from the source context.
| |
| readValues | back to summary |
|---|---|
| public void readValues(Channel sourceContext, Predicate<Object> keyPredicate, Map<Object, Object> readValues) 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 Channel writeValues(Map<Object, Object> valuesToWrite, Channel targetContext) Implements io. Doc from io. Write values from a
| |