Class LocalVariables

java.lang.Object
fr.paris.lutece.portal.web.LocalVariables

public final class LocalVariables extends Object
Tools class to transmit config, request and response servlet parameters using ThreadLocal.
  • Method Summary

    Modifier and Type
    Method
    Description
    static jakarta.servlet.ServletConfig
    Read ServletConfig associate to the current thread
    static Locale
    Read Locale associate to the current thread
    static jakarta.servlet.http.HttpServletRequest
    Read HttpServletRequest associate to the current thread
    static jakarta.servlet.http.HttpServletResponse
    Read HttpServletResponse associate to the current thread
    static void
    Removes the current thread's value for this thread-local
    static void
    setLocal(jakarta.servlet.ServletConfig config, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
    Initialize thread locals variables

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • setLocal

      public static void setLocal(jakarta.servlet.ServletConfig config, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Initialize thread locals variables
      Parameters:
      config - Current ServletConfig to associate to the thread
      request - Current HttpServletRequest to associate to the thread
      response - Current HttpServletResponse to associate to the thread
    • getConfig

      public static jakarta.servlet.ServletConfig getConfig()
      Read ServletConfig associate to the current thread
      Returns:
      the ServletConfig associate to the current thread
    • getRequest

      public static jakarta.servlet.http.HttpServletRequest getRequest()
      Read HttpServletRequest associate to the current thread
      Returns:
      the HttpServletRequest associate to the current thread
    • getResponse

      public static jakarta.servlet.http.HttpServletResponse getResponse()
      Read HttpServletResponse associate to the current thread
      Returns:
      the HttpServletResponse associate to the current thread
    • getLocale

      public static Locale getLocale()
      Read Locale associate to the current thread
      Returns:
      the Locale associate to the current thread
    • remove

      public static void remove()
      Removes the current thread's value for this thread-local