Class RequestManager

  • All Implemented Interfaces:
    jakarta.servlet.Filter

    public class RequestManager
    extends Object
    implements jakarta.servlet.Filter
    A Filter that executes a ApplicationPipeline of RequestHandlers before and a client request is delivered to a given servlet and before the response produced by the servlet is returned to the client.
    Author:
    Fabio Simeoni
    • Constructor Detail

      • RequestManager

        public RequestManager​(ApplicationContext context,
                              String servletName,
                              List<RequestHandler> handlers)
        Creates an instance with the name of the target servlet and a pipeline.
        Parameters:
        servlet - the name of the servlet
        pipeline - the pipeline
    • Method Detail

      • doFilter

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

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

        public void destroy()
        Specified by:
        destroy in interface jakarta.servlet.Filter