Class BeanProxyFilter

  • All Implemented Interfaces:
    javax.servlet.Filter

    public class BeanProxyFilter
    extends Object
    implements javax.servlet.Filter
    An adapter from the servlet filter world into the Spring dependency injected world. Simply looks up a DependencyInjectedFilter with a configured bean name and delegates the doFilter(ServletRequest, ServletResponse, FilterChain) call to that. This allows us to swap in and out different implementations for different 'hook points' in web.xml.
    Author:
    dward
    • Constructor Detail

      • BeanProxyFilter

        public BeanProxyFilter()
    • Method Detail

      • init

        public void init​(javax.servlet.FilterConfig args)
                  throws javax.servlet.ServletException
        Initialize the filter.
        Specified by:
        init in interface javax.servlet.Filter
        Parameters:
        args - FilterConfig
        Throws:
        javax.servlet.ServletException - the servlet exception
        javax.servlet.ServletException
      • 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 IOException,
                             javax.servlet.ServletException
        Specified by:
        doFilter in interface javax.servlet.Filter
        Throws:
        IOException
        javax.servlet.ServletException