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 voidclear()Same asMDC.clear().static voidPuts 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 isnullorkey.name.static SafeCloseableputCloseable(String key, io.vertx.core.eventbus.Message<?> message)Puts a message object to the MDC store and returns aSafeCloseablealmost likeMDC.putCloseable(String, String).
Seeput(String, Message)for the elements which are put to the store.static voidRemoves 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 aSafeCloseablealmost likeMDC.putCloseable(String, String).
Seeput(String, Message)for the elements which are put to the store.- Parameters:
key- to identify theMessagein the storemessage-Messageto store- Returns:
- A
SafeCloseablewhich 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 isnullorkey.name.- Parameters:
key- to identify theMessagein the storemessage-Messageto 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 theMessageto remove
-