Using Deferred Objects and Promises with Java 8 and JDeferred

Promises may help us when dealing with asynchronous code and we need to merge, pipe or track the progress and the results of single parts of computation in our applications. In the following tutorial I’d like to demonstrate a small library, JDeferred that helps us for this specific use case. Figure 1. JDeferred examples running in Eclipse IDE. Dependencies Using Maven here, we simply need to add one dependency for jdeferred-core to our pom.xml: ...

September 27, 2015 · 8 min · 1631 words · Micha Kops