Class SessionExpirationFilter

  • All Implemented Interfaces:
    javax.servlet.Filter

    public class SessionExpirationFilter
    extends Object
    implements javax.servlet.Filter
    Servlet filter that handles session expiration. There are requests such as alert ping that should not be taken into account as active request to prevent session expiration, that's why we cannot rely on Tomcat's default mechanism. This filter takes them into account to reset expiration time accordingly.
    • Constructor Detail

      • SessionExpirationFilter

        public SessionExpirationFilter()
    • Method Detail

      • init

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

        public void doFilter​(javax.servlet.ServletRequest req,
                             javax.servlet.ServletResponse resp,
                             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