| 
 | Apache Tomcat 6.0.53 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.catalina.valves.ValveBase
org.apache.catalina.valves.CometConnectionManagerValve
public class CometConnectionManagerValve
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.
| Field Summary | |
|---|---|
| protected  java.util.List<Request> | cometRequestsList of current Coment connections. | 
| protected  java.lang.String | cometRequestsAttributeName of session attribute used to store list of comet connections. | 
| protected static java.lang.String | infoThe descriptive information related to this implementation. | 
| protected  LifecycleSupport | lifecycleThe lifecycle event support for this component. | 
| protected  StringManager | smThe string manager for this package. | 
| protected  boolean | startedHas this component been started yet? | 
| Fields inherited from class org.apache.catalina.valves.ValveBase | 
|---|
| container, containerLog, controller, domain, mserver, next, oname | 
| Fields inherited from interface org.apache.catalina.Lifecycle | 
|---|
| AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, DESTROY_EVENT, INIT_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT | 
| Constructor Summary | |
|---|---|
| CometConnectionManagerValve() | |
| Method Summary | |
|---|---|
|  void | addLifecycleListener(LifecycleListener listener)Add a lifecycle event listener to this component. | 
|  void | event(Request request,
      Response response,
      CometEvent event)Use events to update the connection state. | 
|  LifecycleListener[] | findLifecycleListeners()Get the lifecycle listeners associated with this lifecycle. | 
|  java.lang.String | getInfo()Return descriptive information about this Valve implementation. | 
|  void | invoke(Request request,
       Response response)Register requests for tracking, whenever needed. | 
|  void | lifecycleEvent(LifecycleEvent event)Acknowledge the occurrence of the specified event. | 
|  void | removeLifecycleListener(LifecycleListener listener)Remove a lifecycle event listener from this component. | 
|  void | sessionCreated(javax.servlet.http.HttpSessionEvent se)Notification that a session was created. | 
|  void | sessionDestroyed(javax.servlet.http.HttpSessionEvent se)Notification that a session is about to be invalidated. | 
|  void | start()Prepare for the beginning of active use of the public methods of this component. | 
|  void | stop()Gracefully terminate the active use of the public methods of this component. | 
| Methods inherited from class org.apache.catalina.valves.ValveBase | 
|---|
| backgroundProcess, createObjectName, 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 | 
| Field Detail | 
|---|
protected static final java.lang.String info
protected StringManager sm
protected LifecycleSupport lifecycle
protected boolean started
protected java.util.List<Request> cometRequests
protected java.lang.String cometRequestsAttribute
| Constructor Detail | 
|---|
public CometConnectionManagerValve()
| Method Detail | 
|---|
public void addLifecycleListener(LifecycleListener listener)
addLifecycleListener in interface Lifecyclelistener - The listener to addpublic LifecycleListener[] findLifecycleListeners()
findLifecycleListeners in interface Lifecyclepublic void removeLifecycleListener(LifecycleListener listener)
removeLifecycleListener in interface Lifecyclelistener - The listener to add
public void start()
           throws LifecycleException
configure(),
 and before any of the public methods of the component are utilized.
start in interface LifecycleLifecycleException - if this component detects a fatal error
  that prevents this component from being used
public void stop()
          throws LifecycleException
stop in interface LifecycleLifecycleException - if this component detects a fatal error
  that needs to be reportedpublic void lifecycleEvent(LifecycleEvent event)
LifecycleListener
lifecycleEvent in interface LifecycleListenerevent - LifecycleEvent that has occurredpublic java.lang.String getInfo()
getInfo in interface ValvegetInfo in class ValveBase
public void invoke(Request request,
                   Response response)
            throws java.io.IOException,
                   javax.servlet.ServletException
invoke in interface Valveinvoke in class ValveBaserequest - The servlet request to be processedresponse - The servlet response to be created
java.io.IOException - if an input/output error occurs
javax.servlet.ServletException - if a servlet error occurs
public void event(Request request,
                  Response response,
                  CometEvent event)
           throws java.io.IOException,
                  javax.servlet.ServletException
event in interface Valveevent in class ValveBaserequest - The servlet request to be processedresponse - The servlet response to be created
java.io.IOException - if an input/output error occurs
javax.servlet.ServletException - if a servlet error occurspublic void sessionCreated(javax.servlet.http.HttpSessionEvent se)
javax.servlet.http.HttpSessionListener
sessionCreated in interface javax.servlet.http.HttpSessionListenerse - the notification eventpublic void sessionDestroyed(javax.servlet.http.HttpSessionEvent se)
javax.servlet.http.HttpSessionListener
sessionDestroyed in interface javax.servlet.http.HttpSessionListenerse - the notification event| 
 | Apache Tomcat 6.0.53 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||