Class RequestLifeCycleFilter

  • All Implemented Interfaces:
    javax.servlet.Filter

    public class RequestLifeCycleFilter
    extends java.lang.Object
    implements javax.servlet.Filter
    This class is a very first entry point of any requests. Responsibilities: - tags the MDC for the logger in order to trace events in debug mode
    • Field Detail

      • SESSION_KEY_BCD_SESSIONCREATED

        public static final java.lang.String SESSION_KEY_BCD_SESSIONCREATED
        See Also:
        Constant Field Values
      • MDC_KEY_BCD_REQUESTHASH

        public static final java.lang.String MDC_KEY_BCD_REQUESTHASH
        See Also:
        Constant Field Values
      • MDC_KEY_BCD_PAGEHASH

        public static final java.lang.String MDC_KEY_BCD_PAGEHASH
        See Also:
        Constant Field Values
      • MDC_KEY_IS_CLIENT_LOG

        public static final java.lang.String MDC_KEY_IS_CLIENT_LOG
        See Also:
        Constant Field Values
      • MDC_KEY_SESSION_ID

        public static final java.lang.String MDC_KEY_SESSION_ID
        See Also:
        Constant Field Values
      • LOGGER_NAME

        public static final java.lang.String LOGGER_NAME
    • Constructor Detail

      • RequestLifeCycleFilter

        public RequestLifeCycleFilter()
    • Method Detail

      • isThreadBoundToHttpRequest

        public static boolean isThreadBoundToHttpRequest()
        Returns:
        TRUE if the current thread is bound to a HTTP request managed by a RequestLifeCycleFilter
      • getLogger

        public static org.apache.logging.log4j.Logger getLogger()
        Returns:
        RequestLifeCycleLogger which allows to track any logstreams realted to the logical request.
      • destroy

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

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

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