Class MessageMDC
java.lang.Object
de.wuespace.telestion.services.logging.MessageMDC
A MDC implementation for the
Message
object.- See Also:
MDC
,Message
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
clear()
Same asMDC.clear()
.static void
Puts a message object to the MDC store likeMDC.put(String, String)
.
Following objects are stored:
address replyAddress headers send body
The key is either the name of the objects, if the key isnull
orkey.name
.static SafeCloseable
putCloseable(String key, io.vertx.core.eventbus.Message<?> message)
Puts a message object to the MDC store and returns aSafeCloseable
almost likeMDC.putCloseable(String, String)
.
Seeput(String, Message)
for the elements which are put to the store.static void
Removes the message object with the given key from the MDC store (likeMDC.remove(String)
).
-
Constructor Details
-
MessageMDC
public MessageMDC()
-
-
Method Details
-
putCloseable
Puts a message object to the MDC store and returns aSafeCloseable
almost likeMDC.putCloseable(String, String)
.
Seeput(String, Message)
for the elements which are put to the store.- Parameters:
key
- to identify theMessage
in the storemessage
-Message
to store- Returns:
- A
SafeCloseable
which can remove the key ifclose()
is called
-
put
Puts a message object to the MDC store likeMDC.put(String, String)
.
Following objects are stored:
- address
- replyAddress
- headers
- send
- body
The key is either the name of the objects, if the key isnull
orkey.name
.- Parameters:
key
- to identify theMessage
in the storemessage
-Message
to store
-
clear
public static void clear()Same asMDC.clear()
. -
remove
Removes the message object with the given key from the MDC store (likeMDC.remove(String)
).- Parameters:
key
- identifies theMessage
to remove
-