Class LocalVariables


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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static javax.servlet.ServletConfig getConfig()
      Read ServletConfig associate to the current thread
      static javax.servlet.http.HttpServletRequest getRequest()
      Read HttpServletRequest associate to the current thread
      static javax.servlet.http.HttpServletResponse getResponse()
      Read HttpServletResponse associate to the current thread
      static void setLocal​(javax.servlet.ServletConfig config, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Initialize thread locals variables
    • Method Detail

      • setLocal

        public static void setLocal​(javax.servlet.ServletConfig config,
                                    javax.servlet.http.HttpServletRequest request,
                                    javax.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 javax.servlet.ServletConfig getConfig()
        Read ServletConfig associate to the current thread
        Returns:
        the ServletConfig associate to the current thread
      • getRequest

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

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