Package com.linecorp.armeria.client
Class ClientDecoration
java.lang.Object
com.linecorp.armeria.client.ClientDecoration
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClientDecorationBuilder
builder()
Returns a newly createdClientDecorationBuilder
.decorate
(HttpClient client) Decorates the specifiedHttpClient
using the decorator.List<Function<? super HttpClient,
? extends HttpClient>> Returns the HTTP-level decorators.static ClientDecoration
of()
Returns an emptyClientDecoration
which does not decorate aClient
.static ClientDecoration
of
(DecoratingHttpClientFunction decorator) Creates a new instance from a singleDecoratingHttpClientFunction
.static ClientDecoration
of
(Function<? super HttpClient, ? extends HttpClient> decorator) Creates a new instance from a single decoratorFunction
.static ClientDecoration
ofRpc
(DecoratingRpcClientFunction decorator) Creates a new instance from a singleDecoratingRpcClientFunction
.static ClientDecoration
Creates a new instance from a single decoratorFunction
.rpcDecorate
(RpcClient client) Decorates the specifiedRpcClient
using the decorator.Returns the RPC-level decorators.
-
Method Details
-
of
Returns an emptyClientDecoration
which does not decorate aClient
. -
of
Creates a new instance from a single decoratorFunction
.- Parameters:
decorator
- theFunction
that transforms anHttpClient
to another
-
of
Creates a new instance from a singleDecoratingHttpClientFunction
.- Parameters:
decorator
- theDecoratingHttpClientFunction
that transforms anHttpClient
to another
-
ofRpc
Creates a new instance from a single decoratorFunction
. -
ofRpc
Creates a new instance from a singleDecoratingRpcClientFunction
.- Parameters:
decorator
- theDecoratingRpcClientFunction
that transforms anRpcClient
to another
-
builder
Returns a newly createdClientDecorationBuilder
. -
decorators
Returns the HTTP-level decorators. -
rpcDecorators
Returns the RPC-level decorators. -
decorate
Decorates the specifiedHttpClient
using the decorator.- Parameters:
client
- theHttpClient
being decorated
-
rpcDecorate
Decorates the specifiedRpcClient
using the decorator.- Parameters:
client
- theRpcClient
being decorated
-