org.springframework.web.context.request.async
Class StaleAsyncRequestCheckingCallable
java.lang.Object
org.springframework.web.context.request.async.AbstractDelegatingCallable
org.springframework.web.context.request.async.StaleAsyncRequestCheckingCallable
- All Implemented Interfaces:
- java.util.concurrent.Callable<java.lang.Object>
public class StaleAsyncRequestCheckingCallable
- extends AbstractDelegatingCallable
Invokes the next Callable in a chain and then checks if the AsyncWebRequest
provided to the constructor has ended before returning. Since a timeout or a
(client) error may occur in a separate thread while async request processing
is still in progress in its own thread, inserting this Callable in the chain
protects against use of stale async requests.
If an async request was terminated while the next Callable was still
processing, a StaleAsyncWebRequestException
is raised.
- Since:
- 3.2
- Author:
- Rossen Stoyanchev
Method Summary |
java.lang.Object |
call()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StaleAsyncRequestCheckingCallable
public StaleAsyncRequestCheckingCallable(AsyncWebRequest asyncWebRequest)
call
public java.lang.Object call()
throws java.lang.Exception
- Throws:
java.lang.Exception