Class AbstractCatchingFuture.CatchingFuture<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,Function<? super X,? extends V>,V>
-
- com.google.common.util.concurrent.AbstractCatchingFuture.CatchingFuture<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.CatchingFuture<V,X extends java.lang.Throwable> extends AbstractCatchingFuture<V,X,Function<? super X,? extends V>,V>
-
-
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 CatchingFuture(ListenableFuture<? extends V> input, java.lang.Class<X> exceptionType, Function<? super X,? extends V> fallback)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) V
doFallback(Function<? super X,? extends V> fallback, X cause)
Template method for subtypes to actually run the fallback.(package private) void
setResult(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
-
-
-
-
Method Detail
-
doFallback
V doFallback(Function<? super X,? extends V> fallback, X cause) throws java.lang.Exception
Description copied from class:AbstractCatchingFuture
Template method for subtypes to actually run the fallback.- Specified by:
doFallback
in classAbstractCatchingFuture<V,X extends java.lang.Throwable,Function<? super X extends java.lang.Throwable,? extends V>,V>
- Throws:
java.lang.Exception
-
setResult
void setResult(V result)
Description copied from class:AbstractCatchingFuture
Template method for subtypes to actually set the result.
-
-