Package com.linecorp.armeria.client
Class ClientDecorationBuilder
java.lang.Object
com.linecorp.armeria.client.ClientDecorationBuilder
public final class ClientDecorationBuilder extends Object
Creates a new
ClientDecoration
using the builder pattern.-
Method Summary
Modifier and Type Method Description ClientDecorationBuilder
add(ClientDecoration clientDecoration)
Adds the specifiedClientDecoration
.ClientDecorationBuilder
add(DecoratingHttpClientFunction decorator)
Adds the specified HTTP-leveldecorator
.ClientDecorationBuilder
add(Function<? super HttpClient,? extends HttpClient> decorator)
Adds the specified HTTP-leveldecorator
.ClientDecorationBuilder
addRpc(DecoratingRpcClientFunction decorator)
Adds the specified RPC-leveldecorator
.ClientDecorationBuilder
addRpc(Function<? super RpcClient,? extends RpcClient> decorator)
Adds the specified RPC-leveldecorator
.ClientDecoration
build()
Returns a newly-createdClientDecoration
based on the decorators added to this builder.
-
Method Details
-
add
Adds the specifiedClientDecoration
. -
add
Adds the specified HTTP-leveldecorator
.- Parameters:
decorator
- theFunction
that transforms anHttpClient
to another
-
add
Adds the specified HTTP-leveldecorator
.- Parameters:
decorator
- theDecoratingHttpClientFunction
that intercepts an invocation
-
addRpc
Adds the specified RPC-leveldecorator
. -
addRpc
Adds the specified RPC-leveldecorator
.- Parameters:
decorator
- theDecoratingHttpClientFunction
that intercepts an invocation
-
build
Returns a newly-createdClientDecoration
based on the decorators added to this builder.
-