spring async rest client orchestrate few calls
<p>I have following problem in my service I am building object X however In order to build it I need to make few http calls in order to get all required data to fill it (each rest fills certain part of the object.) In order to keep performance high I thought it would be nice to make call async and after all calls are done return object to the caller. It looks something like this</p>

<pre><code>ListenableFuture&lt;ResponseEntity&lt;String&gt;&gt; future1 = asycTemp.exchange(url, method, requestEntity, responseType);
future1.addCallback({
    //process response and set fields
    complexObject.field1 = "PARSERD RESPONSE"
},{
    //in case of fail fill default or take some ather actions
})
</code></pre>

<p>I don't know how to wait for all features to be done. I guess that they are some standard spring ways of solving this kind of issue. Thanks in advance for any suggestions. Spring version - 4.2.4.RELEASE
Best regards</p>