Package com.google.api.core
Class ApiFutureToListenableFuture<V>
- java.lang.Object
-
- com.google.api.core.ApiFutureToListenableFuture<V>
-
- All Implemented Interfaces:
com.google.common.util.concurrent.ListenableFuture<V>,Future<V>
@InternalApi public class ApiFutureToListenableFuture<V> extends Object implements com.google.common.util.concurrent.ListenableFuture<V>
INTERNAL USE ONLY. Adapter from ApiFuture to Guava ListenableFuture.
-
-
Constructor Summary
Constructors Constructor Description ApiFutureToListenableFuture(ApiFuture<V> apiFuture)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(Runnable listener, Executor executor)booleancancel(boolean b)Vget()Vget(long l, TimeUnit timeUnit)booleanisCancelled()booleanisDone()
-
-
-
Method Detail
-
addListener
public void addListener(Runnable listener, Executor executor)
- Specified by:
addListenerin interfacecom.google.common.util.concurrent.ListenableFuture<V>
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelledin interfaceFuture<V>
-
get
public V get() throws InterruptedException, ExecutionException
- Specified by:
getin interfaceFuture<V>- Throws:
InterruptedExceptionExecutionException
-
get
public V get(long l, TimeUnit timeUnit) throws InterruptedException, ExecutionException, TimeoutException
- Specified by:
getin interfaceFuture<V>- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
-