Apache Tomcat 6.0.39

org.apache.catalina.valves
Class PersistentValve

java.lang.Object
  extended by org.apache.catalina.valves.ValveBase
      extended by 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.

Version:
$Id: PersistentValve.java 1028554 2010-10-28 23:58:00Z kkolinko $
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.
 
Methods inherited from class org.apache.catalina.valves.ValveBase
backgroundProcess, createObjectName, event, getContainer, getContainerName, getController, getDomain, getNext, getObjectName, getParentName, postDeregister, postRegister, preDeregister, preRegister, setContainer, 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

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

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