public final class ClientDecorationBuilder
extends java.lang.Object
ClientDecoration
using the builder pattern.Constructor and Description |
---|
ClientDecorationBuilder() |
Modifier and Type | Method and Description |
---|---|
<T extends Client<? super I,? extends O>,R extends Client<I,O>,I extends Request,O extends Response> |
add(java.lang.Class<I> requestType,
java.lang.Class<O> responseType,
java.util.function.Function<T,R> decorator)
Adds a new decorator
Function . |
ClientDecoration |
build()
Creates a new
ClientDecoration with the decorators added so far via
add(Class, Class, Function) . |
public <T extends Client<? super I,? extends O>,R extends Client<I,O>,I extends Request,O extends Response> ClientDecorationBuilder add(java.lang.Class<I> requestType, java.lang.Class<O> responseType, java.util.function.Function<T,R> decorator)
Function
.T
- the type of the Client
being decoratedR
- the type of the Client
produced by the decorator
requestType
- the type of the Request
that the decorator
is interested inresponseType
- the type of the Response
that the decorator
is interested indecorator
- the Function
that transforms a Client
to anotherpublic ClientDecoration build()
ClientDecoration
with the decorators added so far via
add(Class, Class, Function)
.