Class QuickReloadFilter

  • All Implemented Interfaces:
    javax.servlet.Filter

    public class QuickReloadFilter
    extends Object
    implements javax.servlet.Filter
    Filter to quickly return empty data by looking into a cached last contents' (pages') last updated timestamp built by listening to page update event and comment events

    There is no login or permission check to make it as fast as possible (no binding to DB conn or querying) so it will leak content ids and their last update timestamp, as they are not sensitive data so it is not a security issue. However the class should be kept as is without adding any extra information to the returned JSON string like page titles.

    • Method Detail

      • init

        public void init​(javax.servlet.FilterConfig filterConfig)
                  throws javax.servlet.ServletException
        Specified by:
        init in interface javax.servlet.Filter
        Throws:
        javax.servlet.ServletException
      • doFilter

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

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