public final class ClientDecoration extends Object
| Modifier and Type | Field and Description |
|---|---|
static ClientDecoration |
NONE
Deprecated.
Use
of(). |
| Modifier and Type | Method and Description |
|---|---|
static ClientDecorationBuilder |
builder()
Returns a newly created
ClientDecorationBuilder. |
HttpClient |
decorate(HttpClient client)
Decorates the specified
HttpClient using the decorator. |
static ClientDecoration |
of()
Returns an empty
ClientDecoration which does not decorate a Client. |
static ClientDecoration |
of(Function<? super HttpClient,? extends HttpClient> decorator)
Creates a new instance from a single decorator
Function. |
static ClientDecoration |
ofRpc(Function<? super RpcClient,? extends RpcClient> decorator)
Creates a new instance from a single decorator
Function. |
RpcClient |
rpcDecorate(RpcClient client)
Decorates the specified
RpcClient using the decorator. |
@Deprecated public static final ClientDecoration NONE
of().ClientDecoration that decorates no Client.public static ClientDecoration of()
ClientDecoration which does not decorate a Client.public static ClientDecoration of(Function<? super HttpClient,? extends HttpClient> decorator)
Function.decorator - the Function that transforms an HttpClient to anotherpublic static ClientDecoration ofRpc(Function<? super RpcClient,? extends RpcClient> decorator)
Function.public static ClientDecorationBuilder builder()
ClientDecorationBuilder.public HttpClient decorate(HttpClient client)
HttpClient using the decorator.client - the HttpClient being decoratedCopyright © 2020 LeanCloud. All rights reserved.