Implementation of Promises & Deferreds for Java asynchronous operations