I have google about spring support for the servlet specification 3.0 / 3.1 and most of the information I found in this article: Understanding Callable and spring DeferredResult
Here the author says that you can return Callable or DefferedResult from the controller and say that the servlet 3.0 / 3.1 is supported in spring.
But I do not understand how to apply it in my situation:
I have an external system, and I get the result from this system asynchronously.
In the controller, I write something like this:
externalSystenm.send(requestId, message);
and I have another thread where I get the result:
Message m = externalSystem.get(); m.getRequestId();
I know that in the servlet API I can save asyncContext on the map and then found it.
How can I recognize it in spring?
source share