Class ThriftListenableFuture<T>
java.lang.Object
com.google.common.util.concurrent.internal.InternalFutureFailureAccess
com.google.common.util.concurrent.AbstractFuture<T>
com.linecorp.armeria.common.thrift.ThriftListenableFuture<T>
- All Implemented Interfaces:
com.google.common.util.concurrent.ListenableFuture<T>
,Future<T>
,AsyncMethodCallback<T>
public final class ThriftListenableFuture<T>
extends com.google.common.util.concurrent.AbstractFuture<T>
implements AsyncMethodCallback<T>
A
ListenableFuture
that can be passed in as an AsyncMethodCallback
when making an asynchronous client-side Thrift RPC.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ThriftListenableFuture<T>
completedFuture(T value)
Returns a newThriftListenableFuture
instance that has its value set immediately.static <T> ThriftListenableFuture<T>
Returns a newThriftListenableFuture
instance that has an exception set immediately.void
onComplete(T value)
void
Methods inherited from class com.google.common.util.concurrent.AbstractFuture
addListener, afterDone, cancel, get, get, interruptTask, isCancelled, isDone, pendingToString, set, setException, setFuture, toString, tryInternalFastPathGetFailure, wasInterrupted
-
Constructor Details
-
ThriftListenableFuture
public ThriftListenableFuture()
-
-
Method Details
-
completedFuture
Returns a newThriftListenableFuture
instance that has its value set immediately. -
exceptionallyCompletedFuture
Returns a newThriftListenableFuture
instance that has an exception set immediately. -
onComplete
- Specified by:
onComplete
in interfaceAsyncMethodCallback<T>
-
onError
- Specified by:
onError
in interfaceAsyncMethodCallback<T>
-