All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.springframework.web.context.request.AsyncWebRequestInterceptor Maven / Gradle / Ivy

There is a newer version: 6.1.6
Show newest version
/*
 * Copyright 2002-2017 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springframework.web.context.request;

/**
 * Extends {@code WebRequestInterceptor} with a callback method invoked during
 * asynchronous request handling.
 *
 * 

When a handler starts asynchronous request handling, the DispatcherServlet * exits without invoking {@code postHandle} and {@code afterCompletion}, as it * normally does, since the results of request handling (e.g. ModelAndView) are * not available in the current thread and handling is not yet complete. * In such scenarios, the {@link #afterConcurrentHandlingStarted(WebRequest)} * method is invoked instead allowing implementations to perform tasks such as * cleaning up thread bound attributes. * *

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} as usual. * * @author Rossen Stoyanchev * @since 3.2 * * @see org.springframework.web.context.request.async.WebAsyncManager */ public interface AsyncWebRequestInterceptor extends WebRequestInterceptor{ /** * Called instead of {@code postHandle} and {@code afterCompletion}, when the * handler started handling the request concurrently. * * @param request the current request */ void afterConcurrentHandlingStarted(WebRequest request); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy