You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2012/07/04 22:35:35 UTC
svn commit: r1357394 -
/tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
Author: markt
Date: Wed Jul 4 20:35:34 2012
New Revision: 1357394
URL: http://svn.apache.org/viewvc?rev=1357394&view=rev
Log:
Tweak the async state diagram:
- add method names
- re-arrange some of the lines for clarity
- document the new state
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=1357394&r1=1357393&r2=1357394&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java Wed Jul 4 20:35:34 2012
@@ -34,6 +34,7 @@ import org.apache.tomcat.util.res.String
* STARTED - ServletRequest.startAsync() has been called and the
* request in which that call was made has finished
* processing.
+ * READ_WRITE_OP - Performing an asynchronous read or write.
* MUST_COMPLETE - complete() has been called before the request in which
* ServletRequest.startAsync() has finished. As soon as that
* request finishes, the complete() will be processed.
@@ -51,37 +52,41 @@ import org.apache.tomcat.util.res.String
*
* |----------------->--------------|
* | \|/
- * | |----------<---------------ERROR
- * | | complete() /|\ |postProcess()
- * | | error()| |
- * | | | | |--|timeout()
- * | | postProcess() | \|/ | \|/ auto
- * | | |--------------->DISPATCHED<------------------COMPLETING<----|
- * | | | /|\ | | /|\ |
- * | | | |--->-------| | |--| |
- * | | ^ | |startAsync() timeout() |
- * | | | | | |
- * | \|/ | | complete() \|/ postProcess() |
- * | MUST_COMPLETE-<- | ----<------STARTING-->----------------| ^
- * | /|\ | | | |
- * | | | | | |
- * | | ^ |dispatch() | |
- * | | | | | |
- * | | | \|/ \|/ complete() |
- * | | | MUST_DISPATCH STARTED---->-------|
- * | | | | | | \ \
- * | | | |postProcess() | | \ \
- * ^ ^ | | dispatch() | |auto\ \
- * | | | | |--------------------| | \ \----<------
- * | | | auto \|/ \|/ \|/ \ \
- * | | |---<----DISPATCHING<-----------------TIMING_OUT \ \
- * | | dispatch() | | | \
- * | | | | \|/ |
- * | |-------<-------------------------------------<----| | READ_WRITE_OP ->-
- * | complete() \-------|------|
- * | | |
- * |----<------------------------<-----------------------------<--|------|
- * error()
+ * | |----------<---------------ERROR-----------------------<----------------------------------|
+ * | | complete() /|\ | |
+ * | | | |postProcess() |
+ * | | error()| | |
+ * | | | | |--|timeout() |
+ * | | postProcess() | \|/ | \|/ auto |
+ * | | |--------------->DISPATCHED<-----------------------COMPLETING<-----| |
+ * | | | /|\ | | /|\ | |
+ * | | | |--->-------| | |--| | |
+ * | | ^ | |startAsync() timeout() | |
+ * | | | | | | |
+ * | \|/ | | complete() \|/ postProcess() | |
+ * | MUST_COMPLETE-<- | ----<------STARTING-->--------------------| ^ |
+ * | /|\ /|\ | | | complete() | |
+ * | | | | | | /-----------| |
+ * | | | ^ |dispatch() | / |
+ * | | | | | | / |
+ * | | | | \|/ \|/ / |
+ * | | | | MUST_DISPATCH STARTED |
+ * | | | | | /| \ \ |
+ * | | | | |postProcess() / | \ \ |
+ * ^ | ^ | | dispatch() / | \ \ |
+ * | | | | | / | \ \ postProcess() |
+ * | | | | | |-------------------/ |auto \ \----<--------------| |
+ * | | | | auto \|/ \|/ \|/ \ | |
+ * | | | |---<----DISPATCHING<-----------------TIMING_OUT \ | |
+ * | | | dispatch() | | |asyncOperation() ^ |
+ * | | | | | \|/ | ^
+ * | | |-------<----------------------------------<----| | READ_WRITE_OP->-----| |
+ * | | complete() | | | |
+ * | | | | | error() |
+ * |<- | ----<-------------------<-----------------------------<--| | |->-----------|
+ * | error() |
+ * | complete() |
+ * |--------------------------------------------------------------------|
* </pre>
*/
public class AsyncStateMachine<S> {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org