Class AdHocContextValve

  • All Implemented Interfaces:
    GlassFishValve

    public class AdHocContextValve
    extends Object
    implements GlassFishValve
    Implementation of StandardContextValve which is added as the base valve to a web module's ad-hoc pipeline. A web module's ad-hoc pipeline is invoked for any of the web module's ad-hoc paths. The AdHocContextValve is responsible for invoking the ad-hoc servlet associated with the ad-hoc path.
    Author:
    Jan Luehe
    • Constructor Detail

      • AdHocContextValve

        public AdHocContextValve​(WebModule context)
        Constructor.
    • Method Detail

      • getInfo

        public String getInfo()
        Returns descriptive information about this valve.
        Specified by:
        getInfo in interface GlassFishValve
      • invoke

        public int invoke​(Request request,
                          Response response)
                   throws IOException,
                          jakarta.servlet.ServletException
        Processes the given request by passing it to the ad-hoc servlet associated with the request path (which has been determined, by the associated web module, to be an ad-hoc path).
        Specified by:
        invoke in interface GlassFishValve
        Parameters:
        request - The request to process
        response - The response to return
        Returns:
        INVOKE_NEXT or END_PIPELINE
        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
      • postInvoke

        public void postInvoke​(Request request,
                               Response response)
                        throws IOException,
                               jakarta.servlet.ServletException
        Description copied from interface: GlassFishValve

        Perform post-request processing as required by this Valve.

        Specified by:
        postInvoke in interface GlassFishValve
        Parameters:
        request - The servlet request to be processed
        response - The servlet response to be created
        Throws:
        IOException - if an input/output error occurs
        jakarta.servlet.ServletException - if a servlet error occurs