I am in the process of writing a small scala wrapper around a java library.
The java library has an object QueryExecutor exposing 2 methods:
Another, slightly shorter solution:
implicit class ListenableFutureDecorator[T](val f: ListenableFuture[T]) extends AnyVal { def asScala(implicit e: Executor): Future[T] = { val p = Promise[T]() f.addListener(() => p.complete(Try(f.get())), e) p.future } }