Class AbstractLoggingContextFilter

  • All Implemented Interfaces:
    javax.servlet.Filter, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.EnvironmentAware, org.springframework.core.env.EnvironmentCapable, org.springframework.web.context.ServletContextAware

    public abstract class AbstractLoggingContextFilter
    extends org.springframework.web.filter.OncePerRequestFilter
    Abstract Filter for managing logging context for each request. Responsible for populating logging context with request-related data from XS2A and clearing context afterwards.
    • Field Summary

      • Fields inherited from class org.springframework.web.filter.OncePerRequestFilter

        ALREADY_FILTERED_SUFFIX
      • Fields inherited from class org.springframework.web.filter.GenericFilterBean

        logger
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doFilterInternal​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain)  
      protected abstract String getEndpointsPrefix()
      Returns prefix used for all endpoints that should trigger this filter.
      protected boolean shouldNotFilter​(javax.servlet.http.HttpServletRequest request)  
      • Methods inherited from class org.springframework.web.filter.OncePerRequestFilter

        doFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatch
      • Methods inherited from class org.springframework.web.filter.GenericFilterBean

        addRequiredProperty, afterPropertiesSet, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
    • Constructor Detail

      • AbstractLoggingContextFilter

        public AbstractLoggingContextFilter()
    • Method Detail

      • doFilterInternal

        protected void doFilterInternal​(javax.servlet.http.HttpServletRequest request,
                                        javax.servlet.http.HttpServletResponse response,
                                        javax.servlet.FilterChain filterChain)
                                 throws javax.servlet.ServletException,
                                        IOException
        Specified by:
        doFilterInternal in class org.springframework.web.filter.OncePerRequestFilter
        Throws:
        javax.servlet.ServletException
        IOException
      • shouldNotFilter

        protected boolean shouldNotFilter​(javax.servlet.http.HttpServletRequest request)
        Overrides:
        shouldNotFilter in class org.springframework.web.filter.OncePerRequestFilter
      • getEndpointsPrefix

        protected abstract String getEndpointsPrefix()
        Returns prefix used for all endpoints that should trigger this filter.

        If requested path doesn't start with the specified prefix, this filter will be skipped.

        Returns:
        endpoints prefix