Class NOPLoggingContextHandler

    • Method Summary

      All Methods Instance Methods Concrete 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.
      • Methods inherited from class java.lang.Object

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

      • NOPLoggingContextHandler

        public NOPLoggingContextHandler()
    • Method Detail

      • put

        public void put​(java.lang.String key,
                        java.lang.String val)
        Description copied from interface: LoggingContextHandler
        Put a value into the current context map.
        Specified by:
        put in interface LoggingContextHandler
        Parameters:
        key - - The key to put
        val - - The value to put associated with key
      • putCloseable

        public java.io.Closeable putCloseable​(java.lang.String key,
                                              java.lang.String val)
        Description copied from interface: LoggingContextHandler
        Put a value into the current context map. This method return a Closeable object who can remove key when close is called.
        Specified by:
        putCloseable in interface LoggingContextHandler
        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

        public java.lang.String get​(java.lang.String key)
        Description copied from interface: LoggingContextHandler
        Gets the context value identified by the key parameter
        Specified by:
        get in interface LoggingContextHandler
        Parameters:
        key - - The key to locate
        Returns:
        The value associated with the key
      • remove

        public void remove​(java.lang.String key)
        Description copied from interface: LoggingContextHandler
        Removes the context value identified by key parameter
        Specified by:
        remove in interface LoggingContextHandler
        Parameters:
        key - - The key to remove
      • setContextMap

        public void setContextMap​(java.util.Map<java.lang.String,​java.lang.String> contextMap)
        Description copied from interface: LoggingContextHandler
        Sets current context map to the map passed as parameter.
        Specified by:
        setContextMap in interface LoggingContextHandler
        Parameters:
        contextMap - the context map to use.