public class ThreadContextDataInjector
extends java.lang.Object
ThreadContextDataInjector contains a number of strategies for copying key-value pairs from the various
ThreadContext map implementations into a StringMap. In the case of duplicate keys,
thread context values overwrite configuration Property values.
These are the default ContextDataInjector objects returned by the ContextDataInjectorFactory.
ThreadContext,
Property,
ReadOnlyStringMap,
ContextDataInjector,
ContextDataInjectorFactory| Modifier and Type | Class and Description |
|---|---|
static class |
ThreadContextDataInjector.ForCopyOnWriteThreadContextMap
The
ContextDataInjector used when the ThreadContextMap implementation is a copy-on-write
StringMap-based data structure. |
static class |
ThreadContextDataInjector.ForDefaultThreadContextMap
Default
ContextDataInjector for the legacy Map<String, String>-based ThreadContext (which is
also the ThreadContext implementation used for web applications). |
static class |
ThreadContextDataInjector.ForGarbageFreeThreadContextMap
The
ContextDataInjector used when the ThreadContextMap implementation is a garbage-free
StringMap-based data structure. |
| Constructor and Description |
|---|
ThreadContextDataInjector() |
| Modifier and Type | Method and Description |
|---|---|
static void |
copyProperties(java.util.List<Property> properties,
StringMap result)
Copies key-value pairs from the specified property list into the specified
StringMap. |
public static void copyProperties(java.util.List<Property> properties, StringMap result)
StringMap.properties - list of configuration properties, may be nullresult - the StringMap object to add the key-values to. Must be non-null.