I - the request typeO - the response typepublic abstract class UserClient<I extends Request,O extends Response> extends AbstractUnwrappable<Client<I,O>> implements ClientBuilderParams
| Modifier | Constructor and Description |
|---|---|
protected |
UserClient(ClientBuilderParams params,
Client<I,O> delegate,
MeterRegistry meterRegistry)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
String |
absolutePathRef()
Returns the
String that consists of path, query string and fragment. |
Class<?> |
clientType()
Returns the type of the client.
|
EndpointGroup |
endpointGroup()
Returns the
EndpointGroup of the client. |
protected O |
execute(EndpointGroup endpointGroup,
HttpMethod method,
String path,
String query,
String fragment,
I req,
BiFunction<ClientRequestContext,Throwable,O> fallback)
Executes the specified
Request via AbstractUnwrappable.delegate(). |
protected O |
execute(HttpMethod method,
String path,
String query,
String fragment,
I req,
BiFunction<ClientRequestContext,Throwable,O> fallback)
Executes the specified
Request via AbstractUnwrappable.delegate(). |
ClientOptions |
options()
Returns the options of the client.
|
Scheme |
scheme()
Returns the
Scheme of the client. |
URI |
uri()
Returns the endpoint URI of the client.
|
as, delegate, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfactory, of, ofprotected UserClient(ClientBuilderParams params, Client<I,O> delegate, MeterRegistry meterRegistry)
params - the parameters used for constructing the clientdelegate - the Client that will process RequestsmeterRegistry - the MeterRegistry that collects various statspublic final Scheme scheme()
ClientBuilderParamsScheme of the client.scheme in interface ClientBuilderParamspublic final EndpointGroup endpointGroup()
ClientBuilderParamsEndpointGroup of the client.endpointGroup in interface ClientBuilderParamspublic final String absolutePathRef()
ClientBuilderParamsString that consists of path, query string and fragment.absolutePathRef in interface ClientBuilderParamspublic final URI uri()
ClientBuilderParamsuri in interface ClientBuilderParamspublic final Class<?> clientType()
ClientBuilderParamsclientType in interface ClientBuilderParamspublic final ClientOptions options()
ClientBuilderParamsoptions in interface ClientBuilderParamsprotected final O execute(HttpMethod method, String path, String query, String fragment, I req, BiFunction<ClientRequestContext,Throwable,O> fallback)
Request via AbstractUnwrappable.delegate().method - the method of the Requestpath - the path part of the Request URIquery - the query part of the Request URIfragment - the fragment part of the Request URIreq - the Requestfallback - the fallback response BiFunction to use when
Client.execute(ClientRequestContext, Request) of AbstractUnwrappable.delegate() throws
an exception instead of returning an error responseprotected final O execute(EndpointGroup endpointGroup, HttpMethod method, String path, String query, String fragment, I req, BiFunction<ClientRequestContext,Throwable,O> fallback)
Request via AbstractUnwrappable.delegate().endpointGroup - the EndpointGroup of the Requestmethod - the method of the Requestpath - the path part of the Request URIquery - the query part of the Request URIfragment - the fragment part of the Request URIreq - the Requestfallback - the fallback response BiFunction to use when
Client.execute(ClientRequestContext, Request) of AbstractUnwrappable.delegate() throwsCopyright © 2020 LeanCloud. All rights reserved.