code: private <Input, Output> ListenableFuture<Output> monitorFuture(Timer timer, ListenableFuture<Input> listenableFuture, Function<Input, Output> userCallback) {
          Futures.addCallback(listenableFuture, new FutureTimerCallback<>(timer));
  
          return Futures.transform(listenableFuture, new JdkFunctionWrapper<>(userCallback));
      }
docs: Monitor future completion
  
  @param timer            Timer that will be close on Future success or failure
  @param listenableFuture Listenable future
  @param userCallback     User callback that will be executed on Future success
  @param <Input>          Future class type
  @param <Output>         User callback output
  
  @return Listenable future