diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/AsyncHandlerInterceptor.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/AsyncHandlerInterceptor.java index 937b5bc390..5284a2d172 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/AsyncHandlerInterceptor.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/AsyncHandlerInterceptor.java @@ -25,27 +25,27 @@ import org.springframework.web.method.HandlerMethod; * Extends {@code HandlerInterceptor} with a callback method invoked after the * start of asynchronous request handling. * - *
When a handler starts an asynchronous request, the DispatcherServlet + *
When a handler starts an asynchronous request, the {@link DispatcherServlet} * exits without invoking {@code postHandle} and {@code afterCompletion} as it - * normally does since the results of request handling (e.g. ModelAndView) - * is likely not yet ready and will be produced concurrently from another thread. - * In such scenarios, {@link #afterConcurrentHandlingStarted} is invoked instead - * allowing implementations to perform tasks such as cleaning up thread bound - * attributes before releasing the thread to the Servlet container. + * normally does for a synchronous request, since the result of request handling + * (e.g. ModelAndView) is likely not yet ready and will be produced concurrently + * from another thread. In such scenarios, {@link #afterConcurrentHandlingStarted} + * is invoked instead, allowing implementations to perform tasks such as cleaning + * up thread-bound attributes before releasing the thread to the Servlet container. * *
When asynchronous handling completes, the request is dispatched to the - * container for further processing. At this stage the DispatcherServlet invokes - * {@code preHandle}, {@code postHandle} and {@code afterCompletion}. + * container for further processing. At this stage the {@code DispatcherServlet} + * invokes {@code preHandle}, {@code postHandle}, and {@code afterCompletion}. * To distinguish between the initial request and the subsequent dispatch * after asynchronous handling completes, interceptors can check whether the * {@code javax.servlet.DispatcherType} of {@link javax.servlet.ServletRequest} - * is "REQUEST" or "ASYNC". + * is {@code "REQUEST"} or {@code "ASYNC"}. * - *
Note that {@code HandlerInterceptor} implementations may be need to do work + *
Note that {@code HandlerInterceptor} implementations may need to do work * when an async request times out or completes with a network error. For such * cases the Servlet container does not dispatch and therefore the * {@code postHandle} and {@code afterCompletion} methods will not be invoked. - * Instead interceptors can register to track an asynchronous request through + * Instead, interceptors can register to track an asynchronous request through * the {@code registerCallbackInterceptor} and {@code registerDeferredResultInterceptor} * methods on {@link org.springframework.web.context.request.async.WebAsyncManager * WebAsyncManager}. This can be done proactively on every request from @@ -62,14 +62,15 @@ public interface AsyncHandlerInterceptor extends HandlerInterceptor { /** * Called instead of {@code postHandle} and {@code afterCompletion}, when - * the a handler is being executed concurrently. Implementations may use the - * provided request and response but should avoid modifying them in ways - * that would conflict with the concurrent execution of the handler. A - * typical use of this method would be to clean thread local variables. + * the a handler is being executed concurrently. + *
Implementations may use the provided request and response but should + * avoid modifying them in ways that would conflict with the concurrent + * execution of the handler. A typical use of this method would be to + * clean up thread-local variables. * * @param request the current request * @param response the current response - * @param handler handler (or {@link HandlerMethod}) that started async + * @param handler the handler (or {@link HandlerMethod}) that started async * execution, for type and/or instance examination * @throws Exception in case of errors */ diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestBodyAdvice.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestBodyAdvice.java index 1bb0e146b2..ee0be6504d 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestBodyAdvice.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestBodyAdvice.java @@ -23,12 +23,11 @@ import org.springframework.core.MethodParameter; import org.springframework.http.HttpInputMessage; import org.springframework.http.converter.HttpMessageConverter; - /** * Allows customizing the request before its body is read and converted into an - * Object and also allows the resulting Object before it is passed into a - * controller method as an {code @RequestBody} or an {@code HttpEntity} method - * argument. + * Object and also allows for processing of the resulting Object before it is + * passed into a controller method as an {@code @RequestBody} or an + * {@code HttpEntity} method argument. * *
Implementations of this contract may be registered directly with the * {@code RequestMappingHandlerAdapter} or more likely annotated with