From dev-return-116854-apmail-tomcat-dev-archive=tomcat.apache.org@tomcat.apache.org Fri Jun 10 08:24:57 2011 Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9852E4420 for ; Fri, 10 Jun 2011 08:24:57 +0000 (UTC) Received: (qmail 48497 invoked by uid 500); 10 Jun 2011 08:24:56 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 48415 invoked by uid 500); 10 Jun 2011 08:24:56 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 48406 invoked by uid 99); 10 Jun 2011 08:24:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Jun 2011 08:24:56 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rainer.jung@kippdata.de designates 195.227.30.149 as permitted sender) Received: from [195.227.30.149] (HELO mailserver.kippdata.de) (195.227.30.149) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Jun 2011 08:24:47 +0000 Received: from [195.227.30.209] (notebook-rj [195.227.30.209]) by mailserver.kippdata.de (8.13.5/8.13.5) with ESMTP id p5A8OQx2028690 for ; Fri, 10 Jun 2011 10:24:26 +0200 (CEST) Message-ID: <4DF1D4B5.8060508@kippdata.de> Date: Fri, 10 Jun 2011 10:24:21 +0200 From: Rainer Jung User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: dev@tomcat.apache.org Subject: Re: svn commit: r1134063 - /tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java References: <20110609201024.B6B3A23889E0@eris.apache.org> In-Reply-To: <20110609201024.B6B3A23889E0@eris.apache.org> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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 > * > + *
>   * 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()
> + * 
> */ > public class AsyncStateMachine { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org