Class TomcatValveAdapter

  • All Implemented Interfaces:
    Valve

    public class TomcatValveAdapter
    extends Object
    implements Valve
    Tomcat-style wrapper valve around GlassFish-style valve. This allows Tomcat- and GlassFish-style valves to be added to a pipeline in arbitrary order.
    Author:
    jluehe
    • Constructor Detail

      • TomcatValveAdapter

        public TomcatValveAdapter​(GlassFishValve gfValve)
        Constructor.
        Parameters:
        gfValve - The GlassFish-style valve to wrap
    • Method Detail

      • getInfo

        public String getInfo()
        Description copied from interface: Valve
        Return descriptive information about this Valve implementation.
        Specified by:
        getInfo in interface Valve
      • getNext

        public Valve getNext()
        Description copied from interface: Valve
        Return the next Valve in the pipeline containing this Valve, if any.
        Specified by:
        getNext in interface Valve
      • setNext

        public void setNext​(Valve valve)
        Description copied from interface: Valve
        Set the next Valve in the pipeline containing this Valve.
        Specified by:
        setNext in interface Valve
        Parameters:
        valve - The new next valve, or null if none
      • backgroundProcess

        public void backgroundProcess()
        Description copied from interface: Valve
        Execute a periodic task, such as reloading, etc. This method will be invoked inside the classloading context of this container. Unexpected throwables will be caught and logged.
        Specified by:
        backgroundProcess in interface Valve
      • invoke

        public void invoke​(Request request,
                           Response response)
                    throws IOException,
                           jakarta.servlet.ServletException
        Delegates to the invoke() and postInvoke() methods of the wrapped GlassFish-style valve.
        Specified by:
        invoke in interface Valve
        Parameters:
        request - The servlet request to be processed
        response - The servlet response to be created
        Throws:
        IOException - if an input/output error occurs, or is thrown by a subsequently invoked Valve, Filter, or Servlet
        jakarta.servlet.ServletException - if a servlet error occurs, or is thrown by a subsequently invoked Valve, Filter, or Servlet
      • event

        public void event​(Request request,
                          Response response,
                          CometEvent event)
                   throws IOException,
                          jakarta.servlet.ServletException
        Description copied from interface: Valve
        Process a Comet event.
        Specified by:
        event in interface Valve
        Parameters:
        request - The servlet request to be processed
        response - The servlet response to be created
        Throws:
        IOException - if an input/output error occurs, or is thrown by a subsequently invoked Valve, Filter, or Servlet
        jakarta.servlet.ServletException - if a servlet error occurs, or is thrown by a subsequently invoked Valve, Filter, or Servlet