Questions tagged [deferred-result]

DeferredResult provides an alternative to using a Callable for asynchronous request processing. While a Callable is executed concurrently on behalf of the application, with a DeferredResult the application can produce the result from a thread of its choice.

19 questions
0
votes
1 answer

Wait for method which return DeferredResult

I have service method which return DefferedResult in few seconds, but I need my code will wait until that method finish and return deferred result with set result. Here is sample code: @Service public class FooService { // ... public…
Denis Stephanov
  • 4,563
  • 24
  • 78
  • 174
0
votes
1 answer

Measure execution time of async method

I have async method where I use DeferredResult as return type. I want write junit test for that method where I call this method in loop, e.g 100 times, and I need measure execution time for every call of that method. Here is method…
Denis Stephanov
  • 4,563
  • 24
  • 78
  • 174
0
votes
1 answer

Post authorizing Spring asynchronous controller response

I have a REST controller with a GET method. It returns a resource. I want to verify if the resource belongs to the authorized user by comparing the owner field on the Resource with the authorized user's login. With a normal synchronous request I'd…
jannis
  • 4,843
  • 1
  • 23
  • 53
0
votes
0 answers

Spring DeferredResult timeout

I have an observable and as it may take a long time i return spring's DeferredResult. This is the controller logic I'm using: public DeferredResult> getSomeFile() { …
marknorkin
  • 3,904
  • 10
  • 46
  • 82
1
2