| Package | Description |
|---|---|
| com.linecorp.armeria.client |
Client core.
|
| com.linecorp.armeria.client.circuitbreaker |
Failure detection and fallback mechanism based on
circuit breaker pattern.
|
| com.linecorp.armeria.client.encoding |
HTTP content decoding client.
|
| com.linecorp.armeria.client.limit |
Limits the number of executed
Requests. |
| com.linecorp.armeria.client.logging |
Logging client decorators.
|
| com.linecorp.armeria.client.metric |
Metric-collecting client decorators.
|
| com.linecorp.armeria.client.retry |
A
Client decorator that handles failures and retries requests. |
| Modifier and Type | Class and Description |
|---|---|
class |
SimpleDecoratingHttpClient
Decorates an
HttpClient. |
| Modifier and Type | Method and Description |
|---|---|
HttpClient |
ClientDecoration.decorate(HttpClient client)
Decorates the specified
HttpClient using the decorator. |
| Modifier and Type | Method and Description |
|---|---|
HttpClient |
ClientDecoration.decorate(HttpClient client)
Decorates the specified
HttpClient using the decorator. |
HttpResponse |
DecoratingHttpClientFunction.execute(HttpClient delegate,
ClientRequestContext ctx,
HttpRequest req)
|
| Modifier and Type | Method and Description |
|---|---|
ClientDecorationBuilder |
ClientDecorationBuilder.add(Function<? super HttpClient,? extends HttpClient> decorator)
Adds the specified HTTP-level
decorator. |
ClientDecorationBuilder |
ClientDecorationBuilder.add(Function<? super HttpClient,? extends HttpClient> decorator)
Adds the specified HTTP-level
decorator. |
static ClientDecoration |
ClientDecoration.of(Function<? super HttpClient,? extends HttpClient> decorator)
Creates a new instance from a single decorator
Function. |
static ClientDecoration |
ClientDecoration.of(Function<? super HttpClient,? extends HttpClient> decorator)
Creates a new instance from a single decorator
Function. |
| Constructor and Description |
|---|
SimpleDecoratingHttpClient(HttpClient delegate)
Creates a new instance that decorates the specified
HttpClient. |
| Modifier and Type | Class and Description |
|---|---|
class |
CircuitBreakerHttpClient
An
HttpClient decorator that handles failures of HTTP requests based on circuit breaker pattern. |
| Modifier and Type | Method and Description |
|---|---|
Function<? super HttpClient,CircuitBreakerHttpClient> |
CircuitBreakerHttpClientBuilder.newDecorator()
Returns a newly-created decorator that decorates an
HttpClient with a new
CircuitBreakerHttpClient based on the properties of this builder. |
static Function<? super HttpClient,CircuitBreakerHttpClient> |
CircuitBreakerHttpClient.newDecorator(CircuitBreaker circuitBreaker,
CircuitBreakerStrategy strategy)
Creates a new decorator using the specified
CircuitBreaker instance and
CircuitBreakerStrategy. |
static Function<? super HttpClient,CircuitBreakerHttpClient> |
CircuitBreakerHttpClient.newDecorator(CircuitBreakerMapping mapping,
CircuitBreakerStrategy strategy)
Creates a new decorator with the specified
CircuitBreakerMapping and
CircuitBreakerStrategy. |
static Function<? super HttpClient,CircuitBreakerHttpClient> |
CircuitBreakerHttpClient.newPerHostAndMethodDecorator(Function<String,CircuitBreaker> factory,
CircuitBreakerStrategy strategy)
Creates a new decorator that binds one
CircuitBreaker per host and HttpMethod with
the specified CircuitBreakerStrategy. |
static Function<? super HttpClient,CircuitBreakerHttpClient> |
CircuitBreakerHttpClient.newPerHostDecorator(Function<String,CircuitBreaker> factory,
CircuitBreakerStrategy strategy)
Creates a new decorator that binds one
CircuitBreaker per host with the specified
CircuitBreakerStrategy. |
static Function<? super HttpClient,CircuitBreakerHttpClient> |
CircuitBreakerHttpClient.newPerMethodDecorator(Function<String,CircuitBreaker> factory,
CircuitBreakerStrategy strategy)
Creates a new decorator that binds one
CircuitBreaker per HttpMethod with the specified
CircuitBreakerStrategy. |
| Modifier and Type | Method and Description |
|---|---|
CircuitBreakerHttpClient |
CircuitBreakerHttpClientBuilder.build(HttpClient delegate)
Returns a newly-created
CircuitBreakerHttpClient based on the properties of this builder. |
| Modifier and Type | Class and Description |
|---|---|
class |
HttpDecodingClient
A
DecoratingClient that requests and decodes HTTP encoding (e.g., gzip) that has been applied to the
content of an HttpResponse. |
| Modifier and Type | Method and Description |
|---|---|
static Function<? super HttpClient,HttpDecodingClient> |
HttpDecodingClient.newDecorator()
Creates a new
HttpDecodingClient decorator with the default encodings of 'gzip' and 'deflate'. |
static Function<? super HttpClient,HttpDecodingClient> |
HttpDecodingClient.newDecorator(Iterable<? extends StreamDecoderFactory> decoderFactories)
Creates a new
HttpDecodingClient decorator with the specified StreamDecoderFactorys. |
static Function<? super HttpClient,HttpDecodingClient> |
HttpDecodingClient.newDecorator(StreamDecoderFactory... decoderFactories)
Creates a new
HttpDecodingClient decorator with the specified StreamDecoderFactorys. |
| Modifier and Type | Class and Description |
|---|---|
class |
ConcurrencyLimitingHttpClient
An
HttpClient decorator that limits the concurrent number of active HTTP requests. |
| Modifier and Type | Method and Description |
|---|---|
static Function<? super HttpClient,ConcurrencyLimitingHttpClient> |
ConcurrencyLimitingHttpClient.newDecorator(int maxConcurrency)
Creates a new
HttpClient decorator that limits the concurrent number of active HTTP requests. |
static Function<? super HttpClient,ConcurrencyLimitingHttpClient> |
ConcurrencyLimitingHttpClient.newDecorator(int maxConcurrency,
long timeout,
TimeUnit unit)
Creates a new
HttpClient decorator that limits the concurrent number of active HTTP requests. |
| Modifier and Type | Class and Description |
|---|---|
class |
LoggingClient
|
| Modifier and Type | Method and Description |
|---|---|
Function<? super HttpClient,LoggingClient> |
LoggingClientBuilder.newDecorator()
Returns a newly-created
LoggingClient decorator based on the properties of this builder. |
static Function<? super HttpClient,LoggingClient> |
LoggingClient.newDecorator()
Returns a new
HttpClient decorator that logs Requests and Responses at
LogLevel.INFO for success, LogLevel.WARN for failure. |
static Function<? super HttpClient,LoggingClient> |
LoggingClient.newDecorator(LogLevel level)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
LoggingClient |
LoggingClientBuilder.build(HttpClient delegate)
Returns a newly-created
LoggingClient decorating delegate based on the properties of
this builder. |
| Constructor and Description |
|---|
LoggingClient(HttpClient delegate)
Deprecated.
|
LoggingClient(HttpClient delegate,
LogLevel level)
Deprecated.
Use
LoggingClientBuilder. |
| Modifier and Type | Class and Description |
|---|---|
class |
MetricCollectingClient
Decorates an
HttpClient to collect metrics into MeterRegistry. |
| Modifier and Type | Method and Description |
|---|---|
static Function<? super HttpClient,MetricCollectingClient> |
MetricCollectingClient.newDecorator(MeterIdPrefixFunction meterIdPrefixFunction)
Returns an
HttpClient decorator that tracks request stats using MeterRegistry. |
| Modifier and Type | Class and Description |
|---|---|
class |
RetryingHttpClient
An
HttpClient decorator that handles failures of an invocation and retries HTTP requests. |
| Modifier and Type | Method and Description |
|---|---|
Function<? super HttpClient,RetryingHttpClient> |
RetryingHttpClientBuilder.newDecorator()
Returns a newly-created decorator that decorates an
HttpClient with a new
RetryingHttpClient based on the properties of this builder. |
static Function<? super HttpClient,RetryingHttpClient> |
RetryingHttpClient.newDecorator(RetryStrategy retryStrategy)
Creates a new
HttpClient decorator that handles failures of an invocation and retries HTTP
requests. |
static Function<? super HttpClient,RetryingHttpClient> |
RetryingHttpClient.newDecorator(RetryStrategy retryStrategy,
int maxTotalAttempts)
Creates a new
HttpClient decorator that handles failures of an invocation and retries HTTP
requests. |
static Function<? super HttpClient,RetryingHttpClient> |
RetryingHttpClient.newDecorator(RetryStrategy retryStrategy,
int maxTotalAttempts,
long responseTimeoutMillisForEachAttempt)
Creates a new
HttpClient decorator that handles failures of an invocation and retries HTTP
requests. |
| Modifier and Type | Method and Description |
|---|---|
RetryingHttpClient |
RetryingHttpClientBuilder.build(HttpClient delegate)
Returns a newly-created
RetryingHttpClient based on the properties of this builder. |
Copyright © 2020 LeanCloud. All rights reserved.