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
,WebClientBuilder
public abstract class AbstractWebClientBuilder extends AbstractClientOptionsBuilder
A skeletal builder implementation for
WebClient
.-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractWebClientBuilder()
Creates a new instance.protected
AbstractWebClientBuilder(SessionProtocol sessionProtocol, EndpointGroup endpointGroup, String path)
Creates a new instance.protected
AbstractWebClientBuilder(URI uri)
Creates a new instance. -
Method Summary
Modifier and Type Method Description protected WebClient
buildWebClient()
Returns a newly-created web client based on the properties of this builder.protected ClientBuilderParams
clientBuilderParams(ClientOptions options)
Returns a newly-createdClientBuilderParams
with the specifiedClientOptions
.AbstractWebClientBuilder
rpcDecorator(DecoratingRpcClientFunction decorator)
Raises anUnsupportedOperationException
because this builder doesn't support RPC-level but only HTTP-level decorators.AbstractWebClientBuilder
rpcDecorator(Function<? super RpcClient,? extends RpcClient> decorator)
Raises anUnsupportedOperationException
because this builder doesn't support RPC-level but only HTTP-level decorators.Methods inherited from class com.linecorp.armeria.client.AbstractClientOptionsBuilder
addHeader, addHeaders, auth, auth, auth, buildOptions, buildOptions, clearDecorators, decorator, decorator, endpointRemapper, factory, maxResponseLength, option, option, options, options, options, requestIdGenerator, responseTimeout, responseTimeoutMillis, setHeader, setHeaders, 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 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
public AbstractWebClientBuilder rpcDecorator(Function<? super RpcClient,? extends RpcClient> decorator)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
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
-