Class TransactionTypeFilter

  • 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 class TransactionTypeFilter
    extends AbstractGenericFilterBean
    A filter that assigns the transaction's name (class and method name) to the Kibana logger for each request.
    Author:
    Richard Kohlen
    • Field Summary

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

        logger
    • Constructor Summary

      Constructors 
      Constructor Description
      TransactionTypeFilter​(org.springframework.context.ApplicationContext applicationContext)
      Constructor, the application context should be provided when constructing this class.
    • Method Summary

      All Methods Instance 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)
      Same contract as for doFilter.
      • 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

      • TransactionTypeFilter

        public TransactionTypeFilter​(org.springframework.context.ApplicationContext applicationContext)
        Constructor, the application context should be provided when constructing this class. This class cannot be a bean because it inhered from AbstractGenericFilterBean.
        Parameters:
        applicationContext - the application context of the Spring Boot Application
    • 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
        Same contract as for doFilter.
        Specified by:
        doFilterInternal in class AbstractGenericFilterBean
        Throws:
        javax.servlet.ServletException
        IOException