Previously we registered 3 AsyncListener's from the request, from the
response, and from the Servlet adapter.
After this change, only the Servlet adapter registers a listener and
the others are delegated to. This consolidates the handling of
AsyncListener events so that it's easier to discover, trace, and
enforce the order of handling.
See gh-26434
@ -167,8 +167,12 @@ public class ServletHttpHandlerAdapter implements Servlet {
@@ -167,8 +167,12 @@ public class ServletHttpHandlerAdapter implements Servlet {
@ -180,15 +184,17 @@ public class ServletHttpHandlerAdapter implements Servlet {
@@ -180,15 +184,17 @@ public class ServletHttpHandlerAdapter implements Servlet {
@ -244,27 +250,38 @@ public class ServletHttpHandlerAdapter implements Servlet {
@@ -244,27 +250,38 @@ public class ServletHttpHandlerAdapter implements Servlet {
@ -272,12 +289,47 @@ public class ServletHttpHandlerAdapter implements Servlet {
@@ -272,12 +289,47 @@ public class ServletHttpHandlerAdapter implements Servlet {
@ -291,11 +343,6 @@ public class ServletHttpHandlerAdapter implements Servlet {
@@ -291,11 +343,6 @@ public class ServletHttpHandlerAdapter implements Servlet {
publicvoidonStartAsync(AsyncEventevent){
// no-op
}
@Override
publicvoidonComplete(AsyncEventevent){
// no-op
}
}
@ -303,7 +350,7 @@ public class ServletHttpHandlerAdapter implements Servlet {
@@ -303,7 +350,7 @@ public class ServletHttpHandlerAdapter implements Servlet {
privatefinalAsyncContextasyncContext;
privatefinalAtomicBooleanisCompleted;
privatefinalAtomicBooleancompletionFlag;
privatefinalStringlogPrefix;
@ -311,11 +358,11 @@ public class ServletHttpHandlerAdapter implements Servlet {
@@ -311,11 +358,11 @@ public class ServletHttpHandlerAdapter implements Servlet {
@ -332,7 +379,7 @@ public class ServletHttpHandlerAdapter implements Servlet {
@@ -332,7 +379,7 @@ public class ServletHttpHandlerAdapter implements Servlet {
@Override
publicvoidonError(Throwableex){
logger.trace(this.logPrefix+"Failed to complete: "+ex.getMessage());
@ -354,7 +401,7 @@ public class ServletHttpHandlerAdapter implements Servlet {
@@ -354,7 +401,7 @@ public class ServletHttpHandlerAdapter implements Servlet {