Class AbstractCatchingFuture.AsyncCatchingFuture<V,X extends java.lang.Throwable>
- java.lang.Object
-
- com.google.common.util.concurrent.internal.InternalFutureFailureAccess
-
- com.google.common.util.concurrent.AbstractFuture<V>
-
- com.google.common.util.concurrent.GwtFluentFutureCatchingSpecialization<V>
-
- com.google.common.util.concurrent.FluentFuture<V>
-
- com.google.common.util.concurrent.FluentFuture.TrustedFuture<V>
-
- com.google.common.util.concurrent.AbstractCatchingFuture<V,X,AsyncFunction<? super X,? extends V>,ListenableFuture<? extends V>>
-
- com.google.common.util.concurrent.AbstractCatchingFuture.AsyncCatchingFuture<V,X>
-
- All Implemented Interfaces:
AbstractFuture.Trusted<V>,ListenableFuture<V>,java.lang.Runnable,java.util.concurrent.Future<V>
- Enclosing class:
- AbstractCatchingFuture<V,X extends java.lang.Throwable,F,T>
private static final class AbstractCatchingFuture.AsyncCatchingFuture<V,X extends java.lang.Throwable> extends AbstractCatchingFuture<V,X,AsyncFunction<? super X,? extends V>,ListenableFuture<? extends V>>
AnAbstractCatchingFuturethat delegates to anAsyncFunctionandAbstractFuture.setFuture(ListenableFuture).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.util.concurrent.FluentFuture
FluentFuture.TrustedFuture<V>
-
Nested classes/interfaces inherited from class com.google.common.util.concurrent.AbstractFuture
AbstractFuture.Trusted<V>
-
-
Field Summary
-
Fields inherited from class com.google.common.util.concurrent.AbstractCatchingFuture
exceptionType, fallback, inputFuture
-
-
Constructor Summary
Constructors Constructor Description AsyncCatchingFuture(ListenableFuture<? extends V> input, java.lang.Class<X> exceptionType, AsyncFunction<? super X,? extends V> fallback)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) ListenableFuture<? extends V>doFallback(AsyncFunction<? super X,? extends V> fallback, X cause)Template method for subtypes to actually run the fallback.(package private) voidsetResult(ListenableFuture<? extends V> result)Template method for subtypes to actually set the result.-
Methods inherited from class com.google.common.util.concurrent.AbstractCatchingFuture
afterDone, create, create, pendingToString, run
-
Methods inherited from class com.google.common.util.concurrent.FluentFuture.TrustedFuture
addListener, cancel, get, get, isCancelled, isDone
-
Methods inherited from class com.google.common.util.concurrent.FluentFuture
addCallback, catching, catchingAsync, from, from, transform, transformAsync, withTimeout, withTimeout
-
Methods inherited from class com.google.common.util.concurrent.AbstractFuture
interruptTask, maybePropagateCancellationTo, set, setException, setFuture, toString, tryInternalFastPathGetFailure, wasInterrupted
-
-
-
-
Constructor Detail
-
AsyncCatchingFuture
AsyncCatchingFuture(ListenableFuture<? extends V> input, java.lang.Class<X> exceptionType, AsyncFunction<? super X,? extends V> fallback)
-
-
Method Detail
-
doFallback
ListenableFuture<? extends V> doFallback(AsyncFunction<? super X,? extends V> fallback, X cause) throws java.lang.Exception
Description copied from class:AbstractCatchingFutureTemplate method for subtypes to actually run the fallback.- Specified by:
doFallbackin classAbstractCatchingFuture<V,X extends java.lang.Throwable,AsyncFunction<? super X extends java.lang.Throwable,? extends V>,ListenableFuture<? extends V>>- Throws:
java.lang.Exception
-
setResult
void setResult(ListenableFuture<? extends V> result)
Description copied from class:AbstractCatchingFutureTemplate method for subtypes to actually set the result.- Specified by:
setResultin classAbstractCatchingFuture<V,X extends java.lang.Throwable,AsyncFunction<? super X extends java.lang.Throwable,? extends V>,ListenableFuture<? extends V>>
-
-