Package io.jenkins.plugins.okhttp.api
Class OkHttpFuture<T>
java.lang.Object
java.util.concurrent.CompletableFuture<T>
io.jenkins.plugins.okhttp.api.OkHttpFuture<T>
- Type Parameters:
T
- Type returned when aResponse
is get.
- All Implemented Interfaces:
CompletionStage<T>
,Future<T>
Provides a mechanism to transform an HTTP response asynchronously relying only on JDK APIs.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture
CompletableFuture.AsynchronousCompletionTask
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ResponseConverter<okhttp3.Response>
A converter returning the response itself. -
Constructor Summary
ConstructorDescriptionOkHttpFuture
(okhttp3.Call call) Creates a future with no converter.OkHttpFuture
(okhttp3.Call call, ResponseConverter<T> converter) -
Method Summary
Methods inherited from class java.util.concurrent.CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, complete, completeAsync, completeAsync, completedFuture, completedStage, completeExceptionally, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, exceptionallyAsync, exceptionallyAsync, exceptionallyCompose, exceptionallyComposeAsync, exceptionallyComposeAsync, failedFuture, failedStage, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, minimalCompletionStage, newIncompleteFuture, obtrudeException, obtrudeValue, orTimeout, 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 Details
-
GET_RESPONSE
A converter returning the response itself.
-
-
Constructor Details
-
OkHttpFuture
public OkHttpFuture(okhttp3.Call call) Creates a future with no converter.- Parameters:
call
- The call that must be executed. Can not benull
-
OkHttpFuture
-
-
Method Details