Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » catalina » valves » [javadoc | source]
org.apache.catalina.valves
public class: CometConnectionManagerValve [javadoc | source]
java.lang.Object
   org.apache.catalina.valves.ValveBase
      org.apache.catalina.valves.CometConnectionManagerValve

All Implemented Interfaces:
    HttpSessionListener, LifecycleListener, Lifecycle, Valve, MBeanRegistration, Contained

Implementation of a Valve that tracks Comet connections, and closes them when the associated session expires or the webapp is reloaded.

This Valve should be attached to a Context.

Nested Class Summary:
protected class  CometConnectionManagerValve.ConnectionInfo   
Field Summary
protected static final  String info    The descriptive information related to this implementation. 
protected  StringManager sm    The string manager for this package. 
protected  LifecycleSupport lifecycle    The lifecycle event support for this component. 
protected  boolean started    Has this component been started yet? 
protected  ConcurrentHashMap connections    Connection list. 
Fields inherited from org.apache.catalina.valves.ValveBase:
container,  containerLog,  info,  next,  sm,  domain,  oname,  mserver,  controller
Method from org.apache.catalina.valves.CometConnectionManagerValve Summary:
addLifecycleListener,   event,   findLifecycleListeners,   getInfo,   invoke,   lifecycleEvent,   removeLifecycleListener,   sessionCreated,   sessionDestroyed,   start,   stop
Methods from org.apache.catalina.valves.ValveBase:
backgroundProcess,   createObjectName,   event,   getContainer,   getContainerName,   getController,   getDomain,   getInfo,   getNext,   getObjectName,   getParentName,   invoke,   postDeregister,   postRegister,   preDeregister,   preRegister,   setContainer,   setController,   setNext,   setObjectName,   toString
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.catalina.valves.CometConnectionManagerValve Detail:
 public  void addLifecycleListener(LifecycleListener listener) 
    Add a lifecycle event listener to this component.
 public  void event(Request request,
    Response response,
    CometEvent event) throws IOException, ServletException 
    Use events to update the connection state.
 public LifecycleListener[] findLifecycleListeners() 
    Get the lifecycle listeners associated with this lifecycle. If this Lifecycle has no listeners registered, a zero-length array is returned.
 public String getInfo() 
    Return descriptive information about this Valve implementation.
 public  void invoke(Request request,
    Response response) throws IOException, ServletException 
    Register requests for tracking, whenever needed.
 public  void lifecycleEvent(LifecycleEvent event) 
 public  void removeLifecycleListener(LifecycleListener listener) 
    Remove a lifecycle event listener from this component.
 public  void sessionCreated(HttpSessionEvent se) 
 public  void sessionDestroyed(HttpSessionEvent se) 
 public  void start() throws LifecycleException 
    Prepare for the beginning of active use of the public methods of this component. This method should be called after configure(), and before any of the public methods of the component are utilized.
 public  void stop() throws LifecycleException 
    Gracefully terminate the active use of the public methods of this component. This method should be the last one called on a given instance of this component.