Package org.eclipse.jetty.client
Class AbstractConnectionPool.FutureConnection
- java.lang.Object
-
- java.util.concurrent.CompletableFuture<S>
-
- org.eclipse.jetty.util.Promise.Completable<Connection>
-
- org.eclipse.jetty.client.AbstractConnectionPool.FutureConnection
-
- All Implemented Interfaces:
java.util.concurrent.CompletionStage<Connection>
,java.util.concurrent.Future<Connection>
,Promise<Connection>
- Enclosing class:
- AbstractConnectionPool
private class AbstractConnectionPool.FutureConnection extends Promise.Completable<Connection>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture
java.util.concurrent.CompletableFuture.AsynchronousCompletionTask
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.Promise
Promise.Adapter<U>, Promise.Completable<S>, Promise.Wrapper<W>
-
-
Field Summary
Fields Modifier and Type Field Description private Pool.Entry
reserved
-
Constructor Summary
Constructors Constructor Description FutureConnection(Pool.Entry reserved)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
failed(java.lang.Throwable x)
Callback invoked when the operation fails.void
succeeded(Connection connection)
Callback invoked when the operation completes.-
Methods inherited from class java.util.concurrent.CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, cancel, complete, completedFuture, completeExceptionally, exceptionally, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, obtrudeException, obtrudeValue, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, runAsync, runAsync, supplyAsync, supplyAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, toString, whenComplete, whenCompleteAsync, whenCompleteAsync
-
-
-
-
Field Detail
-
reserved
private final Pool.Entry reserved
-
-
Constructor Detail
-
FutureConnection
public FutureConnection(Pool.Entry reserved)
-
-
Method Detail
-
succeeded
public void succeeded(Connection connection)
Description copied from interface:Promise
Callback invoked when the operation completes.
- Specified by:
succeeded
in interfacePromise<Connection>
- Overrides:
succeeded
in classPromise.Completable<Connection>
- Parameters:
connection
- the context- See Also:
Promise.failed(Throwable)
-
failed
public void failed(java.lang.Throwable x)
Description copied from interface:Promise
Callback invoked when the operation fails.
- Specified by:
failed
in interfacePromise<Connection>
- Overrides:
failed
in classPromise.Completable<Connection>
- Parameters:
x
- the reason for the operation failure
-
-