Package com.linecorp.armeria.client
Class ClientDecorationBuilder
- java.lang.Object
-
- com.linecorp.armeria.client.ClientDecorationBuilder
-
public final class ClientDecorationBuilder extends Object
Creates a newClientDecoration
using the builder pattern.
-
-
Constructor Summary
Constructors Constructor Description ClientDecorationBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <I extends HttpRequest,O extends HttpResponse>
ClientDecorationBuilderadd(DecoratingClientFunction<I,O> decorator)
Adds the specified HTTP-leveldecorator
.<I extends Request,O extends Response>
ClientDecorationBuilderadd(Class<I> requestType, Class<O> responseType, DecoratingClientFunction<I,O> decorator)
Deprecated.<T extends Client<I,O>,R extends Client<I,O>,I extends Request,O extends Response>
ClientDecorationBuilderadd(Class<I> requestType, Class<O> responseType, Function<T,R> decorator)
Deprecated.Useadd(Function)
oraddRpc(Function)
.<T extends Client<I,O>,R extends Client<I,O>,I extends HttpRequest,O extends HttpResponse>
ClientDecorationBuilderadd(Function<T,R> decorator)
Adds the specified HTTP-leveldecorator
.<I extends RpcRequest,O extends RpcResponse>
ClientDecorationBuilderaddRpc(DecoratingClientFunction<I,O> decorator)
Adds the specified RPC-leveldecorator
.<T extends Client<I,O>,R extends Client<I,O>,I extends RpcRequest,O extends RpcResponse>
ClientDecorationBuilderaddRpc(Function<T,R> decorator)
Adds the specified RPC-leveldecorator
.ClientDecoration
build()
Returns a newly-createdClientDecoration
based on the decorators added to this builder.
-
-
-
Method Detail
-
add
@Deprecated public <T extends Client<I,O>,R extends Client<I,O>,I extends Request,O extends Response> ClientDecorationBuilder add(Class<I> requestType, Class<O> responseType, Function<T,R> decorator)
Deprecated.Useadd(Function)
oraddRpc(Function)
.Adds a new decoratorFunction
.- Type Parameters:
T
- the type of theClient
being decoratedR
- the type of theClient
produced by thedecorator
I
- theRequest
type of theClient
being decoratedO
- theResponse
type of theClient
being decorated- Parameters:
requestType
- the type of theRequest
that thedecorator
is interested inresponseType
- the type of theResponse
that thedecorator
is interested indecorator
- theFunction
that transforms aClient
to another
-
add
@Deprecated public <I extends Request,O extends Response> ClientDecorationBuilder add(Class<I> requestType, Class<O> responseType, DecoratingClientFunction<I,O> decorator)
Deprecated.Adds a newDecoratingClientFunction
.- Type Parameters:
I
- theRequest
type of theClient
being decoratedO
- theResponse
type of theClient
being decorated- Parameters:
requestType
- the type of theRequest
that thedecorator
is interested inresponseType
- the type of theResponse
that thedecorator
is interested indecorator
- theDecoratingClientFunction
that intercepts an invocation
-
add
public <T extends Client<I,O>,R extends Client<I,O>,I extends HttpRequest,O extends HttpResponse> ClientDecorationBuilder add(Function<T,R> decorator)
Adds the specified HTTP-leveldecorator
.
-
add
public <I extends HttpRequest,O extends HttpResponse> ClientDecorationBuilder add(DecoratingClientFunction<I,O> decorator)
Adds the specified HTTP-leveldecorator
.- Type Parameters:
I
- theRequest
type of theClient
being decoratedO
- theResponse
type of theClient
being decorated- Parameters:
decorator
- theDecoratingClientFunction
that intercepts an invocation
-
addRpc
public <T extends Client<I,O>,R extends Client<I,O>,I extends RpcRequest,O extends RpcResponse> ClientDecorationBuilder addRpc(Function<T,R> decorator)
Adds the specified RPC-leveldecorator
.
-
addRpc
public <I extends RpcRequest,O extends RpcResponse> ClientDecorationBuilder addRpc(DecoratingClientFunction<I,O> decorator)
Adds the specified RPC-leveldecorator
.- Type Parameters:
I
- theRequest
type of theClient
being decoratedO
- theResponse
type of theClient
being decorated- Parameters:
decorator
- theDecoratingClientFunction
that intercepts an invocation
-
build
public ClientDecoration build()
Returns a newly-createdClientDecoration
based on the decorators added to this builder.
-
-