Class ServletRequestContextManager

    • Constructor Detail

      • ServletRequestContextManager

        public ServletRequestContextManager()
    • Method Detail

      • currentServletRequest

        public static ServletRequest currentServletRequest()
        Static utility method to obtain the current ServletRequest (if available).
        Returns:
        The current ServletRequest if available, or null otherwise.
      • initializeNewContext

        public Context<ServletRequest> initializeNewContext​(ServletRequest value)
        Description copied from interface: ContextManager
        Initialize a new context containing the specified value.

        Whether the value is allowed to be null is up to the implementation.

        Specified by:
        initializeNewContext in interface ContextManager<ServletRequest>
        Parameters:
        value - The value to initialize a new context for.
        Returns:
        The new active context containing the specified value which should be closed by the caller at the end of its lifecycle.
      • clear

        public static void clear()
        Unconditionally removes the active context (and any parents).

        This is useful for boundary filters, whose Threads may be returned to some threadpool.