Interface ApiFuture<V> (2.44.0)

publicinterfaceApiFuture<V>extendsFuture<V>

A Future that can have a listener added.

Similar to Guava'sListenableFuture, but redeclared so that Guava could be shaded.

Type Parameter

NameDescription
V

Methods

addListener(Runnable listener, Executor executor)

publicabstractvoidaddListener(Runnablelistener,Executorexecutor)
Parameters
NameDescription
listenerRunnable
executorExecutor

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-01-31 UTC.