Class NuxeoRequestControllerFilter

  • All Implemented Interfaces:
    javax.servlet.Filter

    public class NuxeoRequestControllerFilter
    extends Object
    implements javax.servlet.Filter
    Filter to handle transactions, response buffering, and request synchronization.
    Author:
    tiry
    • Constructor Detail

      • NuxeoRequestControllerFilter

        public NuxeoRequestControllerFilter()
    • Method Detail

      • init

        public void init​(javax.servlet.FilterConfig filterConfig)
        Specified by:
        init in interface javax.servlet.Filter
      • destroy

        public void destroy()
        Specified by:
        destroy in interface javax.servlet.Filter
      • doFormatLogMessage

        public static String doFormatLogMessage​(javax.servlet.http.HttpServletRequest request,
                                                String info)
      • doFilter

        public void doFilter​(javax.servlet.ServletRequest servletRequest,
                             javax.servlet.ServletResponse servletResponse,
                             javax.servlet.FilterChain chain)
                      throws IOException,
                             javax.servlet.ServletException
        Specified by:
        doFilter in interface javax.servlet.Filter
        Throws:
        IOException
        javax.servlet.ServletException
      • simpleSyncOnSession

        public static boolean simpleSyncOnSession​(javax.servlet.http.HttpServletRequest request)
        Synchronizes the HttpSession.

        Uses a Lock object in the HttpSession and locks it. If HttpSession is not created, exits without locking anything.

      • simpleReleaseSyncOnSession

        public static boolean simpleReleaseSyncOnSession​(javax.servlet.http.HttpServletRequest request)
        Releases the Lock if present in the HttpSession.
      • addHeaders

        protected void addHeaders​(javax.servlet.http.HttpServletRequest request,
                                  javax.servlet.http.HttpServletResponse response,
                                  RequestFilterConfig config)
      • addConfiguredHeaders

        protected void addConfiguredHeaders​(javax.servlet.http.HttpServletResponse response)
      • addCacheHeaders

        protected void addCacheHeaders​(javax.servlet.http.HttpServletResponse response,
                                       RequestFilterConfig config)