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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org