Class PersistentValve

  • All Implemented Interfaces:
    Contained, Lifecycle, Valve, GlassFishValve

    public class PersistentValve
    extends ValveBase
    Valve that implements the default basic behavior for the StandardHost container implementation.

    USAGE CONSTRAINT: To work correctly it requires a PersistentManager.

    Version:
    $Revision: 1.2 $ $Date: 2005/12/08 01:28:24 $
    Author:
    Jean-Frederic Clere
    • Constructor Detail

      • PersistentValve

        public PersistentValve()
    • Method Detail

      • invoke

        public int invoke​(Request request,
                          Response response)
                   throws IOException,
                          jakarta.servlet.ServletException
        Select the appropriate child Context to process this request, based on the specified request URI. If no matching Context can be found, return an appropriate HTTP error.
        Specified by:
        invoke in interface GlassFishValve
        Specified by:
        invoke in class ValveBase
        Parameters:
        request - Request to be processed
        response - Response to be produced
        Returns:
        INVOKE_NEXT or END_PIPELINE
        Throws:
        IOException - if an input/output error occurred
        jakarta.servlet.ServletException - if a servlet error occurred
      • postInvoke

        public void postInvoke​(Request request,
                               Response response)
                        throws IOException,
                               jakarta.servlet.ServletException
        Description copied from class: ValveBase
        A post-request processing implementation that does nothing. Very few Valves override this behaviour as most Valve logic is used for request processing.
        Specified by:
        postInvoke in interface GlassFishValve
        Overrides:
        postInvoke in class ValveBase
        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
      • log

        protected void log​(String message)
        Log a message on the Logger associated with our Container (if any).
        Parameters:
        message - Message to be logged
      • isSessionStale

        protected boolean isSessionStale​(Session session,
                                         long timeNow)
        Indicate whether the session has been idle for longer than its expiration date as of the supplied time. FIXME: Probably belongs in the Session class.