org.jboss.web.tomcat.tc5.session
Class ClusteredSessionValve

java.lang.Object
  extended byValveBase
      extended byorg.jboss.web.tomcat.tc5.session.ClusteredSessionValve

public class ClusteredSessionValve
extends ValveBase

This Valve detects all sessions that were used in a request. All sessions are given to a snapshot manager that handles the distribution of modified sessions.

TOMCAT 4.1.12 UPDATE: Added findLifecycleListeners() to comply with the latest Lifecycle interface.

See Also:
Serialized Form

Field Summary
protected static java.lang.ThreadLocal requestThreadLocal
           
protected static java.lang.ThreadLocal responseThreadLocal
           
protected  SnapshotManager (src) snapshot
           
protected  LifecycleSupport support
           
 
Constructor Summary
ClusteredSessionValve(SnapshotManager (src)  snapshot)
          Create a new Valve.
 
Method Summary
 void addLifecycleListener(LifecycleListener listener)
           
 LifecycleListener[] findLifecycleListeners()
           
 java.lang.String getInfo()
          Get information about this Valve.
 void invoke(Request request, Response response)
          Valve-chain handler method.
 void removeLifecycleListener(LifecycleListener listener)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

snapshot

protected SnapshotManager (src)  snapshot

support

protected LifecycleSupport support

requestThreadLocal

protected static java.lang.ThreadLocal requestThreadLocal

responseThreadLocal

protected static java.lang.ThreadLocal responseThreadLocal
Constructor Detail

ClusteredSessionValve

public ClusteredSessionValve(SnapshotManager (src)  snapshot)
Create a new Valve.

Parameters:
snapshot - The SnapshotManager associated with this Valve
Method Detail

getInfo

public java.lang.String getInfo()
Get information about this Valve.


invoke

public void invoke(Request request,
                   Response response)
            throws java.io.IOException,
                   ServletException
Valve-chain handler method. This method gets called when the request goes through the Valve-chain. Our session replication mechanism replicates the session after request got through the servlet code.

Parameters:
request - The request object associated with this request.
response - The response object associated with this request.
Throws:
java.io.IOException
ServletException

addLifecycleListener

public void addLifecycleListener(LifecycleListener listener)

removeLifecycleListener

public void removeLifecycleListener(LifecycleListener listener)

findLifecycleListeners

public LifecycleListener[] findLifecycleListeners()

start

public void start()
           throws LifecycleException
Throws:
LifecycleException

stop

public void stop()
          throws LifecycleException
Throws:
LifecycleException