Code example for ListenableFuture

Methods: addListener

0
    public void run() { 
        task.cancel();
    } 
 
    public static void addProgressListener(ListenableFuture<?> future, CommandSender sender, String message) {
        future.addListener(new FutureProgressListener(sender, message), MoreExecutors.sameThreadExecutor());
    } 
 
} 
Contextual code suggestions in your IDE  Get Codota for Java