org.apache.catalina.valves
Class PersistentValve
java.lang.Object
org.apache.catalina.util.LifecycleBase
org.apache.catalina.util.LifecycleMBeanBase
org.apache.catalina.valves.ValveBase
org.apache.catalina.valves.PersistentValve
- All Implemented Interfaces:
- MBeanRegistration, Contained, Lifecycle, 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 1187022 2011-10-20 19:55:37Z markt $
- Author:
- Jean-Frederic Clere
Fields inherited from interface org.apache.catalina.Lifecycle |
AFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT |
Method Summary |
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, event, getContainer, getDomainInternal, getNext, getObjectNameKeyProperties, initInternal, isAsyncSupported, setAsyncSupported, setContainer, setNext, startInternal, stopInternal, toString |
Methods inherited from class org.apache.catalina.util.LifecycleBase |
addLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, init, removeLifecycleListener, setState, setState, start, stop |
PersistentValve
public PersistentValve()
getInfo
public 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 IOException,
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 processedresponse
- 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-2012 Apache Software Foundation. All Rights Reserved.