@Experimental public final class AsyncFeign<C> extends Object
Feign
to provide support for asynchronous clients. Context (for example for
session cookies or tokens) is explicit, as calls for the same session may be done across several
threads. Retryer
is not supported in this model, as that is a blocking API.
ExceptionPropagationPolicy
is made redundant as RetryableException
is never
thrown. clients
. CompletableFuture
with a non-wildcard type. As the
completion is done by the AsyncClient
, it is important that any subsequent processing on
the thread be short - generally, this should involve notifying some other thread of the work to
be done (for example, creating and submitting a task to an ExecutorService
).Modifier and Type | Class and Description |
---|---|
static class |
AsyncFeign.AsyncBuilder<C> |
Modifier and Type | Method and Description |
---|---|
static <C> AsyncFeign.AsyncBuilder<C> |
asyncBuilder()
Deprecated.
use
builder() instead. |
static <C> AsyncFeign.AsyncBuilder<C> |
builder() |
<T> T |
newInstance(Target<T> target) |
<T> T |
newInstance(Target<T> target,
C context) |
public static <C> AsyncFeign.AsyncBuilder<C> builder()
@Deprecated public static <C> AsyncFeign.AsyncBuilder<C> asyncBuilder()
builder()
instead.public <T> T newInstance(Target<T> target)
Copyright © 2012–2023 OpenFeign. All rights reserved.