Package org.eclipse.jetty.util
Class FutureCallback
- java.lang.Object
-
- org.eclipse.jetty.util.FutureCallback
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.Callback
Callback.Completable, Callback.Nested
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.thread.Invocable
Invocable.InvocationType
-
-
Field Summary
Fields Modifier and Type Field Description static FutureCallbackSUCCEEDED-
Fields inherited from interface org.eclipse.jetty.util.thread.Invocable
__nonBlocking
-
-
Constructor Summary
Constructors Constructor Description FutureCallback()FutureCallback(boolean completed)FutureCallback(Throwable failed)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancancel(boolean mayInterruptIfRunning)voidfailed(Throwable cause)Callback invoked when the operation fails.Voidget()Voidget(long timeout, TimeUnit unit)booleanisCancelled()booleanisDone()static voidrethrow(ExecutionException e)voidsucceeded()Callback invoked when the operation completes.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.jetty.util.thread.Invocable
getInvocationType
-
-
-
-
Field Detail
-
SUCCEEDED
public static final FutureCallback SUCCEEDED
-
-
Constructor Detail
-
FutureCallback
public FutureCallback()
-
FutureCallback
public FutureCallback(boolean completed)
-
FutureCallback
public FutureCallback(Throwable failed)
-
-
Method Detail
-
succeeded
public void succeeded()
Description copied from interface:CallbackCallback invoked when the operation completes.
- Specified by:
succeededin interfaceCallback- See Also:
Callback.failed(Throwable)
-
failed
public void failed(Throwable cause)
Description copied from interface:CallbackCallback invoked when the operation fails.
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelledin interfaceFuture<Void>
-
get
public Void get() throws InterruptedException, ExecutionException
- Specified by:
getin interfaceFuture<Void>- Throws:
InterruptedExceptionExecutionException
-
get
public Void get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
- Specified by:
getin interfaceFuture<Void>- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
rethrow
public static void rethrow(ExecutionException e) throws IOException
- Throws:
IOException
-
-