You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2001/03/21 07:46:42 UTC

cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/core ServerSession.java

costin      01/03/20 22:46:42

  Modified:    src/share/org/apache/tomcat/core ServerSession.java
  Log:
  Added the notification call when the session change the state ( as in
  Context and ContextManager ).
  
  Revision  Changes    Path
  1.8       +25 -0     jakarta-tomcat/src/share/org/apache/tomcat/core/ServerSession.java
  
  Index: ServerSession.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ServerSession.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ServerSession.java	2001/02/27 18:22:58	1.7
  +++ ServerSession.java	2001/03/21 06:46:42	1.8
  @@ -149,10 +149,35 @@
   	return state;
       }
   
  +    /** Change the state, call all hooks
  +     */
       public void setState( int state ) {
  +	if( context != null ) {
  +	    BaseInterceptor reqI[]=context.getContainer().
  +		getInterceptors(Container.H_sessionState);
  +	    for( int i=0; i< reqI.length; i++ ) {
  +		reqI[i].sessionState( null,
  +				      this,  state);
  +	    }
  +	}
   	this.state=state;
       }
   
  +    /** Change the state, call all hooks. The request that initiated
  +	the event is passed
  +     */
  +    public void setState( int state, Request req ) {
  +	if( context != null ) {
  +	    BaseInterceptor reqI[]=context.getContainer().
  +		getInterceptors(Container.H_sessionState);
  +	    for( int i=0; i< reqI.length; i++ ) {
  +		reqI[i].sessionState( req,
  +				      this,  state);
  +	    }
  +	}
  +	this.state=state;
  +    }
  +    
       // ----------------------------------------------------- Session Properties
       /** The time stamp associated with this session
        */