org.apache.catalina.valves

Class PersistentValve

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: $Revision: 787779 $ $Date: 2009-06-23 20:32:01 +0200 (Tue, 23 Jun 2009) $

Author: Jean-Frederic Clere

Method Summary
StringgetInfo()
Return descriptive information about this Valve implementation.
voidinvoke(Request request, Response response)
Select the appropriate child Context to process this request, based on the specified request URI.
protected booleanisSessionStale(Session session, long timeNow)
Indicate whether the session has been idle for longer than its expiration date as of the supplied time.

Method Detail

getInfo

public String getInfo()
Return descriptive information about this Valve implementation.

invoke

public void invoke(Request request, Response response)
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.

Parameters: request Request to be processed response Response to be produced

Throws: IOException if an input/output error occurred 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.
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.