Package com.linecorp.armeria.client
Class ClientDecoration
java.lang.Object
com.linecorp.armeria.client.ClientDecoration
public final class ClientDecoration extends Object
-
Method Summary
Modifier and Type Method Description static ClientDecorationBuilder
builder()
Returns a newly createdClientDecorationBuilder
.HttpClient
decorate(HttpClient client)
Decorates the specifiedHttpClient
using the decorator.List<Function<? super HttpClient,? extends HttpClient>>
decorators()
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
ofRpc(Function<? super RpcClient,? extends RpcClient> decorator)
Creates a new instance from a single decoratorFunction
.RpcClient
rpcDecorate(RpcClient client)
Decorates the specifiedRpcClient
using the decorator.List<Function<? super RpcClient,? extends RpcClient>>
rpcDecorators()
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
-