Class FuturePromise<C>
java.lang.Object
org.eclipse.jetty.util.FuturePromise<C>
- 
Nested Class Summary
Nested classes/interfaces inherited from interface Future
Future.StateNested classes/interfaces inherited from interface Promise
Promise.Completable<S>, Promise.Invocable<R>, Promise.Task<T>, Promise.Wrapper<W> - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleancancel(boolean mayInterruptIfRunning) voidCallback method to invoke when the operation fails.get()Return the result if completed successfully or in the case of failure, throw the Exception/Error, or an ExecutionException wrapping the cause if it is neither an Exception or Error.booleanbooleanisDone()static voidvoidCallback method to invoke when the operation succeeds.toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Future
exceptionNow, resultNow, state 
- 
Constructor Details
- 
FuturePromise
public FuturePromise() - 
FuturePromise
 - 
FuturePromise
 
 - 
 - 
Method Details
- 
succeeded
 - 
failed
 - 
cancel
 - 
isCancelled
public boolean isCancelled()- Specified by:
 isCancelledin interfaceFuture<C>
 - 
isDone
 - 
get
- Specified by:
 getin interfaceFuture<C>- Throws:
 InterruptedExceptionExecutionException
 - 
getOrThrow
Return the result if completed successfully or in the case of failure, throw the Exception/Error, or an ExecutionException wrapping the cause if it is neither an Exception or Error.- Returns:
 - the computed result
 - Throws:
 Exception- if the cause is an Exception or Error, otherwise an ExecutionException wrapping the cause
 - 
get
public C get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException - Specified by:
 getin interfaceFuture<C>- Throws:
 InterruptedExceptionExecutionExceptionTimeoutException
 - 
rethrow
- Throws:
 IOException
 - 
toString
 
 -