There is a service which uses Spring AsyncRestTemplate
for sending rest calls. Each call of AsyncRestTemplate.exchange()
returns ListenableFuture
. Something like this:
ListenableFuture future1 = new AsyncRestTemplate().exchange(...);
ListenableFuture future2 = new AsyncRestTemplate().exchange(...);
ListenableFuture future3 = new AsyncRestTemplate().exchange(...);
Is there a way for create single ListenableFuture
which combines all other calls? Something like Futures.allAsList
from Guava.