Package com.linecorp.armeria.client
Class AbstractWebClientBuilder
java.lang.Object
com.linecorp.armeria.client.AbstractClientOptionsBuilder
com.linecorp.armeria.client.AbstractWebClientBuilder
- Direct Known Subclasses:
EurekaEndpointGroupBuilder
,EurekaUpdatingListenerBuilder
,RestClientBuilder
,WebClientBuilder
A skeletal builder implementation for
WebClient
.-
Constructor Summary
ModifierConstructorDescriptionprotected
Creates a new instance.protected
AbstractWebClientBuilder
(SessionProtocol sessionProtocol, EndpointGroup endpointGroup, @Nullable String path) Creates a new instance.protected
Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected final WebClient
Returns a newly-created web client based on the properties of this builder.protected final ClientBuilderParams
clientBuilderParams
(ClientOptions options) Returns a newly-createdClientBuilderParams
with the specifiedClientOptions
.rpcDecorator
(DecoratingRpcClientFunction decorator) Deprecated.RPC decorator cannot be added to the web client builder.rpcDecorator
(Function<? super RpcClient, ? extends RpcClient> decorator) Deprecated.RPC decorator cannot be added to the web client builder.Methods inherited from class com.linecorp.armeria.client.AbstractClientOptionsBuilder
addHeader, addHeaders, auth, auth, auth, auth, buildOptions, buildOptions, clearDecorators, contextCustomizer, decorator, decorator, endpointRemapper, factory, followRedirects, followRedirects, maxResponseLength, option, option, options, options, options, requestAutoAbortDelay, requestAutoAbortDelayMillis, requestIdGenerator, responseTimeout, responseTimeoutMillis, setHeader, setHeaders, successFunction, writeTimeout, writeTimeoutMillis
-
Constructor Details
-
AbstractWebClientBuilder
protected AbstractWebClientBuilder()Creates a new instance. -
AbstractWebClientBuilder
Creates a new instance.- Throws:
IllegalArgumentException
- if the scheme of the uri is not one of the fields inSessionProtocol
-
AbstractWebClientBuilder
protected AbstractWebClientBuilder(SessionProtocol sessionProtocol, EndpointGroup endpointGroup, @Nullable @Nullable String path) Creates a new instance.- Throws:
IllegalArgumentException
- if thesessionProtocol
is not one of the fields inSessionProtocol
-
-
Method Details
-
buildWebClient
Returns a newly-created web client based on the properties of this builder.- Throws:
IllegalArgumentException
- if the scheme of theuri
specified inWebClient.builder(String)
orWebClient.builder(URI)
is not an HTTP scheme
-
clientBuilderParams
Returns a newly-createdClientBuilderParams
with the specifiedClientOptions
.- Throws:
IllegalArgumentException
- if the scheme of theuri
specified inWebClient.builder(String)
orWebClient.builder(URI)
is not an HTTP scheme
-
rpcDecorator
@Deprecated public AbstractWebClientBuilder rpcDecorator(Function<? super RpcClient, ? extends RpcClient> decorator) Deprecated.RPC decorator cannot be added to the web client builder.Raises anUnsupportedOperationException
because this builder doesn't support RPC-level but only HTTP-level decorators.- Overrides:
rpcDecorator
in classAbstractClientOptionsBuilder
- Parameters:
decorator
- theFunction
that transforms anRpcClient
to another
-
rpcDecorator
Deprecated.RPC decorator cannot be added to the web client builder.Raises anUnsupportedOperationException
because this builder doesn't support RPC-level but only HTTP-level decorators.- Overrides:
rpcDecorator
in classAbstractClientOptionsBuilder
- Parameters:
decorator
- theDecoratingRpcClientFunction
that intercepts an invocation
-