public class PaxContext extends Object
NDC class except that it is
based on a map instead of a stack. It provides mapped
diagnostic contexts. A Mapped Diagnostic Context, or
MDC in short, is an instrument for distinguishing interleaved log
output from different sources. Log output is typically interleaved
when a server handles multiple clients near-simultaneously.
The MDC is managed on a per thread basis. A child thread automatically inherits a copy of the mapped diagnostic context of its parent.
The MDC class requires JDK 1.2 or above. Under JDK 1.1 the MDC will always return empty values but otherwise will not affect or harm your application.
| Constructor and Description |
|---|
PaxContext() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
Object |
get(String key) |
Map<String,Object> |
getContext() |
Map<String,Object> |
getCopyOfContextMap() |
void |
put(String key,
Object o) |
void |
putAll(Map<String,Object> context) |
void |
remove(String key) |
void |
setContextMap(Map<String,Object> contextMap) |
public void remove(String key)
public void clear()
Copyright © 2006-2015 OPS4J - Open Participation Software for Java. All Rights Reserved.