Last active
March 1, 2023 20:29
-
-
Save railroadman/5ea1799ecb2fdcfd4c83b4a969c364c9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AccountDetails accountDetails = new AccountDetails(); | |
CompletableFuture.allOf( | |
CompletableFuture. | |
supplyAsync(() -> //CALL MORTAGE INFO REST, executor). | |
thenAccept(x -> { | |
accountDetails.setMortgageAccountId(x.getReqdField()) | |
}). | |
handle(//HANDLE GRACEFULLY), | |
CompletableFuture. | |
supplyAsync(() -> //CALL SOME OTHER REST, executor). | |
thenAccept(x -> { | |
accountDetails.setNoOfTrans(x.getReqdField()) | |
}). | |
handle(//HANDLE GRACEFULLY), | |
CompletableFuture. | |
supplyAsync(() -> //CALL SOME INFO REST, executor). | |
thenAccept(x -> { | |
accountDetails.setAddressLine(x.getReqdField()) | |
}). | |
handle(//HANDLE GRACEFULLY), | |
CompletableFuture. | |
supplyAsync(() -> //CALL SOME OTHER REST, executor). | |
thenAccept(x -> { | |
accountDetails.setExternalLink(x.getReqdField()) | |
}). | |
handle(//HANDLE GRACEFULLY), | |
).join(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment