Interface LoggingContextHandler

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void clear()
      Remove all values from the context
      java.lang.String get​(java.lang.String key)
      Gets the context value identified by the key parameter
      java.util.Map<java.lang.String,​java.lang.String> getCopyOfContextMap()
      Gets an copy of this current context map
      void put​(java.lang.String key, java.lang.String val)
      Put a value into the current context map.
      java.io.Closeable putCloseable​(java.lang.String key, java.lang.String val)
      Put a value into the current context map.
      void remove​(java.lang.String key)
      Removes the context value identified by key parameter
      void setContextMap​(java.util.Map<java.lang.String,​java.lang.String> contextMap)
      Sets current context map to the map passed as parameter.
    • Method Detail

      • put

        void put​(java.lang.String key,
                 java.lang.String val)
        Put a value into the current context map.
        Parameters:
        key - - The key to put
        val - - The value to put associated with key
      • putCloseable

        java.io.Closeable putCloseable​(java.lang.String key,
                                       java.lang.String val)
        Put a value into the current context map. This method return a Closeable object who can remove key when close is called.
        Parameters:
        key - - The key to put
        val - - The value to put associated with key
        Returns:
        a Closeable who can remove key when close is called
      • get

        java.lang.String get​(java.lang.String key)
        Gets the context value identified by the key parameter
        Parameters:
        key - - The key to locate
        Returns:
        The value associated with the key
      • remove

        void remove​(java.lang.String key)
        Removes the context value identified by key parameter
        Parameters:
        key - - The key to remove
      • clear

        void clear()
        Remove all values from the context
      • getCopyOfContextMap

        java.util.Map<java.lang.String,​java.lang.String> getCopyOfContextMap()
        Gets an copy of this current context map
        Returns:
        copy of the context.
      • setContextMap

        void setContextMap​(java.util.Map<java.lang.String,​java.lang.String> contextMap)
        Sets current context map to the map passed as parameter.
        Parameters:
        contextMap - the context map to use.