Apache Tomcat 6.0.53

## org.apache.catalina.valves
Class PersistentValve

    java.lang.Object
      org.apache.catalina.valves.ValveBase
          org.apache.catalina.valves.PersistentValve

All Implemented Interfaces:
  javax.management.MBeanRegistration, Contained, Valve

    public class PersistentValve

extends ValveBase

Valve that implements per-request session persistence. It is intended to be used with non-sticky load-balancers.

USAGE CONSTRAINT: To work correctly it requires a PersistentManager.

USAGE CONSTRAINT: To work correctly it assumes only one request exists per session at any one time.

Author:
  Jean-Frederic Clere

Field Summary

Fields inherited from class org.apache.catalina.valves.ValveBase
`container, containerLog, controller, domain, mserver, next, oname`

Constructor Summary
`PersistentValve()`

Method Summary
`java.lang.String` | `getInfo()` Return descriptive information about this Valve implementation.
`void` | `invoke(Request request, Response response)` Select the appropriate child Context to process this request, based on the specified request URI.
`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.
`void` | `setContainer(Container container)` Set the Container with which this Valve is associated, if any.

Methods inherited from class org.apache.catalina.valves.ValveBase
`backgroundProcess, createObjectName, event, getContainer, getContainerName, getController, getDomain, getNext, getObjectName, getParentName, postDeregister, postRegister, preDeregister, preRegister, setController, setNext, setObjectName, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### PersistentValve

    public PersistentValve()

Method Detail

### getInfo

    public java.lang.String getInfo()

  Return descriptive information about this Valve implementation.

  Specified by:
    `getInfo` in interface `Valve`
  Overrides:
    `getInfo` in class `ValveBase`

### setContainer

    public void setContainer(Container container)

  Description copied from class: `ValveBase`
  Set the Container with which this Valve is associated, if any.

  Specified by:
    `setContainer` in interface `Contained`
  Overrides:
    `setContainer` in class `ValveBase`
  Parameters:
    `container` - The new associated container

### invoke

    public void invoke(Request request,
                       Response response)
                throws java.io.IOException,
                       javax.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 `Valve`
  Specified by:
    `invoke` in class `ValveBase`
  Parameters:
    `request` - Request to be processed
    `response` - Response to be produced
  Throws:
    `java.io.IOException` - if an input/output error occurred
    `javax.servlet.ServletException` - if a servlet error occurred

### 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.

Apache Tomcat 6.0.53

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.