Class ThreadContextDataProvider

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.String> supplyContextData()
      Returns a Map containing context data to be injected into the event or null if no context data is to be added.
      StringMap supplyStringMap()
      Returns the context data as a StringMap.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ThreadContextDataProvider

        public ThreadContextDataProvider()
    • Method Detail

      • supplyContextData

        public java.util.Map<java.lang.String,​java.lang.String> supplyContextData()
        Description copied from interface: ContextDataProvider
        Returns a Map containing context data to be injected into the event or null if no context data is to be added.

        Thread-safety note: The returned object can safely be passed off to another thread: future changes in the underlying context data will not be reflected in the returned object.

        Specified by:
        supplyContextData in interface ContextDataProvider
        Returns:
        A Map containing the context data or null.
      • supplyStringMap

        public StringMap supplyStringMap()
        Description copied from interface: ContextDataProvider
        Returns the context data as a StringMap.

        Thread-safety note: The returned object can safely be passed off to another thread: future changes in the underlying context data will not be reflected in the returned object.

        Specified by:
        supplyStringMap in interface ContextDataProvider
        Returns:
        the context data in a StringMap.