views:

102

answers:

1

I have to invoke REST endpoints A, B & C in parallel and combine the resulting JSON from each into one JSON. All REST endpoints reside on different servers.

My initial design calls for 3 Callables executed via FutureTasks. I will then do a Future.get(1000ms) on each FutureTask until they return a value. Is this how you would solve this problem ?

+1  A: 

That's how I would do it. I really like the Future interface.

Don Kirkby
I'm not really sure what the "That's" is referring to, but great link.
stevedbrown
The original poster's description of his initial design.
Don Kirkby