tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject Re: svn commit: r1134063 - /tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
Date Fri, 10 Jun 2011 08:24:21 GMT
I like it :)

On 09.06.2011 22:10, markt@apache.org wrote:
> Author: markt
> Date: Thu Jun  9 20:10:23 2011
> New Revision: 1134063
> 
> URL: http://svn.apache.org/viewvc?rev=1134063&view=rev
> Log:
> Document the state transition diagram
> 
> Modified:
>     tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
> 
> Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java?rev=1134063&r1=1134062&r2=1134063&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java (original)
> +++ tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java Thu Jun  9 20:10:23 2011
> @@ -24,8 +24,8 @@ import org.apache.tomcat.util.res.String
>  
>  /**
>   * Manages the state transitions for async requests.
> - * TODO: State transition diagram
>   * 
> + * <pre>
>   * The internal states that are used are:
>   * DISPATCHED    - Standard request. Not in Async mode.
>   * STARTING      - ServletRequest.startAsync() has been called but the
> @@ -48,6 +48,41 @@ import org.apache.tomcat.util.res.String
>   *                 request finishes, the dispatch() will be processed.
>   * DISPATCHING   - The dispatch is being processed.
>   * ERROR         - Something went wrong.
> + *
> + * |----------------->---------------|                                         
> + * |                                \|/                                        
> + * |   |----------<----------------ERROR                                    
> + * |   |    complete()            /|\  |                                       
> + * |   |                    error()|   |postProcess()                          
> + * |   |                           |   |                                       
> + * |   |           postProcess()   |  \|/         auto                         
> + * |   |         |--------------->DISPATCHED<------------------COMPLETING<----|

> + * |   |         |               /|\  |                          | /|\        | 
> + * |   |         |    |--->-------|   |                          |--|         | 
> + * |   |         ^    |               |startAsync()            timeout()      |
> + * |   |         |    |               |                                       | 
> + * |  \|/        |    |  complete()  \|/        postProcess()                 | 
> + * | MUST_COMPLETE-<- | ----<------STARTING-->----------------|           
   ^     
> + * |      /|\         |               |                       |               |    
    
> + * |       |          |               |                       |               |    
    
> + * |       |          ^               |dispatch()             |               |    
    
> + * |       |          |               |                       |               |    
    
> + * |       |          |              \|/                     \|/   complete() |    
    
> + * |       |          |         MUST_DISPATCH              STARTED---->-------| 
 
> + * |       |          |           |                         |   |                  
     
> + * |       |          |           |postProcess()            |   |                  
     
> + * ^       ^          |           |              dispatch() |   |auto              
         
> + * |       |          |           |    |--------------------|   |                  
     
> + * |       |          | auto     \|/  \|/                      \|/                 
       
> + * |       |          |---<----DISPATCHING<-----------------TIMING_OUT       
                      
> + * |       |                                  dispatch()      |   |             
> + * |       |                                                  |   |            
> + * |       |-------<-------------------------------------<----|   |          
 
> + * |                              complete()                      |            
> + * |                                                              |            
> + * |----<------------------------<-----------------------------<--|       
    
> + *                                 error()
> + * </pre>                               
>   */
>  public class AsyncStateMachine {

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message