ListenableFuture and immediateFuture
ListenableFuture is a Future interface implementation in Google Guava library. Since it has compatibility with Future, you can replace Future with ListenableFuture. ListenableFuture provides a mechanism of lister callback in addition features of Future. The result of Future should be fetched by main thread later but ListenableFuture call the callback...
[Read More]